Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Feb 4, 2016
1 parent aaf2c4d commit 1bf8bc3
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 33 deletions.
14 changes: 0 additions & 14 deletions include/glisy/context.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef GLISY_CONTEXT_H
#define GLISY_CONTEXT_H

#include <glisy/window.h>
#include <glisy/events.h>
#include <glisy/program.h>

/**
Expand All @@ -18,18 +16,6 @@ struct glisy_context {

glisy_program program;

/**
* glisy window interface.
*/

glisy_window window;

/**
* glisy event manager.
*/

glisy_events events;

/**
* Optional program name.
*/
Expand Down
1 change: 0 additions & 1 deletion src/context.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include <stdio.h>
#include <glisy/gl.h>
#include <glisy/context.h>
Expand Down
8 changes: 1 addition & 7 deletions src/glisy.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@

#include <glisy/glisy.h>

int
glisy_init () {
if (GL_TRUE != glfwInit()) {
// @TODO(werle) - handle error
return 0;
}
return 1;
return GL_TRUE;
}

void
glisy_terminate (void) {
glfwTerminate();
}
5 changes: 0 additions & 5 deletions src/renderer.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#include <glisy/window.h>
#include <glisy/renderer.h>

void
glisy_renderer_size (glisy_renderer this, int width, int height) {
glisy_window *window = &this.ctx.window;
glisy_window_set_size(window, width, height);
}

void
glisy_renderer_update (glisy_renderer this) {
// update window
glisy_window_update(&this.ctx.window);
}
1 change: 0 additions & 1 deletion src/shader.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include <string.h>
#include <glisy/gl.h>
#include <glisy/shader.h>
Expand Down
5 changes: 0 additions & 5 deletions test/context/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ main (void) {
glisy_context_use(&ctx, &data);
glisy_context_init(&ctx);

// ensure defaults were used
assert(ctx.window.height == GLISY_DEFAULT_WINDOW_HEIGHT);
assert(ctx.window.width == GLISY_DEFAULT_WINDOW_WIDTH);
assert(0 == strcmp(ctx.name, ctx.window.name));

assert(id == ((data_t *) ctx.data)->id);
assert(glisy_context_should_update(&ctx));
return 0;
Expand Down

0 comments on commit 1bf8bc3

Please sign in to comment.