From Mathias Froehlich, "Attached is a change to the slow path geometry dispatch tables that allows the
use of 3 component float color vectors."
This commit is contained in:
@@ -74,6 +74,7 @@ class OSG_EXPORT GLBeginEndAdapter
|
||||
_color.set(red,green,blue,alpha);
|
||||
}
|
||||
|
||||
void Color3fv(const GLfloat* c) { Color4f(c[0], c[1], c[2], 1); }
|
||||
void Color4fv(const GLfloat* c) { Color4f(c[0], c[1], c[2], c[3]); }
|
||||
void Color4ubv(const GLubyte* c) { const float div = 1.0f/255.0f; Color4f(float(c[0])*div, float(c[1])*div, float(c[2])*div, float(c[3])*div); }
|
||||
|
||||
|
||||
@@ -432,6 +432,7 @@ void ArrayDispatchers::init()
|
||||
_vertexDispatchers->assignGLBeginEnd<GLdouble>(Array::Vec3dArrayType, &GLBeginEndAdapter::Vertex3dv, 3);
|
||||
_normalDispatchers->assignGLBeginEnd<GLfloat>(Array::Vec3ArrayType, &GLBeginEndAdapter::Normal3fv, 3);
|
||||
_colorDispatchers->assignGLBeginEnd<GLubyte>(Array::Vec4ubArrayType, &GLBeginEndAdapter::Color4ubv, 4);
|
||||
_colorDispatchers->assignGLBeginEnd<GLfloat>(Array::Vec3ArrayType, &GLBeginEndAdapter::Color3fv, 3);
|
||||
_colorDispatchers->assignGLBeginEnd<GLfloat>(Array::Vec4ArrayType, &GLBeginEndAdapter::Color4fv, 4);
|
||||
|
||||
#ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE
|
||||
|
||||
Reference in New Issue
Block a user