Skip to content
Snippets Groups Projects
Commit 6b32e241 authored by Lioncash's avatar Lioncash
Browse files

gl_state: Make texture_units a std::array

Gets rid of the use of a raw C array.
parent a03c644a
No related branches found
No related tags found
No related merge requests found
...@@ -82,7 +82,7 @@ public: ...@@ -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: ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment