mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-14 11:01:38 +00:00
thin3d gles: Unbind buffers after drawing. Fixes #9715
This commit is contained in:
parent
14900d4c1b
commit
7d0cfbabe7
@ -50,7 +50,9 @@ void unregister_gl_resource_holder(GfxResourceHolder *holder) {
|
||||
erased = true;
|
||||
}
|
||||
}
|
||||
WLOG("unregister_gl_resource_holder: Resource not registered");
|
||||
if (!erased) {
|
||||
WLOG("unregister_gl_resource_holder: Resource not registered");
|
||||
}
|
||||
} else {
|
||||
WLOG("GL resource holder not initialized or already shutdown, cannot unregister resource");
|
||||
}
|
||||
|
@ -92,7 +92,6 @@ void DrawBuffer::Flush(bool set_blend_state) {
|
||||
|
||||
VsTexColUB ub{};
|
||||
memcpy(ub.WorldViewProj, drawMatrix_.getReadPtr(), sizeof(Matrix4x4));
|
||||
// pipeline_->SetMatrix4x4("WorldViewProj", drawMatrix_.getReadPtr());
|
||||
draw_->UpdateDynamicUniformBuffer(&ub, sizeof(ub));
|
||||
if (vbuf_) {
|
||||
draw_->UpdateBuffer(vbuf_, (const uint8_t *)verts_, 0, sizeof(Vertex) * count_, Draw::UPDATE_DISCARD);
|
||||
|
@ -1129,6 +1129,7 @@ void OpenGLContext::Draw(int vertexCount, int offset) {
|
||||
glDrawArrays(curPipeline_->prim, offset, vertexCount);
|
||||
|
||||
curPipeline_->inputLayout->Unapply();
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
void OpenGLContext::DrawIndexed(int vertexCount, int offset) {
|
||||
@ -1141,6 +1142,8 @@ void OpenGLContext::DrawIndexed(int vertexCount, int offset) {
|
||||
glDrawElements(curPipeline_->prim, vertexCount, GL_UNSIGNED_INT, (const void *)(size_t)offset);
|
||||
|
||||
curPipeline_->inputLayout->Unapply();
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
void OpenGLContext::DrawUP(const void *vdata, int vertexCount) {
|
||||
|
@ -79,11 +79,11 @@ void UIScreen::preRender() {
|
||||
}
|
||||
|
||||
void UIScreen::postRender() {
|
||||
auto thin3d = screenManager()->getDrawContext();
|
||||
if (!thin3d) {
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
if (!draw) {
|
||||
return;
|
||||
}
|
||||
thin3d->End();
|
||||
draw->End();
|
||||
}
|
||||
|
||||
void UIScreen::render() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user