diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-31 12:28:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-31 14:17:29 -0700 |
commit | 575c77ef11c1261f047b88d6af66b0957abc1833 (patch) | |
tree | ee4b523a913cc68eb62758604b1c90ae9d24d0e5 | |
parent | bbb71e6654612a1a03c5804d7dbb080cf9116449 (diff) |
refactor gl_renderers.c
-rw-r--r-- | tests/gl_renderers.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/gl_renderers.c b/tests/gl_renderers.c index acf400ff..0a8e6e78 100644 --- a/tests/gl_renderers.c +++ b/tests/gl_renderers.c @@ -23,7 +23,7 @@ REDISTRIBUTION OF THIS SOFTWARE. */ #if !EMSCRIPTEN -#define USE_GLEW 1 +#define USE_GLEW 0 #endif #if USE_GLEW @@ -127,6 +127,8 @@ int main(int argc, char *argv[]) // DRAW + GLbyte * pointer; + // Clear the screen before drawing glClear( GL_COLOR_BUFFER_BIT ); @@ -143,14 +145,14 @@ int main(int argc, char *argv[]) // point to the buffer's location data glVertexPointer(2, GL_FLOAT, sizeof(Type1), NULL); - GLbyte * pointer = (GLbyte*)(((GLbyte*)&first[0].color) - ((GLbyte*)&first[0].location)); + pointer = (GLbyte*)(((GLbyte*)&first[0].color) - ((GLbyte*)&first[0].location)); printf("location = %p\n", pointer); // point to the buffer's color data glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Type1), pointer); glDrawArrays(GL_TRIANGLE_STRIP, 0, 3); - + // SECOND // load the first into the context |