fix bug
This commit is contained in:
parent
fee446f949
commit
2dd56f9007
|
|
@ -2227,25 +2227,6 @@ void CLP(GraphicsStateGuardian)::
|
|||
end_scene() {
|
||||
GraphicsStateGuardian::end_scene();
|
||||
|
||||
#ifndef OPENGLES_1
|
||||
// This breaks shaders across multiple regions.
|
||||
/*if (_vertex_array_shader_context != 0) {
|
||||
_vertex_array_shader_context->disable_shader_vertex_arrays(this);
|
||||
_vertex_array_shader = (Shader *)NULL;
|
||||
_vertex_array_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}
|
||||
if (_texture_binding_shader_context != 0) {
|
||||
_texture_binding_shader_context->disable_shader_texture_bindings(this);
|
||||
_texture_binding_shader = (Shader *)NULL;
|
||||
_texture_binding_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}
|
||||
if (_current_shader_context != 0) {
|
||||
_current_shader_context->unbind(this);
|
||||
_current_shader = (Shader *)NULL;
|
||||
_current_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}*/
|
||||
#endif
|
||||
|
||||
_dlights.clear();
|
||||
report_my_gl_errors();
|
||||
}
|
||||
|
|
@ -2278,6 +2259,25 @@ end_frame(Thread *current_thread) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENGLES_1
|
||||
// This breaks shaders across multiple regions.
|
||||
if (_vertex_array_shader_context != 0) {
|
||||
_vertex_array_shader_context->disable_shader_vertex_arrays(this);
|
||||
_vertex_array_shader = (Shader *)NULL;
|
||||
_vertex_array_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}
|
||||
if (_texture_binding_shader_context != 0) {
|
||||
_texture_binding_shader_context->disable_shader_texture_bindings(this);
|
||||
_texture_binding_shader = (Shader *)NULL;
|
||||
_texture_binding_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}
|
||||
if (_current_shader_context != 0) {
|
||||
_current_shader_context->unbind(this);
|
||||
_current_shader = (Shader *)NULL;
|
||||
_current_shader_context = (CLP(ShaderContext) *)NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
GraphicsStateGuardian::end_frame(current_thread);
|
||||
|
||||
// Flush any PCollectors specific to this kind of GSG.
|
||||
|
|
|
|||
Loading…
Reference in New Issue