Changeset 9407 for code/branches/shaders
- Timestamp:
- Oct 21, 2012, 5:32:00 PM (12 years ago)
- Location:
- code/branches/shaders/src/orxonox
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/orxonox/CMakeLists.txt
r9348 r9407 37 37 CameraManager.cc 38 38 Scene.cc 39 RenderQueueListener.cc 39 40 END_BUILD_UNIT 40 41 ) -
code/branches/shaders/src/orxonox/OrxonoxPrereqs.h
r9348 r9407 76 76 class PlayerManager; 77 77 class Radar; 78 class RenderQueueListener; 78 79 class Scene; 79 80 -
code/branches/shaders/src/orxonox/Scene.cc
r9348 r9407 48 48 #include "worldentities/WorldEntity.h" 49 49 #include "Level.h" 50 #include "RenderQueueListener.h" 50 51 51 52 namespace orxonox … … 66 67 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC); 67 68 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 69 RenderQueueListener* renderQueueListener = new RenderQueueListener(); 70 this->sceneManager_->addRenderQueueListener(renderQueueListener);//add our own renderQueueListener 68 71 69 72 this->radar_ = new Radar(); -
code/branches/shaders/src/orxonox/graphics/Model.cc
r9402 r9407 44 44 45 45 Model::Model(BaseObject* creator) : 46 StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15f)46 StaticEntity(creator), bCastShadows_(true), renderQueueGroup_(RENDER_QUEUE_STENCIL_OBJECTS), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15f) 47 47 { 48 48 RegisterObject(Model); … … 71 71 72 72 XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 73 XMLPortParam(Model, "renderQueueGroup", setRenderQueueGroup, getRenderQueueGroup, xmlelement, mode); 73 74 XMLPortParam(Model, "material", setMaterial, getMaterial, xmlelement, mode); 74 75 XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); … … 78 79 { 79 80 registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedMesh)); 81 registerVariable(this->renderQueueGroup_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedRenderQueueGroup)); 82 registerVariable(this->materialName_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedMaterial)); 80 83 registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedShadows)); 81 84 } … … 108 111 if (this->bGlobalEnableLod_) 109 112 this->enableLod(); 113 } 114 } 115 } 116 117 void Model::changedRenderQueueGroup() 118 { 119 if (GameMode::showsGraphics()) 120 { 121 if (this->mesh_.getEntity()) 122 { 123 this->mesh_.getEntity()->setRenderQueueGroup(this->renderQueueGroup_); 110 124 } 111 125 } -
code/branches/shaders/src/orxonox/graphics/Model.h
r9402 r9407 34 34 #include <string> 35 35 #include "tools/Mesh.h" 36 #include "RenderQueueListener.h" 36 37 #include "worldentities/StaticEntity.h" 37 38 … … 58 59 { return this->meshSrc_; } 59 60 61 //TODO: let this function accept strings instead of ints for the XML Port, so we don't have to rely on static int values which may change in future Ogre revisions 62 inline void setRenderQueueGroup(const int renderQueueGroup) 63 { this->renderQueueGroup_ = renderQueueGroup; this->changedRenderQueueGroup(); } 64 inline const int getRenderQueueGroup() const 65 { return this->renderQueueGroup_; } 66 60 67 inline void setCastShadows(bool bCastShadows) 61 68 { this->bCastShadows_ = bCastShadows; this->changedShadows(); } … … 71 78 void registerVariables(); 72 79 void changedMesh(); 80 void changedRenderQueueGroup(); 73 81 void changedMaterial(); 74 82 void changedShadows(); … … 86 94 Mesh mesh_; 87 95 bool bCastShadows_; 96 int renderQueueGroup_; 88 97 std::string materialName_; 89 98
Note: See TracChangeset
for help on using the changeset viewer.