From 5e396d40e1e56583eed08e92bbf58d6a3309e766 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 5 Mar 2003 21:02:37 +0000 Subject: [PATCH] Made the State::setInterleavedArrays method use a const GLvoid*. --- include/osg/State | 2 +- src/osg/State.cpp | 2 +- src/osgSim/LightPointDrawable.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/osg/State b/include/osg/State index 0c9907c7b..bf8453c54 100644 --- a/include/osg/State +++ b/include/osg/State @@ -248,7 +248,7 @@ class SG_EXPORT State : public Referenced /** Wrapper around glInterleavedArrays(..). * also resets the internal array points and modes within osg::State to keep the other * vertex array operations consistent. */ - void setInterleavedArrays( GLenum format, GLsizei stride, void* pointer); + void setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* pointer); /** wrapper around glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(..); diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 99ff88ff5..b7af8a497 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -504,7 +504,7 @@ void State::dirtyAllVertexArrays() dirtySecondaryColorPointer(); } -void State::setInterleavedArrays( GLenum format, GLsizei stride, void* pointer) +void State::setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* pointer) { glInterleavedArrays( format, stride, pointer); diff --git a/src/osgSim/LightPointDrawable.cpp b/src/osgSim/LightPointDrawable.cpp index df13df4af..b5df2d82a 100644 --- a/src/osgSim/LightPointDrawable.cpp +++ b/src/osgSim/LightPointDrawable.cpp @@ -108,8 +108,8 @@ void LightPointDrawable::drawImplementation(osg::State& state) const if (!lpl.empty()) { glPointSize(pointsize); - glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); - //state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + //glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); glDrawArrays(GL_POINTS,0,lpl.size()); } } @@ -129,8 +129,8 @@ void LightPointDrawable::drawImplementation(osg::State& state) const if (!lpl.empty()) { glPointSize(pointsize); - glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); - //state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + //glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); glDrawArrays(GL_POINTS,0,lpl.size()); } } @@ -148,8 +148,8 @@ void LightPointDrawable::drawImplementation(osg::State& state) const { //state.applyMode(GL_POINT_SMOOTH,pointsize!=1); glPointSize(pointsize); - glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); - //state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + //glInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); + state.setInterleavedArrays(GL_C4UB_V3F,0,&lpl.front()); glDrawArrays(GL_POINTS,0,lpl.size()); } }