diff options
author | Brian Paul <[email protected]> | 2008-06-25 08:45:14 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-25 08:45:14 -0600 |
commit | d378f7b3dfda3b549e4b02380e492671cc34bb59 (patch) | |
tree | 8fe372ac889e42465f7e7173ebf20aa2ea18a3e5 /src/mesa/main/varray.c | |
parent | 0561a293b6596641c0200df7e6580599ecb8b111 (diff) |
mesa: point size arrays
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 220db35855f..50fe8745563 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -468,6 +468,37 @@ _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr) } +void GLAPIENTRY +_mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr) +{ + GLsizei elementSize; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + if (stride < 0) { + _mesa_error( ctx, GL_INVALID_VALUE, "glPointSizePointer(stride)" ); + return; + } + + switch (type) { + case GL_FLOAT: + elementSize = sizeof(GLfloat); + break; +#if FEATURE_fixedpt + case GL_FIXED: + elementSize = sizeof(GLfixed); + break; +#endif + default: + _mesa_error( ctx, GL_INVALID_ENUM, "glPointSizePointer(type)" ); + return; + } + + update_array(ctx, &ctx->Array.ArrayObj->PointSize, _NEW_ARRAY_POINT_SIZE, + elementSize, 1, type, stride, GL_FALSE, ptr); +} + + #if FEATURE_NV_vertex_program void GLAPIENTRY _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, |