mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Don't use default VAO (#487)
* Don't use default VAO * Don't use a VAO on OpenGL 2.1
This commit is contained in:
parent
aa830ce456
commit
1babad1640
1 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,7 @@ static struct ShaderProgram shader_program_pool[CC_MAX_SHADERS];
|
||||||
static uint8_t shader_program_pool_size = 0;
|
static uint8_t shader_program_pool_size = 0;
|
||||||
static uint8_t shader_program_pool_index = 0;
|
static uint8_t shader_program_pool_index = 0;
|
||||||
static GLuint opengl_vbo;
|
static GLuint opengl_vbo;
|
||||||
|
static GLuint opengl_vao;
|
||||||
|
|
||||||
static int tex_cache_size = 0;
|
static int tex_cache_size = 0;
|
||||||
static int num_textures = 0;
|
static int num_textures = 0;
|
||||||
|
@ -707,6 +708,11 @@ static void gfx_opengl_init(void) {
|
||||||
glGenBuffers(1, &opengl_vbo);
|
glGenBuffers(1, &opengl_vbo);
|
||||||
|
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, opengl_vbo);
|
glBindBuffer(GL_ARRAY_BUFFER, opengl_vbo);
|
||||||
|
|
||||||
|
if (vmajor >= 3 && !is_es) {
|
||||||
|
glGenVertexArrays(1, &opengl_vao);
|
||||||
|
glBindVertexArray(opengl_vao);
|
||||||
|
}
|
||||||
|
|
||||||
glDepthFunc(GL_LEQUAL);
|
glDepthFunc(GL_LEQUAL);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
Loading…
Reference in a new issue