Fix windows;

This commit is contained in:
bjornbytes 2016-07-15 22:54:11 -07:00
parent d3775ab145
commit b085261cc5
3 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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");

View File

@ -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;