summaryrefslogtreecommitdiff
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-25 08:45:14 -0600
committerKeith Whitwell <keith@tungstengraphics.com>2008-09-21 22:13:56 -0700
commit1cf2c8a04313b80a01ef23b06993586ce62281a4 (patch)
treea3ad06397a2a694e0c7fc3ff185b49554dfe9abf /src/mesa/main/varray.c
parentf8e50dd796a72c396bb22d414feba75c426c5e7e (diff)
mesa: point size arrays
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 5194523c24..2886dfe591 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -463,6 +463,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,