Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7545
Modified Files:
Tag: projectx
texture.cpp
Log Message:
- added flag to constructor if gL methods should be used
- access OpenGL only if GL is not "locked" (based on the flag used during construction)
Index: texture.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture.cpp,v
retrieving revision 1.1.2.3.2.1
retrieving revision 1.1.2.3.2.2
diff -C2 -d -r1.1.2.3.2.1 -r1.1.2.3.2.2
*** texture.cpp 1 Jun 2007 13:25:15 -0000 1.1.2.3.2.1
--- texture.cpp 17 Jun 2007 08:36:07 -0000 1.1.2.3.2.2
***************
*** 1,5 ****
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
! this file is part of rcssserver3D
Fri May 9 2003
Copyright (C) 2002,2003 Koblenz University
--- 1,5 ----
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
! this file is part of simspark
Fri May 9 2003
Copyright (C) 2002,2003 Koblenz University
***************
*** 25,30 ****
using namespace kerosin;
! Texture::Texture()
! : mTexID(0), mWidth(0), mHeight(0)
{
}
--- 25,30 ----
using namespace kerosin;
! Texture::Texture(bool use_gl)
! : mTexID(0), mWidth(0), mHeight(0), mUseGL(use_gl)
{
}
***************
*** 35,61 ****
}
! void Texture::Reset()
{
if (! mTexID)
! {
! return;
! }
! glDeleteTextures(1, &mTexID);
mTexID = 0;
}
! void Texture::Acquire()
{
Reset();
! glGenTextures(1, &mTexID);
}
! unsigned int Texture::GetWidth() const
{
return mWidth;
}
! unsigned int Texture::GetHeight() const
{
return mHeight;
--- 35,65 ----
}
! void
! Texture::Reset()
{
if (! mTexID)
! {
! return;
! }
! if (mUseGL) glDeleteTextures(1, &mTexID);
mTexID = 0;
}
! void
! Texture::Acquire()
{
Reset();
! if (mUseGL) glGenTextures(1, &mTexID);
}
! unsigned int
! Texture::GetWidth() const
{
return mWidth;
}
! unsigned int
! Texture::GetHeight() const
{
return mHeight;
|