Skip to content
This repository
Newer
Older
100644 20 lines (13 sloc) 0.454 kb
b9defa99 » stefan
2005-07-31 Import Holger Waechtler's PSP OpenGL ES implementation.
1 #include "pspgl_internal.h"
2
3
4 static const char stenciltestfunc_mapping [] = { 0, 4, 2, 5, 6, 3, 7, 1 };
5
6 void glStencilFunc( GLenum func, GLint ref, GLuint mask)
7 {
8 unsigned char sref = (unsigned char) ref;
9
809f3d6d » jsgf
2006-01-14 This change does two things:
10 if (unlikely(func < GL_NEVER) || unlikely(func > GL_ALWAYS))
11 goto out_error;
b9defa99 » stefan
2005-07-31 Import Holger Waechtler's PSP OpenGL ES implementation.
12
13 func &= 0x0007;
14
f83c85d0 » jsgf
2005-11-05 Convert manifest constants for things like commands to symbolic const…
15 sendCommandi(CMD_STENCIL_FUNC, (mask << 16) | (sref << 8) | stenciltestfunc_mapping[func]);
809f3d6d » jsgf
2006-01-14 This change does two things:
16 return;
17
18 out_error:
19 GLERROR(GL_INVALID_ENUM);
b9defa99 » stefan
2005-07-31 Import Holger Waechtler's PSP OpenGL ES implementation.
20 }
daeefacc » holger
2005-09-17 use register 220, not 219 -- thanks to Jeremy for tracking this down
21
Something went wrong with that request. Please try again.