Tweak depth_funcs_alpha_testing sample to use glOrtho
This commit is contained in:
parent
06acff400c
commit
64f2a57dd0
|
@ -30,3 +30,4 @@ all:
|
||||||
$(KOS_MAKE) -C blend_test all
|
$(KOS_MAKE) -C blend_test all
|
||||||
$(KOS_MAKE) -C mipmap all
|
$(KOS_MAKE) -C mipmap all
|
||||||
$(KOS_MAKE) -C lights all
|
$(KOS_MAKE) -C lights all
|
||||||
|
$(KOS_MAKE) -C depth_funcs_alpha_testing
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
TARGET = depth_funcs.elf
|
TARGET = depth_funcs_alpha_testing.elf
|
||||||
OBJS = main.o gl_png.o
|
OBJS = main.o gl_png.o
|
||||||
KOS_CFLAGS += -std=c99
|
KOS_CFLAGS += -std=c99
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ void InitGL(int Width, int Height) // We call this right after our OpenG
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity(); // Reset The Projection Matrix
|
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);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,8 @@ void ReSizeGLScene(int Width, int Height)
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f);
|
glOrtho(-3, 3, -3, 3, -10, 10);
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user