MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / DrawQuadD

Function DrawQuadD

engine/src/rendertarget.cpp:108–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void DrawQuadD(RenderTarget dst, RenderTarget src, ScreenRect* pdstRect, unsigned int shader)
109{
110 glBindFramebuffer(GL_FRAMEBUFFER, dst.fbo);
111 glUseProgramObjectARB(shader);
112 glBindTexture(GL_TEXTURE_2D, src.fbo_texture);
113 glBegin(GL_QUADS);
114 glTexCoord2d(0.0, 0.0); glVertex2f(pdstRect->fLeft(), pdstRect->fTop());
115 glTexCoord2d(1.0, 0.0); glVertex2f(pdstRect->fRight(), pdstRect->fTop());
116 glTexCoord2d(1.0, 1.0); glVertex2f(pdstRect->fRight(), pdstRect->fBottom());
117 glTexCoord2d(0.0, 1.0); glVertex2f(pdstRect->fLeft(), pdstRect->fBottom());
118 glEnd();
119}
120
121void DrawQuad(RenderTarget dst, unsigned int texture, ScreenRect* psrcRect, ScreenRect* pdstRect, unsigned int shader)
122{

Callers 1

R_renderFunction · 0.85

Calls 4

fLeftMethod · 0.80
fTopMethod · 0.80
fRightMethod · 0.80
fBottomMethod · 0.80

Tested by

no test coverage detected