diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-24 20:40:39 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-24 20:40:39 -0400 |
commit | ae94b4b9fc5b4443f6d9eb6bb450de1def108cdb (patch) | |
tree | f2b3fbbb490c36d06f5704024bc1ab6be7feada9 /gl_calls.cpp | |
parent | 2e0e12140e95be18abf3cf7e54230ef22f410fbd (diff) |
fixes for gl core; create/delete developing
Diffstat (limited to 'gl_calls.cpp')
-rw-r--r-- | gl_calls.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gl_calls.cpp b/gl_calls.cpp index d791a9c..277b15b 100644 --- a/gl_calls.cpp +++ b/gl_calls.cpp @@ -179,10 +179,6 @@ GL_UpdateTexture(gl_effect_layer *Test, void *Data, uint16 Width, uint16 Height, Target = GL_TEXTURE_2D_MULTISAMPLE; glBindTexture(Target, Test->Texture); - glTexParameteri(Target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(Target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if (Multisample) { // glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGB, Width, Height, GL_TRUE); @@ -194,6 +190,10 @@ GL_UpdateTexture(gl_effect_layer *Test, void *Data, uint16 Width, uint16 Height, glBindRenderbuffer(GL_RENDERBUFFER, (GLuint)Test->Stencil_Renderbuffer ); glRenderbufferStorageMultisample(GL_RENDERBUFFER, 4, GL_STENCIL_INDEX8, Width, Height ); } else { + glTexParameteri(Target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(Target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Width, Height, 0, GL_RGBA, // GL_UNSIGNED_BYTE, Data); glBindTexture(GL_TEXTURE_2D, 0); @@ -223,6 +223,7 @@ static void GL_BindDefaultVertexArrays() { // Switch to main buffer + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, DefaultVerts.ElementBufferObject); glBindBuffer(GL_ARRAY_BUFFER, DefaultVerts.VertexBufferObject); glBufferData(GL_ARRAY_BUFFER, sizeof(GL_DefaultVertices), GL_DefaultVertices, GL_STATIC_DRAW); // position attribute |