Skip to content

Commit

Permalink
window hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitslime committed Jul 17, 2018
1 parent b9f843f commit a64019c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int text_init(void) {
//TODO: better file loading
char shader[1024];
FILE *file = fopen("res/text.glsl", "rb");
fseek(file, 0, FILE_END);
fseek(file, 0, SEEK_END);
GLuint length = ftell(file);
rewind(file);
if (file == NULL) {
Expand Down
4 changes: 4 additions & 0 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ int window_create(const char *title, int w, int h) {
return -1;
}

glfwDefaultWindowHints();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

window = glfwCreateWindow(w, h, title, NULL, NULL);
window_width = w;
window_height = h;
Expand Down

0 comments on commit a64019c

Please sign in to comment.