[Fix] Fixed the orthorgraphic view bug Tamir introduced.
This commit is contained in:
parent
e6f773dd68
commit
d57835d806
@ -31,6 +31,7 @@ void Destroy(void) {
|
|||||||
static void ResizeWindow(Game& game, int w, int h) {
|
static void ResizeWindow(Game& game, int w, int h) {
|
||||||
SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_RESIZABLE);
|
SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_RESIZABLE);
|
||||||
game.OnResize(w, h);
|
game.OnResize(w, h);
|
||||||
|
|
||||||
SDL_GL_SwapBuffers();
|
SDL_GL_SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +94,11 @@ int main(int argc, char** argv) {
|
|||||||
Uint32 timeStart = SDL_GetTicks();
|
Uint32 timeStart = SDL_GetTicks();
|
||||||
float dt = 1.0f / 60.0f;
|
float dt = 1.0f / 60.0f;
|
||||||
|
|
||||||
|
// We need to give windowWidth and windowHeight an initial value
|
||||||
|
// Otherwise it is just garbage, and the orthorgraphic view
|
||||||
|
// screws up for me. -- Allanis.
|
||||||
|
game.OnResize(windowWidth, windowHeight);
|
||||||
|
|
||||||
bool isRunning = true;
|
bool isRunning = true;
|
||||||
while(isRunning) {
|
while(isRunning) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user