General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
This commit is contained in:
parent
f7aaa37bf2
commit
8ce81b19be
10 changed files with 35 additions and 29 deletions
|
@ -206,7 +206,7 @@ void OpenGLState::Apply() const {
|
|||
}
|
||||
|
||||
// Textures
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(texture_units); ++i) {
|
||||
for (u32 i = 0; i < texture_units.size(); ++i) {
|
||||
if (texture_units[i].texture_2d != cur_state.texture_units[i].texture_2d) {
|
||||
glActiveTexture(TextureUnits::PicaTexture(i).Enum());
|
||||
glBindTexture(GL_TEXTURE_2D, texture_units[i].texture_2d);
|
||||
|
|
|
@ -90,10 +90,11 @@ public:
|
|||
GLenum logic_op; // GL_LOGIC_OP_MODE
|
||||
|
||||
// 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 sampler; // GL_SAMPLER_BINDING
|
||||
} texture_units[3];
|
||||
};
|
||||
std::array<TextureUnit, 3> texture_units;
|
||||
|
||||
struct {
|
||||
GLuint texture_cube; // GL_TEXTURE_BINDING_CUBE_MAP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue