Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Apr 4, 2016
1 parent 70d2355 commit 80a0970
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions examples/bunny.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ main(void) {
Camera camera;
Bunny bunny;

GL_CONTEXT_INIT();
GLFW_SHELL_CONTEXT_INIT(3, 2);
GLFW_SHELL_WINDOW_INIT(window, WINDOW_WIDTH, WINDOW_HEIGHT);
glfwSetScrollCallback(window, onMouseScroll);

program = CreateProgram("bunny.v.glsl", "bunny.f.glsl");
Expand All @@ -85,7 +86,7 @@ main(void) {
camera.target = vec3(1, 1, 1);

glisyProgramBind(&program);
GL_RENDER({
GLFW_SHELL_RENDER(window, {
const float time = glfwGetTime();
const float angle = time * 22.5f;
const float radians = dtor(angle);
Expand Down
1 change: 0 additions & 1 deletion examples/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ main(void) {
GLFW_SHELL_CONTEXT_INIT(3, 2);
GLFW_SHELL_WINDOW_INIT(window, width, height);
program = CreateProgram("cube.v.glsl", "cube.f.glsl");
printf("fo\n");
InitializeCamera(&camera, width, height);
InitializeCube(&cube);

Expand Down
5 changes: 3 additions & 2 deletions examples/grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ main(void) {
Grid grid;

// init gl
GL_CONTEXT_INIT();
GLFW_SHELL_CONTEXT_INIT(3, 2);
GLFW_SHELL_WINDOW_INIT(window, WINDOW_WIDTH, WINDOW_HEIGHT);
glfwSetScrollCallback(window, onMouseScroll);
glfwSetWindowUserPointer(window, &camera);

Expand All @@ -158,7 +159,7 @@ main(void) {
glisyProgramBind(&program);

// render loop
GL_RENDER({
GLFW_SHELL_RENDER(window, {
const float time = glfwGetTime();
const float angle = time * 5.0f;
const float radians = dtor(angle);
Expand Down

0 comments on commit 80a0970

Please sign in to comment.