Adjusted things to work with the new top-down orientation
This was SVN commit r1668.
This commit is contained in:
parent
8633123520
commit
37d2d83a9d
@ -459,9 +459,8 @@ void GUIRenderer::UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect
|
||||
// mapped onto (1,1)
|
||||
TexCoords.left /= TexWidth;
|
||||
TexCoords.right /= TexWidth;
|
||||
// and flip it vertically, because of some confusion between coordinate systems
|
||||
TexCoords.top /= -TexHeight;
|
||||
TexCoords.bottom /= -TexHeight;
|
||||
TexCoords.top /= TexHeight;
|
||||
TexCoords.bottom /= TexHeight;
|
||||
|
||||
Call.m_TexCoords = TexCoords;
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ struct ogl_cursor {
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2i(0, 1); glVertex2i( x-hotspotx, y+hotspoty );
|
||||
glTexCoord2i(1, 1); glVertex2i( x-hotspotx+w, y+hotspoty );
|
||||
glTexCoord2i(1, 0); glVertex2i( x-hotspotx+w, y+hotspoty-h );
|
||||
glTexCoord2i(0, 0); glVertex2i( x-hotspotx, y+hotspoty-h );
|
||||
glTexCoord2i(0, 0); glVertex2i( x-hotspotx, y+hotspoty );
|
||||
glTexCoord2i(1, 0); glVertex2i( x-hotspotx+w, y+hotspoty );
|
||||
glTexCoord2i(1, 1); glVertex2i( x-hotspotx+w, y+hotspoty-h );
|
||||
glTexCoord2i(0, 1); glVertex2i( x-hotspotx, y+hotspoty-h );
|
||||
glEnd();
|
||||
}
|
||||
};
|
||||
@ -160,7 +160,7 @@ static int Cursor_reload(Cursor* c, const char* name, Handle)
|
||||
BITMAPINFOHEADER dibheader = {
|
||||
sizeof(BITMAPINFOHEADER), // biSize
|
||||
w, // biWidth
|
||||
h, // biHeight (positive means bottom-up)
|
||||
-h, // biHeight (positive means bottom-up)
|
||||
1, // biPlanes
|
||||
32, // biBitCount
|
||||
BI_RGB, // biCompression
|
||||
|
@ -146,10 +146,10 @@ static int UniFont_reload(UniFont* f, const char* fn, Handle UNUSEDPARAM(h))
|
||||
|
||||
glNewList(f->ListBase+i, GL_COMPILE);
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(u, v); glVertex2i(OffsetX, -OffsetY);
|
||||
glTexCoord2f(u+w, v); glVertex2i(OffsetX+Width, -OffsetY);
|
||||
glTexCoord2f(u+w, v-h); glVertex2i(OffsetX+Width, -OffsetY+Height);
|
||||
glTexCoord2f(u, v-h); glVertex2i(OffsetX, -OffsetY+Height);
|
||||
glTexCoord2f(u, -v); glVertex2i(OffsetX, -OffsetY);
|
||||
glTexCoord2f(u+w, -v); glVertex2i(OffsetX+Width, -OffsetY);
|
||||
glTexCoord2f(u+w, -v+h); glVertex2i(OffsetX+Width, -OffsetY+Height);
|
||||
glTexCoord2f(u, -v+h); glVertex2i(OffsetX, -OffsetY+Height);
|
||||
glEnd();
|
||||
glTranslatef((GLfloat)Advance, 0, 0);
|
||||
glEndList();
|
||||
|
Loading…
Reference in New Issue
Block a user