diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-13 13:22:24 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-13 13:22:24 -0800 |
commit | c7cae7f3216f3e23f0da90e8d8b14d2ace63caa0 (patch) | |
tree | 4d8ec36dc1719147340c255b3b442cf3afe57cc9 | |
parent | 8263e2377f6cbbb88523aefeb86123e1a6887f1a (diff) |
glVertex2fv, +tests
-rw-r--r-- | src/library_gl.js | 3 | ||||
-rw-r--r-- | tests/sdl_ogl_p.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 99198196..4d83572e 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -2080,6 +2080,9 @@ var LibraryGL = { glVertex3fv: function(p) { _glVertex3f({{{ makeGetValue('p', '0', 'float') }}}, {{{ makeGetValue('p', '4', 'float') }}}, {{{ makeGetValue('p', '8', 'float') }}}); }, + glVertex2fv: function(p) { + _glVertex2f({{{ makeGetValue('p', '0', 'float') }}}, {{{ makeGetValue('p', '4', 'float') }}}); + }, glTexCoord2i: function(u, v) { #if ASSERTIONS diff --git a/tests/sdl_ogl_p.c b/tests/sdl_ogl_p.c index 949aaa44..fcc53a40 100644 --- a/tests/sdl_ogl_p.c +++ b/tests/sdl_ogl_p.c @@ -145,9 +145,9 @@ int main(int argc, char *argv[]) // Render the last item using oldschool glBegin etc glBegin( GL_TRIANGLE_STRIP ); glTexCoord2i( 0, 0 ); glVertex3f( 100, 300, 0 ); - glTexCoord2i( 1, 0 ); glVertex3f( 300, 300, 0 ); - glTexCoord2i( 1, 1 ); glVertex3f( 300, 400, 0 ); - glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 0 ); + glTexCoord2i( 1, 0 ); glVertex2f( 300, 300 ); + glTexCoord2i( 1, 1 ); { float vals[3] = { 300, 400, 0 }; glVertex3fv(vals); } + glTexCoord2i( 0, 1 ); { float vals[2] = { 500, 410 }; glVertex2fv(vals); } glEnd(); SDL_GL_SwapBuffers(); |