Commit 5e5f41fc authored by Jan Möbius's avatar Jan Möbius
Browse files

Rename of the new render object getter functions.

refs #901

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14736 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0452c6a8
...@@ -1100,7 +1100,7 @@ void DrawMeshT<Mesh>::bindBuffers() ...@@ -1100,7 +1100,7 @@ void DrawMeshT<Mesh>::bindBuffers()
} }
template <class Mesh> template <class Mesh>
void DrawMeshT<Mesh>::bindBuffers2(RenderObject* _obj) void DrawMeshT<Mesh>::bindBuffersToRenderObject(RenderObject* _obj)
{ {
// rebuild if necessary // rebuild if necessary
if (!numTris_ || ! numVerts_ || !subsets_) rebuild_ = REBUILD_FULL; if (!numTris_ || ! numVerts_ || !subsets_) rebuild_ = REBUILD_FULL;
...@@ -1187,10 +1187,10 @@ void DrawMeshT<Mesh>::draw(std::map< int, GLuint>* _textureMap) ...@@ -1187,10 +1187,10 @@ void DrawMeshT<Mesh>::draw(std::map< int, GLuint>* _textureMap)
template <class Mesh> template <class Mesh>
void ACG::DrawMeshT<Mesh>::draw2( RenderObject* _objOut, std::map< int, GLuint>* _textureMap ) void ACG::DrawMeshT<Mesh>::getTriRenderObjects( RenderObject* _objOut, std::map< int, GLuint>* _textureMap )
{ {
// binding buffers to opengl is obsolute here, but it keeps the vbo up to date for now // binding buffers to opengl is obsolute here, but it keeps the vbo up to date for now
bindBuffers2(_objOut); bindBuffersToRenderObject(_objOut);
_objOut->glDrawElements(GL_TRIANGLES, numTris_ * 3, indexType_, 0); _objOut->glDrawElements(GL_TRIANGLES, numTris_ * 3, indexType_, 0);
...@@ -1239,9 +1239,9 @@ void DrawMeshT<Mesh>::drawLines() ...@@ -1239,9 +1239,9 @@ void DrawMeshT<Mesh>::drawLines()
template <class Mesh> template <class Mesh>
void DrawMeshT<Mesh>::drawLines2(RenderObject* _objOut) void DrawMeshT<Mesh>::getLineRenderObjects(RenderObject* _objOut)
{ {
bindBuffers2(_objOut); bindBuffersToRenderObject(_objOut);
if (mesh_.n_edges()) if (mesh_.n_edges())
{ {
...@@ -1263,9 +1263,9 @@ void DrawMeshT<Mesh>::drawVertices() ...@@ -1263,9 +1263,9 @@ void DrawMeshT<Mesh>::drawVertices()
} }
template <class Mesh> template <class Mesh>
void DrawMeshT<Mesh>::drawVertices2(RenderObject* _objOut) void DrawMeshT<Mesh>::getPointRenderObjects(RenderObject* _objOut)
{ {
bindBuffers2(_objOut); bindBuffersToRenderObject(_objOut);
if (numVerts_) if (numVerts_)
_objOut->glDrawArrays(GL_POINTS, 0, numVerts_); _objOut->glDrawArrays(GL_POINTS, 0, numVerts_);
......
...@@ -168,7 +168,7 @@ public: ...@@ -168,7 +168,7 @@ public:
/** \brief eventually rebuilds buffers used for rendering and binds index and vertex buffer /** \brief eventually rebuilds buffers used for rendering and binds index and vertex buffer
*/ */
void bindBuffers2(RenderObject* _obj); void bindBuffersToRenderObject(RenderObject* _obj);
/** \brief disables vertex, normal, texcoord and color pointers in OpenGL /** \brief disables vertex, normal, texcoord and color pointers in OpenGL
*/ */
...@@ -187,7 +187,7 @@ public: ...@@ -187,7 +187,7 @@ public:
* @param _textureMap maps from internally texture-id to OpenGL texture id * @param _textureMap maps from internally texture-id to OpenGL texture id
* may be null to disable textured rendering * may be null to disable textured rendering
*/ */
void draw2(RenderObject* _objOut, std::map< int, GLuint>* _textureMap); void getTriRenderObjects(RenderObject* _objOut, std::map< int, GLuint>* _textureMap);
/** \brief render the mesh in wireframe mode /** \brief render the mesh in wireframe mode
*/ */
...@@ -195,7 +195,7 @@ public: ...@@ -195,7 +195,7 @@ public:
/** \brief render the mesh in wireframe mode, deferred draw call /** \brief render the mesh in wireframe mode, deferred draw call
*/ */
void drawLines2(RenderObject* _objOut); void getLineRenderObjects(RenderObject* _objOut);
/** \brief render vertices only /** \brief render vertices only
...@@ -204,7 +204,7 @@ public: ...@@ -204,7 +204,7 @@ public:
/** \brief render vertices only, deferred draw call /** \brief render vertices only, deferred draw call
*/ */
void drawVertices2(RenderObject* _objOut); void getPointRenderObjects(RenderObject* _objOut);
unsigned int getNumTris() const {return numTris_;} unsigned int getNumTris() const {return numTris_;}
......
...@@ -191,7 +191,7 @@ public: ...@@ -191,7 +191,7 @@ public:
* *
* \note You should not draw anything yourself in this function. * \note You should not draw anything yourself in this function.
*/ */
virtual void draw2(IRenderer* /*_renderer*/, GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {} virtual void getRenderObjects(IRenderer* /*_renderer*/, GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {}
/** The leave function is used to restore GL states the have been changed. /** The leave function is used to restore GL states the have been changed.
This function must restore the status before enter() ! This function must restore the status before enter() !
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment