Move render target texture parameters to renderer gl
This commit is contained in:
11
src/rtt.cpp
11
src/rtt.cpp
@@ -213,10 +213,13 @@ bool RTT::create(int width, int height, int tex/* = -1*/, GLint internal_format,
|
||||
glBindTexture(GL_TEXTURE_2D, texID);
|
||||
if (tex == -1)
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, GL_RGBA, ifmt, 0);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
for (const auto parameter : pp::renderer::gl::default_render_target_texture_parameters())
|
||||
{
|
||||
glTexParameterf(
|
||||
GL_TEXTURE_2D,
|
||||
static_cast<GLenum>(parameter.name),
|
||||
static_cast<GLfloat>(parameter.value));
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
// Create a renderbuffer object to store depth info
|
||||
|
||||
Reference in New Issue
Block a user