OPENGL: Allow backends to draw textures clipped
This commit is contained in:
parent
7b36b56925
commit
b60c99ce98
7 changed files with 41 additions and 11 deletions
|
@ -45,10 +45,10 @@ void FixedPipeline::setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
|
|||
GL_CALL(glColor4f(r, g, b, a));
|
||||
}
|
||||
|
||||
void FixedPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates) {
|
||||
void FixedPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates, const GLfloat *texcoords) {
|
||||
texture.bind();
|
||||
|
||||
GL_CALL(glTexCoordPointer(2, GL_FLOAT, 0, texture.getTexCoords()));
|
||||
GL_CALL(glTexCoordPointer(2, GL_FLOAT, 0, texcoords));
|
||||
GL_CALL(glVertexPointer(2, GL_FLOAT, 0, coordinates));
|
||||
GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue