diff --git a/samples/Makefile b/samples/Makefile index b565d58..49a78d8 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -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 diff --git a/samples/depth_funcs_alpha_testing/Makefile b/samples/depth_funcs_alpha_testing/Makefile index 2c09473..d3af3d5 100644 --- a/samples/depth_funcs_alpha_testing/Makefile +++ b/samples/depth_funcs_alpha_testing/Makefile @@ -1,4 +1,4 @@ -TARGET = depth_funcs.elf +TARGET = depth_funcs_alpha_testing.elf OBJS = main.o gl_png.o KOS_CFLAGS += -std=c99 diff --git a/samples/depth_funcs_alpha_testing/main.c b/samples/depth_funcs_alpha_testing/main.c index f6bb1eb..5bdbaad 100644 --- a/samples/depth_funcs_alpha_testing/main.c +++ b/samples/depth_funcs_alpha_testing/main.c @@ -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); }