Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correct coordinate type in glRotate and add testing

  • Loading branch information...
commit ec6ce2baf4f5c03693ab38219b004a78c136ce53 1 parent cb0bb1c
@kripken authored
Showing with 5 additions and 4 deletions.
  1. +1 −1  src/library_gl.js
  2. +2 −1  tests/cubegeom.c
  3. +2 −2 tests/runner.py
View
2  src/library_gl.js
@@ -1757,7 +1757,7 @@ var LibraryGL = {
glTranslatef: 'glTranslated',
glRotated: function(angle, x, y, z) {
- GL.immediate.matrix.lib.mat4.rotate(GL.immediate.matrix[GL.immediate.currentMatrix], angle, [x, y, z]);
+ GL.immediate.matrix.lib.mat4.rotate(GL.immediate.matrix[GL.immediate.currentMatrix], angle*Math.PI/180, [x, y, z]);
},
glRotatef: 'glRotated',
View
3  tests/cubegeom.c
@@ -101,6 +101,7 @@ int main(int argc, char *argv[])
glLoadIdentity();
// original: glFrustum(-0.6435469817188064, 0.6435469817188064 ,-0.48266022190470925, 0.48266022190470925 ,0.5400000214576721, 2048);
glFrustum(-0.6435469817188064, 0.1435469817188064 ,-0.48266022190470925, 0.88266022190470925 ,0.5400000214576721, 2048);
+ glRotatef(-30, 1, 1, 1);
//GLfloat pm[] = { 1.372136116027832, 0, 0, 0, 0, 0.7910231351852417, 0, 0, -0.6352481842041016, 0.29297152161598206, -1.0005275011062622, -1, 0, 0, -1.080284833908081, 0 };
//glLoadMatrixf(pm);
@@ -285,7 +286,7 @@ int main(int argc, char *argv[])
verify();
#if !EMSCRIPTEN
- SDL_Delay(3000);
+ SDL_Delay(1500);
#endif
SDL_Quit();
View
4 tests/runner.py
@@ -7236,10 +7236,10 @@ def test_cubegeom_pre2(self):
self.btest('cubegeom_pre2.c', expected='-1472804742', args=['-s', 'GL_DEBUG=1'])
def test_cubegeom_pre3(self):
- self.btest('cubegeom_pre3.c', expected='-1472804742', args=['-s', 'GL_DEBUG=1'])
+ self.btest('cubegeom_pre3.c', expected='-1472804742')
def test_cubegeom(self):
- self.btest('cubegeom.c', expected='-1402263178')
+ self.btest('cubegeom.c', expected='188641320')
elif 'benchmark' in str(sys.argv):
# Benchmarks. Run them with argument |benchmark|. To run a specific test, do
Please sign in to comment.
Something went wrong with that request. Please try again.