|
|
@ -48,12 +48,7 @@ OpenGLState::OpenGLState() {
|
|
|
|
logic_op = GL_COPY;
|
|
|
|
logic_op = GL_COPY;
|
|
|
|
|
|
|
|
|
|
|
|
for (auto& texture_unit : texture_units) {
|
|
|
|
for (auto& texture_unit : texture_units) {
|
|
|
|
texture_unit.texture_2d = 0;
|
|
|
|
texture_unit.Reset();
|
|
|
|
texture_unit.sampler = 0;
|
|
|
|
|
|
|
|
texture_unit.swizzle.r = GL_RED;
|
|
|
|
|
|
|
|
texture_unit.swizzle.g = GL_GREEN;
|
|
|
|
|
|
|
|
texture_unit.swizzle.b = GL_BLUE;
|
|
|
|
|
|
|
|
texture_unit.swizzle.a = GL_ALPHA;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
lighting_lut.texture_buffer = 0;
|
|
|
|
lighting_lut.texture_buffer = 0;
|
|
|
@ -338,10 +333,10 @@ void OpenGLState::Apply() const {
|
|
|
|
cur_state = *this;
|
|
|
|
cur_state = *this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OpenGLState& OpenGLState::ResetTexture(GLuint handle) {
|
|
|
|
OpenGLState& OpenGLState::UnbindTexture(GLuint handle) {
|
|
|
|
for (auto& unit : texture_units) {
|
|
|
|
for (auto& unit : texture_units) {
|
|
|
|
if (unit.texture_2d == handle) {
|
|
|
|
if (unit.texture_2d == handle) {
|
|
|
|
unit.texture_2d = 0;
|
|
|
|
unit.Unbind();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (lighting_lut.texture_buffer == handle)
|
|
|
|
if (lighting_lut.texture_buffer == handle)
|
|
|
|