Fix sprite rendering
This commit is contained in:
@@ -392,7 +392,7 @@ class PetitComputer
|
||||
glViewport2(x + currentDisplay.rect[i].x, currentDisplay.yoffset - h - y - currentDisplay.rect[i].y, w, h);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(x, x + w, y + h, y, 1024, -2048);
|
||||
glOrtho(x, x + w - 1, y + h - 1, y, 1024, -2048);
|
||||
}
|
||||
Button[] buttonTable;
|
||||
Sprite sprite;
|
||||
|
||||
@@ -701,6 +701,7 @@ class Sprite
|
||||
disw = petitcom.currentDisplay.rect[1].w / 2;
|
||||
disw2 = petitcom.currentDisplay.rect[1].w;
|
||||
petitcom.chRenderingDisplay(1, clipRect[1].x, clipRect[1].y, clipRect[1].w, clipRect[1].h);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
aspect = disw2 / dish2;
|
||||
texture = petitcom.graphic.GRP[sppage[1]].glTexture;
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
@@ -715,6 +716,7 @@ class Sprite
|
||||
disw = petitcom.currentDisplay.rect[0].w / 2;
|
||||
disw2 = petitcom.currentDisplay.rect[0].w;
|
||||
petitcom.chRenderingDisplay(0, clipRect[0].x, clipRect[0].y, clipRect[0].w, clipRect[0].h);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
aspect = disw2 / dish2;
|
||||
texture = petitcom.graphic.GRP[sppage[0]].glTexture;
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
Reference in New Issue
Block a user