From: <re...@us...> - 2003-09-25 19:26:46
|
Update of /cvsroot/crystal/CS/plugins/video/render3d/shadermgr In directory sc8-pr-cvs1:/tmp/cvs-serv918/plugins/video/render3d/shadermgr Modified Files: shadermgr.cpp shadermgr.h Log Message: Made the following changes: - Fixed walktest for recent iCamera->GetHit() removal. - Added Jamfiles for duhprey's CLOD plugin. - Added a patch from John Harger <jo...@se...> which enhances the glshader_arb plugin with fragment program support. - Added "polygon buffers" to the NR. You can compare it to the polygon buffers of the OR; you feed in some polygons, and get out a render buffer source you have specify in the csRenderMesh structure. The 'mesh type' has to be 'POLYGON'. - In the csRenderMesh structure, the 'transform' member was renamed to the more speaking 'object2camera'. - Brought the NR SW renderer up-to-date. - Added polygon drawing to NR SW. Still veeery crude. - Some GL extensions are now inited in the plugins which actually use them. - Fixed the problem that the shader manager only accepted technique priorities > 0. Index: shadermgr.cpp =================================================================== RCS file: /cvsroot/crystal/CS/plugins/video/render3d/shadermgr/shadermgr.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- shadermgr.cpp 13 Sep 2003 05:56:10 -0000 1.59 +++ shadermgr.cpp 25 Sep 2003 19:15:05 -0000 1.60 @@ -19,6 +19,7 @@ #include "cssysdef.h" +#include <limits.h> #include "cstypes.h" #include "csutil/ref.h" #include "csutil/scf.h" @@ -131,7 +132,7 @@ csRef<iEventQueue> q = CS_QUERY_REGISTRY (objectreg, iEventQueue); if (q) q->RegisterListener (scfiEventHandler, - CSMASK_Broadcast | CSMASK_FrameProcess); + CSMASK_Broadcast); csRef<iPluginManager> plugin_mgr = CS_QUERY_REGISTRY (objectreg, iPluginManager); @@ -151,6 +152,7 @@ { Report (CS_REPORTER_SEVERITY_NOTIFY, "Loaded plugin %s", classname); pluginlist.Push (plugin); + // @@@ Really, shouldn't that be called in Open()? plugin->Open (); } } @@ -163,6 +165,14 @@ return true; } +void csShaderManager::Open () +{ +} + +void csShaderManager::Close () +{ +} + bool csShaderManager::HandleEvent(iEvent& event) { if (event.Type == csevBroadcast) @@ -170,8 +180,18 @@ switch(event.Command.Code) { case cscmdPreProcess: -// UpdateStandardVariables(); - return false; + // UpdateStandardVariables(); + return false; + case cscmdSystemOpen: + { + Open (); + return true; + } + case cscmdSystemClose: + { + Close (); + return true; + } } } return false; @@ -331,7 +351,7 @@ iShaderTechnique* csShader::GetBestTechnique() { int i; - int maxpriority = 0; + int maxpriority = INT_MIN; iShaderTechnique* tech = 0; for (i = 0; i < techniques->Length(); ++i) Index: shadermgr.h =================================================================== RCS file: /cvsroot/crystal/CS/plugins/video/render3d/shadermgr/shadermgr.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- shadermgr.h 13 Sep 2003 05:56:10 -0000 1.42 +++ shadermgr.h 25 Sep 2003 19:15:05 -0000 1.43 @@ -112,6 +112,9 @@ csShaderManager(iBase* parent); virtual ~csShaderManager(); + void Open (); + void Close (); + //==================== iShaderManager ================// /// Create a empty shader |