mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
cogl-texture-2d: Use _cogl_texture_driver_gen to generate the GL tex
_cogl_texture_driver_gen is needed to set the texture minification mode to Cogl's default of GL_LINEAR. There was also a line to set this in _cogl_texture_2d_new_with_size but it wasn't working because it was called *before* the texture was bound. If the texture was later rendered with the default material it then it would end up with GL's default mipmap filtering mode but without mipmaps so it would render white squares instead.
This commit is contained in:
parent
1b2ff7eff7
commit
a02253f19a
@ -262,8 +262,7 @@ _cogl_texture_2d_new_with_size (unsigned int width,
|
||||
|
||||
tex_2d = _cogl_texture_2d_create_base (width, height, flags, internal_format);
|
||||
|
||||
GE( glGenTextures (1, &tex_2d->gl_texture) );
|
||||
GE( glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) );
|
||||
_cogl_texture_driver_gen (GL_TEXTURE_2D, 1, &tex_2d->gl_texture);
|
||||
GE( glBindTexture (GL_TEXTURE_2D, tex_2d->gl_texture) );
|
||||
GE( glTexImage2D (GL_TEXTURE_2D, 0, gl_intformat,
|
||||
width, height, 0, gl_format, gl_type, NULL) );
|
||||
|
Loading…
Reference in New Issue
Block a user