| 119 | } |
| 120 | |
| 121 | void DrawQuad(RenderTarget dst, unsigned int texture, ScreenRect* psrcRect, ScreenRect* pdstRect, unsigned int shader) |
| 122 | { |
| 123 | glBindFramebuffer(GL_FRAMEBUFFER, dst.fbo); |
| 124 | glUseProgramObjectARB(shader); |
| 125 | glBindTexture(GL_TEXTURE_2D, texture); |
| 126 | glBegin(GL_QUADS); |
| 127 | glTexCoord2d(psrcRect->fLeft(), psrcRect->fBottom()); glVertex2f(pdstRect->fLeft(), pdstRect->fTop()); |
| 128 | glTexCoord2d(psrcRect->fRight(), psrcRect->fBottom()); glVertex2f(pdstRect->fRight(), pdstRect->fTop()); |
| 129 | glTexCoord2d(psrcRect->fRight(), psrcRect->fTop()); glVertex2f(pdstRect->fRight(), pdstRect->fBottom()); |
| 130 | glTexCoord2d(psrcRect->fLeft(), psrcRect->fTop()); glVertex2f(pdstRect->fLeft(), pdstRect->fBottom()); |
| 131 | glEnd(); |
| 132 | } |
no test coverage detected