mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Make sure to bind to the renderer FBO when drawing
This commit is contained in:
parent
a32a9e8ae8
commit
31278fba92
1 changed files with 272 additions and 256 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue