renderer_opengl: Address cubemap related errors (#6158)
This commit is contained in:
@@ -56,7 +56,7 @@ void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei height, GLsizei depth) {
|
||||
GLuint old_tex = OpenGLState::GetCurState().texture_units[0].texture_2d;
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, handle);
|
||||
glBindTexture(target, handle);
|
||||
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
@@ -76,9 +76,9 @@ void OGLTexture::Allocate(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
break;
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, old_tex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user