mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: use countof macro instead to hardcode the size
This commit is contained in:
parent
47a0026b60
commit
00e62919c5
|
@ -106,10 +106,10 @@ namespace GLState {
|
||||||
|
|
||||||
rt = 0;
|
rt = 0;
|
||||||
ds = 0;
|
ds = 0;
|
||||||
for (int i = 0; i < 4; i++) {
|
for (size_t i = 0; i < countof(tex_unit); i++)
|
||||||
tex_unit[i] = 0;
|
tex_unit[i] = 0;
|
||||||
|
for (size_t i = 0; i < countof(tex_handle); i++)
|
||||||
tex_handle[i] = 0;
|
tex_handle[i] = 0;
|
||||||
}
|
|
||||||
|
|
||||||
ps = 0;
|
ps = 0;
|
||||||
gs = 0;
|
gs = 0;
|
||||||
|
|
|
@ -263,10 +263,10 @@ GSTextureOGL::~GSTextureOGL()
|
||||||
GLState::rt = 0;
|
GLState::rt = 0;
|
||||||
if (m_texture_id == GLState::ds)
|
if (m_texture_id == GLState::ds)
|
||||||
GLState::ds = 0;
|
GLState::ds = 0;
|
||||||
if (m_texture_id == GLState::tex_unit[0])
|
for (size_t i = 0; i < countof(GLState::tex_unit); i++) {
|
||||||
GLState::tex_unit[0] = 0;
|
if (m_texture_id == GLState::tex_unit[i])
|
||||||
if (m_texture_id == GLState::tex_unit[1])
|
GLState::tex_unit[i] = 0;
|
||||||
GLState::tex_unit[1] = 0;
|
}
|
||||||
|
|
||||||
gl_DeleteBuffers(1, &m_pbo_id);
|
gl_DeleteBuffers(1, &m_pbo_id);
|
||||||
glDeleteTextures(1, &m_texture_id);
|
glDeleteTextures(1, &m_texture_id);
|
||||||
|
|
Loading…
Reference in New Issue