mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Ported: Initialize GLWrapper earlier in Storage::initialize()
Make sure `GLWrapper` is initialized before `glActiveTexture` is called by other parts of the storage initialize(), to prevent benign warnings.
- lawnjelly
857d884026
This commit is contained in:
parent
fb142ed6f8
commit
05c264c83c
@ -5955,6 +5955,10 @@ void RasterizerStorageGLES2::initialize() {
|
||||
config.depth_internalformat = GL_DEPTH_COMPONENT;
|
||||
config.depth_type = GL_UNSIGNED_INT;
|
||||
|
||||
// Initialize GLWrapper early on, as required for any calls to glActiveTexture.
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &config.max_texture_image_units);
|
||||
gl_wrapper.initialize(config.max_texture_image_units);
|
||||
|
||||
#ifdef GLES_OVER_GL
|
||||
config.float_texture_supported = true;
|
||||
config.s3tc_supported = true;
|
||||
@ -6147,8 +6151,6 @@ void RasterizerStorageGLES2::initialize() {
|
||||
frame.clear_request = false;
|
||||
|
||||
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &config.max_vertex_texture_image_units);
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &config.max_texture_image_units);
|
||||
gl_wrapper.initialize(config.max_texture_image_units);
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &config.max_texture_size);
|
||||
glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, &config.max_cubemap_texture_size);
|
||||
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, config.max_viewport_dimensions);
|
||||
|
Loading…
Reference in New Issue
Block a user