You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver O. <fr...@us...> - 2007-06-17 11:02:34
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv881 Modified Files: Tag: projectx kerosin.cpp Log Message: added materialexternal Index: kerosin.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.cpp,v retrieving revision 1.1.2.1.2.2 retrieving revision 1.1.2.1.2.3 diff -C2 -d -r1.1.2.1.2.2 -r1.1.2.1.2.3 *** kerosin.cpp 8 May 2007 03:37:13 -0000 1.1.2.1.2.2 --- kerosin.cpp 17 Jun 2007 11:02:26 -0000 1.1.2.1.2.3 *************** *** 51,54 **** --- 51,55 ---- zg.GetCore()->RegisterClassObject(new CLASS(Material), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(Material2DTexture), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(MaterialExternal), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(MaterialSolid), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(MaterialExporter), "kerosin/"); |
From: Oliver O. <fr...@us...> - 2007-06-17 11:01:50
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv481 Modified Files: Tag: projectx kerosin.h Log Message: added materialexternal Index: kerosin.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.h,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -C2 -d -r1.1.2.1.2.1 -r1.1.2.1.2.2 *** kerosin.h 8 May 2007 03:37:38 -0000 1.1.2.1.2.1 --- kerosin.h 17 Jun 2007 11:01:43 -0000 1.1.2.1.2.2 *************** *** 53,56 **** --- 53,57 ---- #include "materialserver/material.h" #include "materialserver/material2dtexture.h" + #include "materialserver/materialexternal.h" #include "materialserver/materialsolid.h" #include "materialserver/materialexporter.h" |
From: Oliver O. <fr...@us...> - 2007-06-17 11:01:06
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32552 Modified Files: Tag: projectx kerosin.rb Log Message: changed application title to SimSpark Index: kerosin.rb =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.rb,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** kerosin.rb 2 Jan 2006 20:39:41 -0000 1.1 --- kerosin.rb 17 Jun 2007 11:01:01 -0000 1.1.4.1 *************** *** 13,17 **** # ! createVariable('Application.Title', 'Kerosin'); --- 13,17 ---- # ! createVariable('Application.Title', 'SimSpark'); |
From: Oliver O. <fr...@us...> - 2007-06-17 11:00:17
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32494 Modified Files: Tag: projectx inputcontrol.cpp Log Message: merge from HEAD Index: inputcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.cpp,v retrieving revision 1.2.2.2.2.1 retrieving revision 1.2.2.2.2.2 diff -C2 -d -r1.2.2.2.2.1 -r1.2.2.2.2.2 *** inputcontrol.cpp 1 Jun 2007 12:33:36 -0000 1.2.2.2.2.1 --- inputcontrol.cpp 17 Jun 2007 11:00:13 -0000 1.2.2.2.2.2 *************** *** 84,87 **** --- 84,92 ---- } + shared_ptr<FPSController> InputControl::GetFPSController() + { + return mFPSController; + } + void InputControl::SetFPSController(shared_ptr<FPSController> controller) { |
From: Oliver O. <fr...@us...> - 2007-06-17 10:59:28
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32108 Modified Files: Tag: projectx inputcontrol.h Log Message: merge from HEAD Index: inputcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** inputcontrol.h 15 Feb 2007 21:02:33 -0000 1.1.2.1 --- inputcontrol.h 17 Jun 2007 10:59:24 -0000 1.1.2.1.2.1 *************** *** 69,72 **** --- 69,75 ---- bool SetFPSController(const std::string& path); + /** returns the cached location of the FPS controller */ + boost::shared_ptr<oxygen::FPSController> GetFPSController(); + /** sets the FPSController to be used */ void SetFPSController(boost::shared_ptr<oxygen::FPSController> controller); |
From: Oliver O. <fr...@us...> - 2007-06-17 10:58:13
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31344 Modified Files: Tag: projectx inputserver.cpp Log Message: - added debug code (not compiled by default) Index: inputserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputserver.cpp,v retrieving revision 1.2.2.1.2.1 retrieving revision 1.2.2.1.2.2 diff -C2 -d -r1.2.2.1.2.1 -r1.2.2.1.2.2 *** inputserver.cpp 1 Jun 2007 12:45:06 -0000 1.2.2.1.2.1 --- inputserver.cpp 17 Jun 2007 10:58:05 -0000 1.2.2.1.2.2 *************** *** 312,315 **** --- 312,316 ---- if (bind.modifier == mModifierState) { + #if 0 if (input.mType == Input::eButton) { *************** *** 318,326 **** (bind.event == eKeyDown && input.mData.l == 1) ) ! { ! input.mId = bind.cmd; ! return true; ! } ! } else if (input.mType == Input::eAxis) { --- 319,335 ---- (bind.event == eKeyDown && input.mData.l == 1) ) ! #else ! const Bind& bind = (*bindIter); ! ! //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); ! if ( ! (bind.modifier == 0 && mModifierState == 0) || ! (bind.modifier & mModifierState) ! ) ! #endif ! { ! input.mId = bind.cmd; ! return true; ! } else if (input.mType == Input::eAxis) { |
From: Oliver O. <fr...@us...> - 2007-06-17 10:56:32
|
Update of /cvsroot/simspark/simspark/spark/kerosin/materialserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30941 Modified Files: Tag: projectx material2dtexture.cpp Log Message: - added methods to access names of the different textures used Index: material2dtexture.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/material2dtexture.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** material2dtexture.cpp 23 Feb 2007 19:21:09 -0000 1.1.2.2 --- material2dtexture.cpp 17 Jun 2007 10:56:28 -0000 1.1.2.2.2.1 *************** *** 33,37 **** using namespace std; ! Material2DTexture::Material2DTexture() : MaterialSolid() { } --- 33,38 ---- using namespace std; ! Material2DTexture::Material2DTexture() : MaterialSolid(), ! mTexDiffuseName(""), mTexNormalName(""), mTexSpecularName("") { } *************** *** 41,45 **** } ! bool Material2DTexture::LoadTexture(const std::string& texName, shared_ptr<Texture>& store) { shared_ptr<ScriptServer> scriptServer = GetCore()->GetScriptServer(); --- 42,47 ---- } ! bool ! Material2DTexture::LoadTexture(const std::string& texName, shared_ptr<Texture>& store) { shared_ptr<ScriptServer> scriptServer = GetCore()->GetScriptServer(); *************** *** 50,58 **** if (textureServer.get() == 0) ! { ! GetLog()->Error() ! << "(Material2DTexture) ERROR: cannot find TextureServer\n"; ! return false; ! } store = textureServer->GetTexture(texName); --- 52,60 ---- if (textureServer.get() == 0) ! { ! GetLog()->Error() ! << "(Material2DTexture) ERROR: cannot find TextureServer\n"; ! return false; ! } store = textureServer->GetTexture(texName); *************** *** 60,101 **** } ! bool Material2DTexture::SetDiffuseTexture(const std::string& texName) { return LoadTexture(texName,mTexDiffuse); } ! bool Material2DTexture::SetNormalTexture(const std::string& texName) { return LoadTexture(texName,mTexNormal); } ! bool Material2DTexture::SetSpecularTexture(const std::string& texName) { return LoadTexture(texName,mTexSpecular); } ! void Material2DTexture::Bind() { SetupMaterial(); if (mTexDiffuse.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); - mTexDiffuse->Bind(); } if (mTexNormal.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); - mTexNormal->Bind(); } if (mTexSpecular.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); - mTexSpecular->Bind(); } } --- 62,160 ---- } ! bool ! Material2DTexture::SetDiffuseTexture(const std::string& texName) { + mTexDiffuseName = texName; return LoadTexture(texName,mTexDiffuse); } ! const std::string& ! Material2DTexture::GetDiffuseTextureName() const ! { ! return mTexDiffuseName; ! } ! ! bool ! Material2DTexture::HasDiffuseTexture() const ! { ! return (!mTexDiffuseName.empty() && mTexDiffuse.get() != 0); ! } ! ! bool ! Material2DTexture::SetNormalTexture(const std::string& texName) { + mTexNormalName = texName; return LoadTexture(texName,mTexNormal); } ! const std::string& ! Material2DTexture::GetNormalTextureName() const { + return mTexNormalName; + } + + bool + Material2DTexture::HasNormalTexture() const + { + return (!mTexNormalName.empty() && mTexNormal.get() != 0); + } + + bool + Material2DTexture::SetSpecularTexture(const std::string& texName) + { + mTexSpecularName = texName; return LoadTexture(texName,mTexSpecular); } ! const std::string& ! Material2DTexture::GetSpecularTextureName() const { + return mTexSpecularName; + } + + bool + Material2DTexture::HasSpecularTexture() const + { + return (!mTexSpecularName.empty() && mTexSpecular.get() != 0); + } + + void + Material2DTexture::Bind() + { + shared_ptr<OpenGLServer> openGLServer = + shared_dynamic_cast<OpenGLServer>(GetCore()->Get("/sys/server/opengl")); + + bool use_gl = ((openGLServer.get() != 0) && (!openGLServer->IsGLLocked())); + SetupMaterial(); if (mTexDiffuse.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); } + mTexDiffuse->Bind(); + } if (mTexNormal.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); } + mTexNormal->Bind(); + } if (mTexSpecular.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); } + mTexSpecular->Bind(); + } } |
From: Oliver O. <fr...@us...> - 2007-06-17 10:55:41
|
Update of /cvsroot/simspark/simspark/spark/kerosin/materialserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30561 Modified Files: Tag: projectx material2dtexture.h Log Message: - added methods to access names of the different textures used Index: material2dtexture.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/material2dtexture.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** material2dtexture.h 5 Dec 2005 21:38:22 -0000 1.1 --- material2dtexture.h 17 Jun 2007 10:55:31 -0000 1.1.4.1 *************** *** 40,49 **** --- 40,61 ---- /** loads the diffuse texture */ bool SetDiffuseTexture(const std::string& texName); + //! @return the name of the set diffuse texture + const std::string& GetDiffuseTextureName() const; + //! @return true if there is a diffuse texture name and a texture + bool HasDiffuseTexture() const; /** loads the normal texture */ bool SetNormalTexture(const std::string& texName); + //! @return the name of the set normal texture + const std::string& GetNormalTextureName() const; + //! @return true if there is a normal texture name and a texture + bool HasNormalTexture() const; /** loads the specular texture */ bool SetSpecularTexture(const std::string& texName); + //! @return the name of the set specular texture + const std::string& GetSpecularTextureName() const; + //! @return true if there is a specular texture name and a texture + bool HasSpecularTexture() const; /** binds the managed material, i.e. sets all necessary OpenGL *************** *** 60,69 **** --- 72,87 ---- // protected: + //! the diffuse texture name + std::string mTexDiffuseName; /** the diffuse texture */ boost::shared_ptr<Texture> mTexDiffuse; + //! the normal texture name + std::string mTexNormalName; /** the normal texture */ boost::shared_ptr<Texture> mTexNormal; + //! the specular texture name + std::string mTexSpecularName; /** the specular texture */ boost::shared_ptr<Texture> mTexSpecular; |
From: Oliver O. <fr...@us...> - 2007-06-17 10:53:05
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29408 Modified Files: Tag: projectx openglserver.cpp Log Message: - added method IsGLLocked(), to access the same method from the GL subsystem Index: openglserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.cpp,v retrieving revision 1.1.2.3.2.2 retrieving revision 1.1.2.3.2.3 diff -C2 -d -r1.1.2.3.2.2 -r1.1.2.3.2.3 *** openglserver.cpp 1 Jun 2007 13:07:38 -0000 1.1.2.3.2.2 --- openglserver.cpp 17 Jun 2007 10:53:00 -0000 1.1.2.3.2.3 *************** *** 221,222 **** --- 221,232 ---- return mGLSystem->GetWindowHandle(); } + + bool + OpenGLServer::IsGLLocked() const + { + if (mGLSystem.get() == 0) + { + return true; + } + return mGLSystem->IsGLLocked(); + } |
From: Oliver O. <fr...@us...> - 2007-06-17 10:52:28
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29363 Modified Files: Tag: projectx openglserver.h Log Message: - added method IsGLLocked(), to access the same method from the GL subsystem Index: openglserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.h,v retrieving revision 1.1.2.2.2.2 retrieving revision 1.1.2.2.2.3 diff -C2 -d -r1.1.2.2.2.2 -r1.1.2.2.2.3 *** openglserver.h 1 Jun 2007 13:08:12 -0000 1.1.2.2.2.2 --- openglserver.h 17 Jun 2007 10:52:24 -0000 1.1.2.2.2.3 *************** *** 89,92 **** --- 89,95 ---- long int GetWindowHandle() const; + //! return if the GL subsystem locks using OpenGL to get exclusive access + bool IsGLLocked() const; + protected: //! set up opengl viewport |
From: Oliver O. <fr...@us...> - 2007-06-17 10:50:18
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28399 Modified Files: Tag: projectx openglsystem.h Log Message: - added virtual method IsGLLocked(), used to indicate that the GL System wants to prevent direct GL access by other classes Index: openglsystem.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglsystem.h,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -C2 -d -r1.1.2.1.2.1 -r1.1.2.1.2.2 *** openglsystem.h 30 Mar 2007 01:51:57 -0000 1.1.2.1.2.1 --- openglsystem.h 17 Jun 2007 10:50:14 -0000 1.1.2.1.2.2 *************** *** 53,56 **** --- 53,59 ---- virtual unsigned long int GetWindowHandle() const { return 0; } + //! return if the GL subsystem locks using OpenGL to get exclusive access. + virtual bool IsGLLocked() const { return false; } + protected: // |
From: Oliver O. <fr...@us...> - 2007-06-17 10:48:20
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27542 Modified Files: Tag: projectx openglwrapper.h Log Message: for MacOS (at least), glu is needed, too. Index: openglwrapper.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglwrapper.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** openglwrapper.h 28 Feb 2007 04:26:40 -0000 1.1.2.2 --- openglwrapper.h 17 Jun 2007 10:48:14 -0000 1.1.2.2.2.1 *************** *** 41,45 **** #include <GL/wglext.h> #elif defined(__APPLE__) ! /* nothing here */ #else #include <GL/glx.h> --- 41,45 ---- #include <GL/wglext.h> #elif defined(__APPLE__) ! #include <OpenGL/glu.h> #else #include <GL/glx.h> |
From: Oliver O. <fr...@us...> - 2007-06-17 08:49:00
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12375 Modified Files: Tag: projectx renderserver.cpp Log Message: - merged from HEAD - added methods to deliver Width() and Height() of current view - added method to copy current view into a buffer Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.2.2.3.2.1 retrieving revision 1.2.2.3.2.2 diff -C2 -d -r1.2.2.3.2.1 -r1.2.2.3.2.2 *** renderserver.cpp 30 Mar 2007 01:56:19 -0000 1.2.2.3.2.1 --- renderserver.cpp 17 Jun 2007 08:48:56 -0000 1.2.2.3.2.2 *************** *** 1,24 **** /* -*- 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 ! Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group ! $Id$ ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; version 2 of the License. ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #include "renderserver.h" #include <oxygen/sceneserver/sceneserver.h> --- 1,23 ---- /* -*- 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 ! Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group ! $Id$ ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; version 2 of the License. ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "renderserver.h" #include <oxygen/sceneserver/sceneserver.h> *************** *** 37,43 **** --- 36,58 ---- using namespace zeitgeist; + /** OpenGL picking result buffer */ + static GLuint gSelectBuffer[4096]; + RenderServer::RenderServer() : BaseRenderServer() { mAmbientColor = RGBA(0.0,0.0,0.0,0.0); + mEnablePicking = false; + mPickAt = Vector2f(0.0,0.0); + mPickRange = 10.0; + mNextName = 1; + } + + void + RenderServer::PreparePicking() + { + mNameMap.clear(); + mNextName = 1; + glSelectBuffer(sizeof(gSelectBuffer), gSelectBuffer); + mPickedNode.reset(); } *************** *** 45,48 **** --- 60,65 ---- RenderServer::Render() { + PreparePicking(); + if (! GetActiveScene()) { *************** *** 111,114 **** --- 128,254 ---- // reset GL lights glDisable(GL_LIGHTING); + + if (mEnablePicking) + { + ProcessPicks(); + } + } + + + int + RenderServer::Width() const + { + if (mActiveScene.get() == 0) return 0; + + // get camera + shared_ptr<Camera> camera = + shared_static_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); + + if (camera.get() == 0) + { + GetLog()->Error() + << "(RenderServer) ERROR: found no camera node in the active scene\n"; + return 0; + } + return camera->GetViewportWidth(); + } + + int + RenderServer::Height() const + { + if (mActiveScene.get() == 0) return 0; + + // get camera + shared_ptr<Camera> camera = + shared_static_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); + + if (camera.get() == 0) + { + GetLog()->Error() + << "(RenderServer) ERROR: found no camera node in the active scene\n"; + return 0; + } + return camera->GetViewportHeight(); + } + + bool + RenderServer::CopyFrame(char* buffer) const + { + if (mActiveScene.get() == 0) return false; + glReadPixels(0,0,Width()-1,Height()-1,GL_RGB,GL_UNSIGNED_BYTE,buffer); + + size_t len = Width() * 3; + uint8_t* line = new uint8_t[len]; /* one line of packed RGB pixels */ + + unsigned char* a; + unsigned char* b; + + for (int y = 0; y < Height() >> 1; ++y) + { + a = ( unsigned char * ) & buffer[y * len]; + b = ( unsigned char * ) & buffer[(Height() - ( y + 1 )) * len]; + + memcpy(line, a, len); + memcpy(a, b, len); + memcpy(b, line, len); + } + delete[] line; + return true; + } + + void + RenderServer::ProcessPicks() + { + // restoring the original projection matrix + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glFlush(); + + // returning to normal rendering mode + int hits = glRenderMode(GL_RENDER); + + // if there are hits process them + GLuint numberOfNames = 0; + GLuint minZ = 0xffffffff; + GLuint *ptrNames = 0; + + GLuint* ptr = gSelectBuffer; + + for (int i = 0; i < hits; i++) + { + // read number of stored names in the current record + GLuint names = (*ptr); + ptr++; + + if ((*ptr) < minZ) + { + numberOfNames = names; + minZ = *ptr; + ptrNames = ptr+2; + } + + ptr += names+2; + } + + mPickedNode.reset(); + for (;;) + { + if (ptrNames == 0) + { + break; + } + + TGLNameMap::const_iterator iter = mNameMap.find(*ptrNames); + if (iter == mNameMap.end()) + { + break; + } + + mPickedNode = (*iter).second; + break; + } + + mNameMap.clear(); } *************** *** 125,136 **** shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) ! { ! glPushMatrix(); ! glMultMatrixf(node->GetWorldTransform().m); renderNode->RenderInternal(); ! glPopMatrix(); ! } // traverse the the hierarchy --- 265,291 ---- shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) ! { ! glPushMatrix(); ! ! if (mEnablePicking) ! { ! // assign an OpenGL name to the RenderNode ! GLuint name = (mNextName++); ! mNameMap[name] = renderNode; ! glPushName(name); ! } ! ! glMultMatrixf(node->GetWorldTransform().m); renderNode->RenderInternal(); ! if (mEnablePicking) ! { ! // pop name from OpenGL name stack ! glPopName(); ! } ! ! glPopMatrix(); ! } // traverse the the hierarchy *************** *** 163,175 **** glDepthRange(0, 1); ! // setup the projection matrix ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); ! glMultMatrixf(camera->GetProjectionTransform().m); ! // initialize the modelview stack ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! glMultMatrixf(camera->GetViewTransform().m); } --- 318,350 ---- glDepthRange(0, 1); ! if (mEnablePicking) ! { ! glRenderMode(GL_SELECT); ! GLint viewport[4]; ! glGetIntegerv(GL_VIEWPORT, viewport); ! ! glMatrixMode(GL_PROJECTION); ! glPushMatrix(); ! glLoadIdentity(); ! ! gluPickMatrix(mPickAt[0],viewport[3]-mPickAt[1],mPickRange,mPickRange,viewport); ! ! glMultMatrixf(camera->GetProjectionTransform().m); ! glMatrixMode(GL_MODELVIEW); ! ! glInitNames(); ! } else ! { ! // setup the projection matrix ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); ! glMultMatrixf(camera->GetProjectionTransform().m); ! ! // initialize the modelview stack ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! glMultMatrixf(camera->GetViewTransform().m); ! } } *************** *** 179,180 **** --- 354,377 ---- mAmbientColor = ambient; } + + void RenderServer::UpdateCached() + { + mActiveScene.reset(); + } + + void RenderServer::DisablePicking() + { + mEnablePicking = false; + } + + void RenderServer::EnablePicking(bool enable, const Vector2f& pickAt, const double pickRange) + { + mEnablePicking = enable; + mPickAt = pickAt; + mPickRange = pickRange; + } + + weak_ptr<RenderNode> RenderServer::GetPickedNode() const + { + return mPickedNode; + } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:47:54
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11957 Modified Files: Tag: projectx renderserver.h Log Message: - merged from HEAD - added methods to deliver Width() and Height() of current view - added method to copy current view into a buffer Index: renderserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.h,v retrieving revision 1.2.2.2.2.1 retrieving revision 1.2.2.2.2.2 diff -C2 -d -r1.2.2.2.2.1 -r1.2.2.2.2.2 *** renderserver.h 30 Mar 2007 01:57:09 -0000 1.2.2.2.2.1 --- renderserver.h 17 Jun 2007 08:47:51 -0000 1.2.2.2.2.2 *************** *** 40,47 **** --- 40,49 ---- #include <oxygen/sceneserver/sceneserver.h> #include <kerosin/openglserver/glbase.h> + #include <kerosin/openglserver/openglwrapper.h> namespace kerosin { class OpenGLServer; + class RenderNode; class RenderServer : public BaseRenderServer *************** *** 51,54 **** --- 53,59 ---- // public: + typedef std::map<GLuint, boost::weak_ptr<kerosin::RenderNode> > TGLNameMap; + + public: RenderServer(); virtual ~RenderServer() {} *************** *** 57,60 **** --- 62,72 ---- virtual void Render(); + //! @return the width of the current view + virtual int Width() const; + //! @return the width of the height view + virtual int Height() const; + //! Read the current screen content into a buffer + bool CopyFrame(char* buffer) const; + //! render the scene with fancy lighting void RenderFancyLighting(const salt::Frustum& frustum, *************** *** 66,69 **** --- 78,93 ---- void SetAmbientColor(const RGBA& ambient); + /** update variables from a script */ + virtual void UpdateCached(); + + /** If enabled the next render pass is used to pick an object */ + void EnablePicking(bool enable, const salt::Vector2f& pickAt, const double pickRange); + + /** Disables object picking for the next render pass */ + void DisablePicking(); + + /** Returns the last picked node */ + boost::weak_ptr<RenderNode> GetPickedNode() const; + protected: /** render a scene recursively. *************** *** 76,84 **** --- 100,138 ---- void BindCamera(boost::shared_ptr<oxygen::Camera>& camera); + /** clears last intermediate picking state and prepares OpenGL + picking + */ + void PreparePicking(); + + /** processes the collected picking information */ + void ProcessPicks(); + // // Members // protected: + /** reference to the SceneServer */ + CachedPath<oxygen::SceneServer> mSceneServer; + + /** the OpenGL ambient clear color */ RGBA mAmbientColor; + + /** OpenGL name to RenderNode map for object picking */ + TGLNameMap mNameMap; + + /** counter to assign OpenGL names to RenderNodes while picking */ + GLuint mNextName; + + /** true, iff picking is enabled */ + bool mEnablePicking; + + /** the picking position in OpenGL window coordinates */ + salt::Vector2f mPickAt; + + /** the pick radius around mPickAt */ + double mPickRange; + + /** the picked result node */ + boost::weak_ptr<RenderNode> mPickedNode; }; *************** *** 88,89 **** --- 142,149 ---- #endif // KEROSIN_RENDERSERVER_H + + + + + + |
From: Oliver O. <fr...@us...> - 2007-06-17 08:45:04
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10810 Modified Files: Tag: projectx axis.cpp Log Message: merge from HEAD Index: axis.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.cpp,v retrieving revision 1.2.2.1.2.1 retrieving revision 1.2.2.1.2.2 diff -C2 -d -r1.2.2.1.2.1 -r1.2.2.1.2.2 *** axis.cpp 1 Jun 2007 13:21:20 -0000 1.2.2.1.2.1 --- axis.cpp 17 Jun 2007 08:44:59 -0000 1.2.2.1.2.2 *************** *** 30,34 **** } ! void Axis::RenderInternal() { RGBA colX(1,0,0,1); --- 30,34 ---- } ! void Axis::RenderAxis(float size) { RGBA colX(1,0,0,1); *************** *** 41,45 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(mSize,0,0); glEnd(); --- 41,45 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(size,0,0); glEnd(); *************** *** 49,53 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,mSize,0); glEnd(); --- 49,53 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,size,0); glEnd(); *************** *** 58,65 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,0,mSize); glEnd(); } float Axis::GetSize() { --- 58,70 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,0,size); glEnd(); } + void Axis::RenderInternal() + { + RenderAxis(mSize); + } + float Axis::GetSize() { |
From: Oliver O. <fr...@us...> - 2007-06-17 08:44:24
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10759 Modified Files: Tag: projectx axis.h Log Message: merge from HEAD Index: axis.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** axis.h 15 Feb 2006 00:59:02 -0000 1.2 --- axis.h 17 Jun 2007 08:44:19 -0000 1.2.4.1 *************** *** 45,48 **** --- 45,50 ---- virtual void ComputeBoundingBox(); + static void RenderAxis(float size); + protected: virtual void RenderInternal(); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:41:32
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9596 Modified Files: Tag: projectx staticmesh.h Log Message: - added method to set flag if an external mesh should be used (for external GE) - added method to set external mesh name (for external GE) - added method to set external mesh scale Index: staticmesh.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh.h,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -d -r1.1.4.2 -r1.1.4.3 *** staticmesh.h 10 May 2007 10:43:48 -0000 1.1.4.2 --- staticmesh.h 17 Jun 2007 08:41:18 -0000 1.1.4.3 *************** *** 97,100 **** --- 97,126 ---- */ void SetCastShadows(bool shadows); + + /** Set the flag if the GE should use an external mesh for rendering. + By default, using external meshes is switched off. For this to work, + the external mesh name has to be set. + */ + void SetUseExternalMesh(bool external = true); + /** Get the flag if the GE should use an external mesh for rendering. + If set to true, the GE can use a different (possibly more advanced) + mesh. The hint for the kind of external mesh should be given by the + Get/SetExternalMeshName() methods of this class. + */ + bool UseExternalMesh() const; + /** Set the name of the external mesh. + \string name the external mesh name + */ + void SetExternalMeshName(const std::string& name); + /** Get the name of the external mesh to use. + \return the name + */ + const std::string& GetExternalMeshName() const; + //! Set an additional scale for the external mesh + void SetExternalMeshScale(const salt::Vector3f& scale); + /** Get the external mesh scale. + @return the external mesh scale */ + const salt::Vector3f& ExternalMeshScale() const; + // // Members *************** *** 118,121 **** --- 144,154 ---- //! the flag if the mesh should cast shadows bool mCastShadows; + + //! the flag if the GE can use an external mesh + bool mUseExternalMesh; + //! the external mesh name + std::string mExternalMeshName; + //! additional scale factors along each axis for external meshes + salt::Vector3f mExternalMeshScale; }; |
From: Oliver O. <fr...@us...> - 2007-06-17 08:40:29
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9216 Modified Files: Tag: projectx staticmesh.cpp Log Message: - added method to set flag if an external mesh should be used (for external GE) - added method to set external mesh name (for external GE) - added method to set external mesh scale Index: staticmesh.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh.cpp,v retrieving revision 1.2.2.3.2.2 retrieving revision 1.2.2.3.2.3 diff -C2 -d -r1.2.2.3.2.2 -r1.2.2.3.2.3 *** staticmesh.cpp 10 May 2007 10:44:25 -0000 1.2.2.3.2.2 --- staticmesh.cpp 17 Jun 2007 08:40:26 -0000 1.2.2.3.2.3 *************** *** 33,37 **** using namespace oxygen; ! StaticMesh::StaticMesh() : mScale(1.0f,1.0f,1.0f), mCastShadows(true) { } --- 33,41 ---- using namespace oxygen; ! StaticMesh::StaticMesh() : mScale(1.0f,1.0f,1.0f), ! mCastShadows(true), ! mUseExternalMesh(false), ! mExternalMeshName(""), ! mExternalMeshScale(1.0f,1.0f,1.0f) { } *************** *** 247,248 **** --- 251,288 ---- mCastShadows = shadows; } + + void + StaticMesh::SetUseExternalMesh(bool external) + { + mUseExternalMesh = external; + } + + bool + StaticMesh::UseExternalMesh() const + { + return mUseExternalMesh; + } + + void + StaticMesh::SetExternalMeshName(const std::string& name) + { + mExternalMeshName = name; + } + + const std::string& + StaticMesh::GetExternalMeshName() const + { + return mExternalMeshName; + } + + void + StaticMesh::SetExternalMeshScale(const salt::Vector3f& scale) + { + mExternalMeshScale = scale; + } + + const salt::Vector3f& + StaticMesh::ExternalMeshScale() const + { + return mExternalMeshScale; + } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:38:47
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8428 Modified Files: Tag: projectx staticmesh_c.cpp Log Message: - fixed bug with setting the scale of staticmesh - added method to set flag if an external mesh should be used (for external GE) - added method to set external mesh name (for external GE) - added method to set external mesh scale Index: staticmesh_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh_c.cpp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** staticmesh_c.cpp 10 May 2007 10:44:49 -0000 1.1.4.1 --- staticmesh_c.cpp 17 Jun 2007 08:38:43 -0000 1.1.4.2 *************** *** 54,63 **** if ( ! (in.GetSize() == 0) || ! (! in.GetValue(in[0], inScale)) ) ! { ! return false; ! } obj->SetScale(inScale); --- 54,63 ---- if ( ! (in.GetSize() != 3) || ! (! in.GetValue(in.begin(), inScale)) ) ! { ! return false; ! } obj->SetScale(inScale); *************** *** 70,74 **** if ( ! (in.GetSize() == 0) || (! in.GetValue(in[0], shadows)) ) --- 70,74 ---- if ( ! (in.GetSize() != 1) || (! in.GetValue(in[0], shadows)) ) *************** *** 81,84 **** --- 81,133 ---- } + FUNCTION(StaticMesh,setUseExternalMesh) + { + bool external; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], external)) + ) + { + return false; + } + + obj->SetUseExternalMesh(external); + return true; + } + + + FUNCTION(StaticMesh,setExternalMeshName) + { + std::string name; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], name)) + ) + { + return false; + } + obj->SetExternalMeshName(name); + return true; + } + + FUNCTION(StaticMesh,setExternalMeshScale) + { + Vector3f inScale; + std::cerr << "*********************************************************************************\n"; + if ( + (in.GetSize() != 3) || + (! in.GetValue(in.begin(), inScale)) + ) + { + return false; + } + std::cerr << "setting External Mesh scale to " << inScale << "\n*********************************************************************************\n"; + + obj->SetExternalMeshScale(inScale); + return true; + } + void CLASS(StaticMesh)::DefineClass() { *************** *** 87,89 **** --- 136,141 ---- DEFINE_FUNCTION(setScale); DEFINE_FUNCTION(setCastShadows) + DEFINE_FUNCTION(setUseExternalMesh) + DEFINE_FUNCTION(setExternalMeshName) + DEFINE_FUNCTION(setExternalMeshScale) } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:36:11
|
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; |
From: Oliver O. <fr...@us...> - 2007-06-17 08:35:27
|
Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6843 Modified Files: Tag: projectx texture.h Log Message: - added flag to constructor if gL methods should be used Index: texture.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** texture.h 28 Feb 2007 04:21:06 -0000 1.1.2.2 --- texture.h 17 Jun 2007 08:35:01 -0000 1.1.2.2.2.1 *************** *** 58,62 **** // public: ! Texture(); virtual ~Texture(); --- 58,62 ---- // public: ! Texture(bool use_gl = false); virtual ~Texture(); *************** *** 97,106 **** //! OpenGL texture handle GLuint mTexID; - //! width of texture unsigned int mWidth; - //! height of texture unsigned int mHeight; }; --- 97,106 ---- //! OpenGL texture handle GLuint mTexID; //! width of texture unsigned int mWidth; //! height of texture unsigned int mHeight; + //! flag if we want to access OpenGL + bool mUseGL; }; |
From: Oliver O. <fr...@us...> - 2007-06-17 08:34:25
|
Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6826 Modified Files: Tag: projectx texture2d.cpp Log Message: added flag to constructor if GL methods should be used Index: texture2d.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture2d.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** texture2d.cpp 23 Feb 2007 19:21:10 -0000 1.1.2.2 --- texture2d.cpp 17 Jun 2007 08:34:22 -0000 1.1.2.2.2.1 *************** *** 1,22 **** /* -*- 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 ! Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group ! $Id$ ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; version 2 of the License. ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "texture2d.h" --- 1,22 ---- /* -*- 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 ! Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group ! $Id$ ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; version 2 of the License. ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "texture2d.h" *************** *** 26,30 **** using namespace kerosin; ! Texture2D::Texture2D() : Texture() { } --- 26,30 ---- using namespace kerosin; ! Texture2D::Texture2D(bool use_gl) : Texture(use_gl) { } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:33:48
|
Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6446 Modified Files: Tag: projectx texture2d.h Log Message: - added flag to constructor if GL methods should be used Index: texture2d.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture2d.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** texture2d.h 16 Feb 2007 15:40:52 -0000 1.1.2.1 --- texture2d.h 17 Jun 2007 08:33:45 -0000 1.1.2.1.2.1 *************** *** 36,40 **** // public: ! Texture2D(); ~Texture2D(); --- 36,40 ---- // public: ! Texture2D(bool use_gl = false); ~Texture2D(); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:32:52
|
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); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:26:18
|
Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3726 Modified Files: Tag: projectx textureserver.h Log Message: removed reference to GLServer Index: textureserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/textureserver.h,v retrieving revision 1.1.2.1.2.2 retrieving revision 1.1.2.1.2.3 diff -C2 -d -r1.1.2.1.2.2 -r1.1.2.1.2.3 *** textureserver.h 1 Jun 2007 13:25:15 -0000 1.1.2.1.2.2 --- textureserver.h 17 Jun 2007 08:26:15 -0000 1.1.2.1.2.3 *************** *** 69,77 **** virtual ~TextureServer(); - /** retrieve pointer to the OpenGL server ... used by Textures to - check extensions - */ - boost::shared_ptr<OpenGLServer> GetOpenGLServer() const; - /** load (or returned cached) texture */ boost::shared_ptr<Texture> GetTexture(const std::string &name); --- 69,72 ---- *************** *** 81,87 **** virtual void OnLink(); - /** reset OpenGLServer and ImageServer reference */ - // virtual void OnUnlink(); - // // members --- 76,79 ---- *************** *** 90,94 **** /** reference to the ImageServer */ CachedPath<ImageServer> mImageServer; ! /** registry of cached textures */ TTextureCache mTextureCache; --- 82,87 ---- /** reference to the ImageServer */ CachedPath<ImageServer> mImageServer; ! /** reference to the OpenGLServer */ ! CachedPath<OpenGLServer> mOpenGLServer; /** registry of cached textures */ TTextureCache mTextureCache; |