Merge "Fix crash in kModeProcessNoContext" into mnc-dev
This commit is contained in:
@ -124,10 +124,16 @@ void RenderState::bindFramebuffer(GLuint fbo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
|
void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
|
||||||
|
if (mode == DrawGlInfo::kModeProcessNoContext) {
|
||||||
|
// If there's no context we don't need to interrupt as there's
|
||||||
|
// no gl state to save/restore
|
||||||
|
(*functor)(mode, info);
|
||||||
|
} else {
|
||||||
interruptForFunctorInvoke();
|
interruptForFunctorInvoke();
|
||||||
(*functor)(mode, info);
|
(*functor)(mode, info);
|
||||||
resumeFromFunctorInvoke();
|
resumeFromFunctorInvoke();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RenderState::interruptForFunctorInvoke() {
|
void RenderState::interruptForFunctorInvoke() {
|
||||||
mCaches->setProgram(nullptr);
|
mCaches->setProgram(nullptr);
|
||||||
|
Reference in New Issue
Block a user