mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
make it actually render something
This commit is contained in:
parent
91da461caa
commit
9e082fd92f
1 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ void CheckOpenGLError(const char* stmt, const char* fname, int line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef NOOOOOOOOO
|
||||||
#define GL_CHECK(stmt) do { \
|
#define GL_CHECK(stmt) do { \
|
||||||
stmt; \
|
stmt; \
|
||||||
CheckOpenGLError(#stmt, __FILE__, __LINE__); \
|
CheckOpenGLError(#stmt, __FILE__, __LINE__); \
|
||||||
|
@ -96,7 +96,7 @@ void CheckOpenGLError(const char* stmt, const char* fname, int line)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static struct GLTexture opengl_tex[2];
|
static struct GLTexture opengl_tex[0x1000000];
|
||||||
static GLint opengl_curtex = 0;
|
static GLint opengl_curtex = 0;
|
||||||
|
|
||||||
static map<pair<uint64_t, uint32_t>, struct ShaderProgram> shader_program_pool;
|
static map<pair<uint64_t, uint32_t>, 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) {
|
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);
|
//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));
|
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));
|
glDrawArrays(GL_TRIANGLES, 0, 3 * buf_vbo_num_tris);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_opengl_init(void) {
|
static void gfx_opengl_init(void) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue