aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Riss <Michael.Riss@gmx.de>2013-02-28 01:33:06 +0100
committerMichael Riss <Michael.Riss@gmx.de>2013-02-28 01:33:06 +0100
commit8e2c759b03266bb60cac686e3e84269714d5310e (patch)
tree3114e72db04189d593a7979fc28b9f9422c597e3
parenta28b5d53d75b428b1bee1efd39ac6d01d68d56d2 (diff)
Add glVertex3i and glVertex2i calls
These are basically just aliases for the glVertex3f function. Javascript seems to convert the integers to float values correctly. However, I did not follow the code path through the immediate mode emulation to know for sure. In my applications it works for "normal", small values (e.g. 1, 500, 1000, ...).
-rw-r--r--src/library_gl.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 995f2358..222e08f7 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -2332,8 +2332,10 @@ var LibraryGL = {
glVertex2fv: function(p) {
_glVertex3f({{{ makeGetValue('p', '0', 'float') }}}, {{{ makeGetValue('p', '4', 'float') }}}, 0);
},
+
+ glVertex3i: 'glVertex3f',
- glVertex2i: function() { throw 'glVertex2i: TODO' },
+ glVertex2i: 'glVertex3f',
glTexCoord2i: function(u, v) {
#if ASSERTIONS