mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
add casts to Graphics_GL1.c to make -Werror happy
This commit is contained in:
parent
d84ad841f1
commit
5774e290c5
@ -207,27 +207,27 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
||||
#define IB_PTR NULL
|
||||
|
||||
static void GL_SetupVbColoured(void) {
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_COLOURED, VB_PTR + 0);
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_COLOURED, VB_PTR + 12);
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_COLOURED, (GLpointer)(VB_PTR + 0));
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_COLOURED, (GLpointer)(VB_PTR + 12));
|
||||
}
|
||||
|
||||
static void GL_SetupVbTextured(void) {
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + 0);
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, VB_PTR + 12);
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + 16);
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + 0));
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + 12));
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + 16));
|
||||
}
|
||||
|
||||
static void GL_SetupVbColoured_Range(int startVertex) {
|
||||
cc_uint32 offset = startVertex * SIZEOF_VERTEX_COLOURED;
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_COLOURED, VB_PTR + offset + 0);
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_COLOURED, VB_PTR + offset + 12);
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_COLOURED, (GLpointer)(VB_PTR + offset + 0));
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_COLOURED, (GLpointer)(VB_PTR + offset + 12));
|
||||
}
|
||||
|
||||
static void GL_SetupVbTextured_Range(int startVertex) {
|
||||
cc_uint32 offset = startVertex * SIZEOF_VERTEX_TEXTURED;
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 0);
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 12);
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 16);
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 0));
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 12));
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 16));
|
||||
}
|
||||
|
||||
void Gfx_SetVertexFormat(VertexFormat fmt) {
|
||||
@ -267,9 +267,9 @@ void Gfx_DrawVb_IndexedTris(int verticesCount) {
|
||||
|
||||
void Gfx_DrawIndexedTris_T2fC4b(int verticesCount, int startVertex) {
|
||||
cc_uint32 offset = startVertex * SIZEOF_VERTEX_TEXTURED;
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 0);
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 12);
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, VB_PTR + offset + 16);
|
||||
_glVertexPointer(3, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 0));
|
||||
_glColorPointer(4, GL_UNSIGNED_BYTE, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 12));
|
||||
_glTexCoordPointer(2, GL_FLOAT, SIZEOF_VERTEX_TEXTURED, (GLpointer)(VB_PTR + offset + 16));
|
||||
_glDrawElements(GL_TRIANGLES, ICOUNT(verticesCount), GL_UNSIGNED_SHORT, IB_PTR);
|
||||
}
|
||||
|
||||
@ -585,7 +585,7 @@ static void APIENTRY gl10_colorPointer(GLint size, GLenum type, GLsizei stride,
|
||||
static void APIENTRY gl10_texCoordPointer(GLint size, GLenum type, GLsizei stride, GLpointer offset) {
|
||||
}
|
||||
static void APIENTRY gl10_vertexPointer(GLint size, GLenum type, GLsizei stride, GLpointer offset) {
|
||||
gl10_vb = cur_vb->data + offset;
|
||||
gl10_vb = cur_vb->data + (cc_uintptr)offset;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user