Cycles: Get rid of one more OpenGL matrix manipulation/push/pop.

This commit is contained in:
Antony Riakiotakis
2015-05-11 16:40:38 +02:00
parent d30f664c04
commit 4fc3188112
5 changed files with 15 additions and 19 deletions

View File

@@ -369,13 +369,9 @@ void DisplayBuffer::draw_set(int width, int height)
void DisplayBuffer::draw(Device *device, const DeviceDrawParams& draw_params)
{
if(draw_width != 0 && draw_height != 0) {
glPushMatrix();
glTranslatef(params.full_x, params.full_y, 0.0f);
device_memory& rgba = rgba_data();
device->draw_pixels(rgba, 0, draw_width, draw_height, 0, params.width, params.height, transparent, draw_params);
glPopMatrix();
device->draw_pixels(rgba, 0, draw_width, draw_height, params.full_x, params.full_y, params.width, params.height, transparent, draw_params);
}
}