Make sure to bind to the renderer FBO when drawing
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 16s

This commit is contained in:
smallmodel 2024-12-22 22:41:54 +01:00
parent a32a9e8ae8
commit 31278fba92
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -107,6 +107,9 @@ void Draw_StretchPic2(float x, float y, float w, float h, float s1, float t1, fl
R_IssuePendingRenderCommands();
if (glRefConfig.framebufferObject)
FBO_Bind(tr.renderFbo);
if (hShader) {
shader = R_GetShaderByHandle(hShader);
}
@ -157,6 +160,9 @@ void Draw_TilePic(float x, float y, float w, float h, qhandle_t hShader) {
R_IssuePendingRenderCommands();
if (glRefConfig.framebufferObject)
FBO_Bind(tr.renderFbo);
if (hShader) {
shader = R_GetShaderByHandle(hShader);
}
@ -203,6 +209,9 @@ void Draw_TilePicOffset(float x, float y, float w, float h, qhandle_t hShader, i
R_IssuePendingRenderCommands();
if (glRefConfig.framebufferObject)
FBO_Bind(tr.renderFbo);
if (hShader) {
shader = R_GetShaderByHandle(hShader);
}
@ -249,6 +258,9 @@ void Draw_TrianglePic(const vec2_t vPoints[3], const vec2_t vTexCoords[3], qhand
R_IssuePendingRenderCommands();
if (glRefConfig.framebufferObject)
FBO_Bind(tr.renderFbo);
if (hShader) {
shader = R_GetShaderByHandle(hShader);
}
@ -488,6 +500,10 @@ void Set2DWindow(int x, int y, int w, int h, float left, float right, float bott
mat4_t matrix;
R_IssuePendingRenderCommands();
backEnd.projection2D = qtrue;
backEnd.last2DFBO = glState.currentFBO;
qglViewport(x, y, w, h);
qglScissor(x, y, w, h);