mirror of https://github.com/bjornbytes/lovr.git
Fix windows;
This commit is contained in:
parent
d3775ab145
commit
b085261cc5
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue