Skip to content

Commit

Permalink
Add test for camera code in display.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Apr 25, 2012
1 parent c2947d0 commit a8efbbb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/src/display.c
Expand Up @@ -20,6 +20,7 @@ int main(int argc, char **argv)
GLFWwindow window; GLFWwindow window;
glhckTexture *texture; glhckTexture *texture;
glhckObject *cube; glhckObject *cube;
glhckCamera *camera;
float spin = 0; float spin = 0;


float now = 0; float now = 0;
Expand All @@ -45,6 +46,13 @@ int main(int argc, char **argv)


RUNNING = 1; RUNNING = 1;


/* test camera */
if (!(camera = glhckCameraNew()))
return EXIT_FAILURE;

/* bind the camera */
glhckCameraBind(camera);

/* this texture is useless when toggling PMD testing */ /* this texture is useless when toggling PMD testing */
if (!(texture = glhckTextureNew("../media/glhck.png", if (!(texture = glhckTextureNew("../media/glhck.png",
GLHCK_TEXTURE_DEFAULTS))) GLHCK_TEXTURE_DEFAULTS)))
Expand Down Expand Up @@ -97,6 +105,7 @@ int main(int argc, char **argv)
} }
glhckObjectFree(cube); glhckObjectFree(cube);
glhckTextureFree(texture); glhckTextureFree(texture);
glhckCameraFree(camera);


glhckTerminate(); glhckTerminate();
glfwTerminate(); glfwTerminate();
Expand Down

0 comments on commit a8efbbb

Please sign in to comment.