Changeset 3089 for code/trunk/src/orxonox/tools
- Timestamp:
- May 27, 2009, 4:11:31 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/map (added) merged: 2802,2812,2837-2838,2856,2913,2942,2956,2977,3082
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/tools/CMakeLists.txt
r2896 r3089 8 8 Timer.cc 9 9 WindowEventListener.cc 10 DynamicLines.cpp 11 DynamicRenderable.cpp 10 12 ) -
code/trunk/src/orxonox/tools/DynamicLines.cpp
- Property svn:eol-style set to native
r3087 r3089 6 6 using namespace Ogre; 7 7 8 namespace orxonox 9 { 8 10 enum { 9 11 POSITION_BINDING, … … 81 83 prepareHardwareBuffers(size,0); 82 84 83 if (!size) { 85 if (!size) { 84 86 mBox.setExtents(Vector3::ZERO,Vector3::ZERO); 85 87 mDirty=false; 86 88 return; 87 89 } 88 90 89 91 Vector3 vaabMin = mPoints[0]; 90 92 Vector3 vaabMax = mPoints[0]; … … 141 143 } 142 144 */ 145 } -
code/trunk/src/orxonox/tools/DynamicLines.h
- Property svn:eol-style set to native
r3087 r3089 5 5 #include <vector> 6 6 7 7 namespace orxonox 8 { 8 9 class DynamicLines : public DynamicRenderable 9 10 { … … 36 37 void clear(); 37 38 38 /// Call this to update the hardware buffer after making changes. 39 /// Call this to update the hardware buffer after making changes. 39 40 void update(); 40 41 41 42 /** Set the type of operation to draw with. 42 * @param opType Can be one of 43 * @param opType Can be one of 43 44 * - RenderOperation::OT_LINE_STRIP 44 45 * - RenderOperation::OT_LINE_LIST … … 62 63 bool mDirty; 63 64 }; 64 65 } 65 66 66 67 #endif -
code/trunk/src/orxonox/tools/DynamicRenderable.cpp
- Property svn:eol-style set to native
r3087 r3089 5 5 using namespace Ogre; 6 6 7 namespace orxonox 8 { 7 9 DynamicRenderable::DynamicRenderable() 8 10 { … … 33 35 } 34 36 35 void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount, 37 void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount, 36 38 size_t indexCount) 37 39 { … … 57 59 newVertCapacity >>= 1; 58 60 } 59 if (newVertCapacity != mVertexBufferCapacity) 61 if (newVertCapacity != mVertexBufferCapacity) 60 62 { 61 63 mVertexBufferCapacity = newVertCapacity; … … 94 96 95 97 } 96 else if (indexCount < newIndexCapacity>>1) 98 else if (indexCount < newIndexCapacity>>1) 97 99 { 98 100 // Make capacity the previous power of two … … 132 134 return vDist.squaredLength(); 133 135 } 136 } -
code/trunk/src/orxonox/tools/DynamicRenderable.h
- Property svn:eol-style set to native
r3087 r3089 4 4 #include <OgreSimpleRenderable.h> 5 5 6 namespace orxonox 7 { 6 8 /// Abstract base class providing mechanisms for dynamically growing hardware buffers. 7 9 class DynamicRenderable : public Ogre::SimpleRenderable … … 66 68 virtual void fillHardwareBuffers() = 0; 67 69 }; 70 } 68 71 69 72 #endif // DYNAMIC_RENDERABLE_H
Note: See TracChangeset
for help on using the changeset viewer.