Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6051
Modified Files:
Tag: projectx
textureserver.cpp
Log Message:
call Texture constructors with a flag if GL methods should be used or not
Index: textureserver.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/textureserver.cpp,v
retrieving revision 1.1.2.2.2.1
retrieving revision 1.1.2.2.2.2
diff -C2 -d -r1.1.2.2.2.1 -r1.1.2.2.2.2
*** textureserver.cpp 1 Jun 2007 13:25:15 -0000 1.1.2.2.2.1
--- textureserver.cpp 17 Jun 2007 08:32:46 -0000 1.1.2.2.2.2
***************
*** 54,57 ****
--- 54,59 ----
}
#endif
+ // setup OpenGLServer reference
+ RegisterCachedPath(mOpenGLServer, "/sys/server/opengl");
}
***************
*** 61,73 ****
if (entry != mTextureCache.end())
! {
! // we already have a match
! return (*entry).second;
! }
!
if (mImageServer.expired())
! {
! return shared_ptr<Texture>();
! }
#ifdef WIN32
--- 63,75 ----
if (entry != mTextureCache.end())
! {
! // we already have a match
! return (*entry).second;
! }
!
if (mImageServer.expired())
! {
! return shared_ptr<Texture>();
! }
#ifdef WIN32
***************
*** 78,86 ****
if (! image.get())
! {
! return shared_ptr<Texture>();
! }
! Texture2D *tex2D = new Texture2D();
tex2D->Create(image);
shared_ptr<Texture> texture(tex2D);
--- 80,94 ----
if (! image.get())
! {
! return shared_ptr<Texture>();
! }
! bool use_gl = false;
! if (!mOpenGLServer.expired())
! {
! use_gl = !mOpenGLServer->IsGLLocked();
! }
!
! Texture2D *tex2D = new Texture2D(use_gl);
tex2D->Create(image);
shared_ptr<Texture> texture(tex2D);
|