Prefix some non-static private functions with '_gl'
This commit is contained in:
parent
2382126603
commit
926214bd82
20
GL/draw.c
20
GL/draw.c
|
@ -19,7 +19,7 @@ static AttribPointer DIFFUSE_POINTER;
|
|||
static GLuint ENABLED_VERTEX_ATTRIBUTES = 0;
|
||||
static GLubyte ACTIVE_CLIENT_TEXTURE = 0;
|
||||
|
||||
void initAttributePointers() {
|
||||
void _glInitAttributePointers() {
|
||||
TRACE();
|
||||
|
||||
VERTEX_POINTER.ptr = NULL;
|
||||
|
@ -263,12 +263,12 @@ static inline IndexParseFunc _calcParseIndexFunc(GLenum type) {
|
|||
|
||||
|
||||
static inline void transformToEyeSpace(GLfloat* point) {
|
||||
_matrixLoadModelView();
|
||||
_glMatrixLoadModelView();
|
||||
mat_trans_single3_nodiv(point[0], point[1], point[2]);
|
||||
}
|
||||
|
||||
static inline void transformNormalToEyeSpace(GLfloat* normal) {
|
||||
_matrixLoadNormal();
|
||||
_glMatrixLoadNormal();
|
||||
mat_trans_normal3(normal[0], normal[1], normal[2]);
|
||||
}
|
||||
|
||||
|
@ -933,7 +933,7 @@ static void transform(ClipVertex* output, const GLsizei count) {
|
|||
|
||||
ClipVertex* vertex = output;
|
||||
|
||||
_applyRenderMatrix(); /* Apply the Render Matrix Stack */
|
||||
_glApplyRenderMatrix(); /* Apply the Render Matrix Stack */
|
||||
|
||||
GLsizei i = count;
|
||||
while(i--) {
|
||||
|
@ -1021,10 +1021,10 @@ static void light(ClipVertex* output, const GLsizei count) {
|
|||
ClipVertex* vertex = output;
|
||||
EyeSpaceData* eye_space = (EyeSpaceData*) eye_space_data->data;
|
||||
|
||||
_matrixLoadModelView();
|
||||
_glMatrixLoadModelView();
|
||||
mat_transform3(vertex->xyz, eye_space->xyz, count, sizeof(ClipVertex), sizeof(EyeSpaceData));
|
||||
|
||||
_matrixLoadNormal();
|
||||
_glMatrixLoadNormal();
|
||||
mat_transform_normal3(vertex->nxyz, eye_space->n, count, sizeof(ClipVertex), sizeof(EyeSpaceData));
|
||||
|
||||
GLsizei i;
|
||||
|
@ -1111,7 +1111,7 @@ static void submitVertices(GLenum mode, GLsizei first, GLsizei count, GLenum typ
|
|||
profiler_push(__func__);
|
||||
|
||||
|
||||
PolyList* activeList = activePolyList();
|
||||
PolyList* activeList = _glActivePolyList();
|
||||
|
||||
/* Make room in the list buffer */
|
||||
GLsizei spaceNeeded = (mode == GL_POLYGON || mode == GL_TRIANGLE_FAN) ? ((count - 2) * 3) : count;
|
||||
|
@ -1183,7 +1183,7 @@ static void submitVertices(GLenum mode, GLsizei first, GLsizei count, GLenum typ
|
|||
|
||||
profiler_checkpoint("divide");
|
||||
|
||||
push(header, start, spaceNeeded, activePolyList(), 0);
|
||||
push(header, start, spaceNeeded, _glActivePolyList(), 0);
|
||||
|
||||
profiler_checkpoint("push");
|
||||
/*
|
||||
|
@ -1212,7 +1212,7 @@ static void submitVertices(GLenum mode, GLsizei first, GLsizei count, GLenum typ
|
|||
(hence the - 1)
|
||||
*/
|
||||
ClipVertex* vertex = aligned_vector_push_back(
|
||||
&transparentPolyList()->vector, start - 1, spaceNeeded + 1
|
||||
&_glTransparentPolyList()->vector, start - 1, spaceNeeded + 1
|
||||
);
|
||||
|
||||
PVRHeader* mtHeader = (PVRHeader*) vertex++;
|
||||
|
@ -1240,7 +1240,7 @@ static void submitVertices(GLenum mode, GLsizei first, GLsizei count, GLenum typ
|
|||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
/* Send the buffer again to the transparent list */
|
||||
push(mtHeader, mtStart, spaceNeeded, transparentPolyList(), 1);
|
||||
push(mtHeader, mtStart, spaceNeeded, _glTransparentPolyList(), 1);
|
||||
|
||||
/* Reset state */
|
||||
glDepthFunc(depthFunc);
|
||||
|
|
18
GL/flush.c
18
GL/flush.c
|
@ -38,7 +38,7 @@ static void pvr_list_submit(void *src, int n) {
|
|||
d[0] = d[8] = 0;
|
||||
}
|
||||
|
||||
static void _initPVR() {
|
||||
static void _glInitPVR() {
|
||||
pvr_init_params_t params = {
|
||||
/* Enable opaque and translucent polygons with size 32 and 32 */
|
||||
{ PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32 },
|
||||
|
@ -52,7 +52,7 @@ static void _initPVR() {
|
|||
}
|
||||
|
||||
|
||||
PolyList* activePolyList() {
|
||||
PolyList* _glActivePolyList() {
|
||||
if(isBlendingEnabled()) {
|
||||
return &TR_LIST;
|
||||
} else {
|
||||
|
@ -60,23 +60,23 @@ PolyList* activePolyList() {
|
|||
}
|
||||
}
|
||||
|
||||
PolyList *transparentPolyList() {
|
||||
PolyList *_glTransparentPolyList() {
|
||||
return &TR_LIST;
|
||||
}
|
||||
|
||||
void APIENTRY glKosInit() {
|
||||
TRACE();
|
||||
|
||||
_initPVR();
|
||||
_glInitPVR();
|
||||
|
||||
initMatrices();
|
||||
initAttributePointers();
|
||||
_glInitMatrices();
|
||||
_glInitAttributePointers();
|
||||
_glInitContext();
|
||||
_glInitLights();
|
||||
initImmediateMode();
|
||||
initFramebuffers();
|
||||
_glInitImmediateMode();
|
||||
_glInitFramebuffers();
|
||||
|
||||
_glKosInitTextures();
|
||||
_glInitTextures();
|
||||
|
||||
OP_LIST.list_type = PVR_LIST_OP_POLY;
|
||||
PT_LIST.list_type = PVR_LIST_PT_POLY;
|
||||
|
|
|
@ -16,7 +16,7 @@ static FrameBuffer* ACTIVE_FRAMEBUFFER = NULL;
|
|||
static NamedArray FRAMEBUFFERS;
|
||||
|
||||
|
||||
void initFramebuffers() {
|
||||
void _glInitFramebuffers() {
|
||||
named_array_init(&FRAMEBUFFERS, sizeof(FrameBuffer), 32);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ static GLfloat UV_COORD[2] = {0.0f, 0.0f};
|
|||
static GLfloat ST_COORD[2] = {0.0f, 0.0f};
|
||||
|
||||
|
||||
void initImmediateMode() {
|
||||
void _glInitImmediateMode() {
|
||||
aligned_vector_init(&VERTICES, sizeof(GLfloat));
|
||||
aligned_vector_init(&COLOURS, sizeof(GLfloat));
|
||||
aligned_vector_init(&UV_COORDS, sizeof(GLfloat));
|
||||
|
|
|
@ -109,7 +109,7 @@ void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
|
|||
memcpy(LIGHTS[idx].specular, params, sizeof(GLfloat) * 4);
|
||||
break;
|
||||
case GL_POSITION: {
|
||||
_matrixLoadModelView();
|
||||
_glMatrixLoadModelView();
|
||||
memcpy(LIGHTS[idx].position, params, sizeof(GLfloat) * 4);
|
||||
|
||||
LIGHTS[idx].is_directional = (params[3] == 0.0f) ? GL_TRUE : GL_FALSE;
|
||||
|
|
10
GL/matrix.c
10
GL/matrix.c
|
@ -37,7 +37,7 @@ matrix_t* _glGetProjectionMatrix() {
|
|||
return (matrix_t*) stack_top(&MATRIX_STACKS[1]);
|
||||
}
|
||||
|
||||
void initMatrices() {
|
||||
void _glInitMatrices() {
|
||||
init_stack(&MATRIX_STACKS[0], sizeof(matrix_t), 32);
|
||||
init_stack(&MATRIX_STACKS[1], sizeof(matrix_t), 32);
|
||||
init_stack(&MATRIX_STACKS[2], sizeof(matrix_t), 32);
|
||||
|
@ -385,20 +385,20 @@ void gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez, GLfloat centerx,
|
|||
glhLookAtf2(eye, point, up);
|
||||
}
|
||||
|
||||
void _applyRenderMatrix() {
|
||||
void _glApplyRenderMatrix() {
|
||||
mat_load(&SCREENVIEW_MATRIX);
|
||||
mat_apply(stack_top(MATRIX_STACKS + (GL_PROJECTION & 0xF)));
|
||||
mat_apply(stack_top(MATRIX_STACKS + (GL_MODELVIEW & 0xF)));
|
||||
}
|
||||
|
||||
void _matrixLoadTexture() {
|
||||
void _glMatrixLoadTexture() {
|
||||
mat_load(stack_top(MATRIX_STACKS + (GL_TEXTURE & 0xF)));
|
||||
}
|
||||
|
||||
void _matrixLoadModelView() {
|
||||
void _glMatrixLoadModelView() {
|
||||
mat_load(stack_top(MATRIX_STACKS + (GL_MODELVIEW & 0xF)));
|
||||
}
|
||||
|
||||
void _matrixLoadNormal() {
|
||||
void _glMatrixLoadNormal() {
|
||||
mat_load(&NORMAL_MATRIX);
|
||||
}
|
||||
|
|
22
GL/private.h
22
GL/private.h
|
@ -93,20 +93,20 @@ typedef struct {
|
|||
} LightSource;
|
||||
|
||||
|
||||
PolyList *activePolyList();
|
||||
PolyList *transparentPolyList();
|
||||
PolyList *_glActivePolyList();
|
||||
PolyList *_glTransparentPolyList();
|
||||
|
||||
void initAttributePointers();
|
||||
void _glInitAttributePointers();
|
||||
void _glInitContext();
|
||||
void _glInitLights();
|
||||
void initImmediateMode();
|
||||
void initMatrices();
|
||||
void initFramebuffers();
|
||||
void _glInitImmediateMode();
|
||||
void _glInitMatrices();
|
||||
void _glInitFramebuffers();
|
||||
|
||||
void _matrixLoadNormal();
|
||||
void _matrixLoadModelView();
|
||||
void _matrixLoadTexture();
|
||||
void _applyRenderMatrix();
|
||||
void _glMatrixLoadNormal();
|
||||
void _glMatrixLoadModelView();
|
||||
void _glMatrixLoadTexture();
|
||||
void _glApplyRenderMatrix();
|
||||
|
||||
matrix_t* _glGetProjectionMatrix();
|
||||
|
||||
|
@ -114,7 +114,7 @@ void wipeTextureOnFramebuffers(GLuint texture);
|
|||
GLubyte checkImmediateModeInactive(const char* func);
|
||||
|
||||
pvr_poly_cxt_t* getPVRContext();
|
||||
GLubyte _glKosInitTextures();
|
||||
GLubyte _glInitTextures();
|
||||
|
||||
void _glUpdatePVRTextureContext(pvr_poly_cxt_t* context, GLshort textureUnit);
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ void glPixelStorei(GLenum pname, GLint param) {
|
|||
*/
|
||||
void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
|
||||
/*!!! FIXME: Shouldn't this be added to *all* lists? */
|
||||
PVRTileClipCommand *c = aligned_vector_extend(&activePolyList()->vector, 1);
|
||||
PVRTileClipCommand *c = aligned_vector_extend(&_glActivePolyList()->vector, 1);
|
||||
|
||||
GLint miny, maxx, maxy;
|
||||
GLsizei gl_scissor_width = CLAMP(width, 0, vid_mode->width);
|
||||
|
|
|
@ -142,7 +142,7 @@ static GLuint _glGetMipmapDataSize(TextureObject* obj) {
|
|||
return size;
|
||||
}
|
||||
|
||||
GLubyte _glKosInitTextures() {
|
||||
GLubyte _glInitTextures() {
|
||||
named_array_init(&TEXTURE_OBJECTS, sizeof(TextureObject), MAX_TEXTURE_COUNT);
|
||||
|
||||
// Reserve zero so that it is never given to anyone as an ID!
|
||||
|
|
Loading…
Reference in New Issue
Block a user