Skip to content
Newer
Older
100644 29 lines (22 sloc) 620 Bytes
b9defa9 Import Holger Waechtler's PSP OpenGL ES implementation.
stefan authored
1 #include "pspgl_internal.h"
2
3
4 void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
5 {
6e4424e Implement OpenGL 1.1 vertex arrays. Implements glDrawArrays and
jsgf authored
6 if (size < 2 || size > 4) {
7 GLERROR(GL_INVALID_VALUE);
8 return;
9 }
10
11 if (type != GL_BYTE && type != GL_SHORT && type != GL_FLOAT) {
12 GLERROR(GL_INVALID_ENUM);
13 return;
14 }
15
16 if (stride < 0) {
17 GLERROR(GL_INVALID_VALUE);
18 return;
19 }
20
21 if (stride == 0)
22 stride = __pspgl_gl_sizeof(type) * size;
23
b9defa9 Import Holger Waechtler's PSP OpenGL ES implementation.
stefan authored
24 pspgl_curctx->vertex_array.vertex.size = size;
25 pspgl_curctx->vertex_array.vertex.type = type;
26 pspgl_curctx->vertex_array.vertex.stride = stride;
27 pspgl_curctx->vertex_array.vertex.ptr = pointer;
28 }
Something went wrong with that request. Please try again.