From 9e082fd92f0df0648bd3374d4d1182138959bbce Mon Sep 17 00:00:00 2001 From: Jeffrey Crowell Date: Mon, 30 May 2022 13:13:21 -0400 Subject: [PATCH] make it actually render something --- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index bfdcea748..2cea9d4e8 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -86,7 +86,7 @@ void CheckOpenGLError(const char* stmt, const char* fname, int line) } } -#ifdef __APPLE__ +#ifdef NOOOOOOOOO #define GL_CHECK(stmt) do { \ stmt; \ CheckOpenGLError(#stmt, __FILE__, __LINE__); \ @@ -96,7 +96,7 @@ void CheckOpenGLError(const char* stmt, const char* fname, int line) #endif -static struct GLTexture opengl_tex[2]; +static struct GLTexture opengl_tex[0x1000000]; static GLint opengl_curtex = 0; static map, struct ShaderProgram> shader_program_pool; @@ -683,8 +683,8 @@ static void gfx_opengl_set_use_alpha(bool use_alpha) { static void gfx_opengl_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_t buf_vbo_num_tris) { //printf("flushing %d tris\n", buf_vbo_num_tris); - GL_CHECK(glBufferData(GL_ARRAY_BUFFER, sizeof(float) * buf_vbo_len, buf_vbo, GL_STREAM_DRAW)); - GL_CHECK(glDrawArrays(GL_TRIANGLES, 0, 3 * buf_vbo_num_tris)); + glBufferData(GL_ARRAY_BUFFER, sizeof(float) * buf_vbo_len, buf_vbo, GL_STREAM_DRAW); + glDrawArrays(GL_TRIANGLES, 0, 3 * buf_vbo_num_tris); } static void gfx_opengl_init(void) {