diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c1cf161..d6d6b921 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ add_executable(lovr src/event.c src/graphics.c src/model.c + src/buffer.c src/device.c src/interface.c src/lovr.c diff --git a/src/glfw.c b/src/glfw.c index 7252e551..ee3a8eb5 100644 --- a/src/glfw.c +++ b/src/glfw.c @@ -26,6 +26,7 @@ void initGlfw(GLFWerrorfun onError, GLFWwindowclosefun onClose) { glfwMakeContextCurrent(window); #ifdef WIN32 + glewExperimental = GL_TRUE; GLenum err = glewInit(); if (err != GLEW_OK) { error("Could not initialize GLEW"); diff --git a/src/graphics.c b/src/graphics.c index 82d50a72..66748ab8 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -46,7 +46,7 @@ int lovrGraphicsNewModel(lua_State* L) { int lovrGraphicsNewBuffer(lua_State* L) { Buffer* buffer = (Buffer*) malloc(sizeof(Buffer)); - buffer->data = (GLfloat*) malloc(100); + buffer->data = (GLfloat*) malloc(9 * sizeof(GLfloat)); buffer->data[0] = -0.5; buffer->data[1] = -0.5;