Tweak depth_funcs_alpha_testing sample to use glOrtho

This commit is contained in:
Luke Benstead 2020-05-14 07:20:41 +01:00
parent 06acff400c
commit 64f2a57dd0
3 changed files with 5 additions and 3 deletions

View File

@ -30,3 +30,4 @@ all:
$(KOS_MAKE) -C blend_test all
$(KOS_MAKE) -C mipmap all
$(KOS_MAKE) -C lights all
$(KOS_MAKE) -C depth_funcs_alpha_testing

View File

@ -1,4 +1,4 @@
TARGET = depth_funcs.elf
TARGET = depth_funcs_alpha_testing.elf
OBJS = main.o gl_png.o
KOS_CFLAGS += -std=c99

View File

@ -21,7 +21,7 @@ void InitGL(int Width, int Height) // We call this right after our OpenG
glMatrixMode(GL_PROJECTION);
glLoadIdentity(); // Reset The Projection Matrix
gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f); // Calculate The Aspect Ratio Of The Window
glOrtho(-3, 3, -3, 3, -10, 10);
glEnable(GL_TEXTURE_2D);
glMatrixMode(GL_MODELVIEW);
}
@ -37,7 +37,8 @@ void ReSizeGLScene(int Width, int Height)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f);
glOrtho(-3, 3, -3, 3, -10, 10);
glMatrixMode(GL_MODELVIEW);
}