Przeglądaj źródła

Merge pull request #902 from lioncash/array

gl_state: Make texture_units a std::array
bunnei 8 lat temu
rodzic
commit
bae1822aed
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      src/video_core/renderer_opengl/gl_state.h

+ 3 - 2
src/video_core/renderer_opengl/gl_state.h

@@ -82,7 +82,7 @@ public:
     GLenum logic_op; // GL_LOGIC_OP_MODE
     GLenum logic_op; // GL_LOGIC_OP_MODE
 
 
     // 3 texture units - one for each that is used in PICA fragment shader emulation
     // 3 texture units - one for each that is used in PICA fragment shader emulation
-    struct {
+    struct TextureUnit {
         GLuint texture_2d; // GL_TEXTURE_BINDING_2D
         GLuint texture_2d; // GL_TEXTURE_BINDING_2D
         GLuint sampler;    // GL_SAMPLER_BINDING
         GLuint sampler;    // GL_SAMPLER_BINDING
         struct {
         struct {
@@ -104,7 +104,8 @@ public:
             Unbind();
             Unbind();
             sampler = 0;
             sampler = 0;
         }
         }
-    } texture_units[32];
+    };
+    std::array<TextureUnit, 32> texture_units;
 
 
     struct {
     struct {
         GLuint read_framebuffer; // GL_READ_FRAMEBUFFER_BINDING
         GLuint read_framebuffer; // GL_READ_FRAMEBUFFER_BINDING