Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (13 sloc) 0.454 kB
b9defa9 Import Holger Waechtler's PSP OpenGL ES implementation.
stefan authored
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
809f3d6 This change does two things:
jsgf authored
10 if (unlikely(func < GL_NEVER) || unlikely(func > GL_ALWAYS))
11 goto out_error;
b9defa9 Import Holger Waechtler's PSP OpenGL ES implementation.
stefan authored
12
13 func &= 0x0007;
14
f83c85d Convert manifest constants for things like commands to symbolic const…
jsgf authored
15 sendCommandi(CMD_STENCIL_FUNC, (mask << 16) | (sref << 8) | stenciltestfunc_mapping[func]);
809f3d6 This change does two things:
jsgf authored
16 return;
17
18 out_error:
19 GLERROR(GL_INVALID_ENUM);
b9defa9 Import Holger Waechtler's PSP OpenGL ES implementation.
stefan authored
20 }
daeefac use register 220, not 219 -- thanks to Jeremy for tracking this down
holger authored
21
Something went wrong with that request. Please try again.