[flatland-cvs] flatland/demo complex.cpp,1.2,1.3 demo.cpp,1.2,1.3 platform.h,1.2,1.3
Status: Alpha
Brought to you by:
prideout
From: Philip R. <pri...@us...> - 2005-07-03 20:00:59
|
Update of /cvsroot/flatland/flatland/demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27049/demo Modified Files: complex.cpp demo.cpp platform.h Log Message: Nuked dependency on GLU. Fixed spelling error "Southernmost" in complex.cpp. Added World::IsCorrupt() method for detecting singularities. Fixed a singularity that was sometimes seen with the catapult. Renamed license-bsd.txt to bsd-license.txt. Fixed aliasing in wheel spokes in complex-demo by using linear filtering. Index: demo.cpp =================================================================== RCS file: /cvsroot/flatland/flatland/demo/demo.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** demo.cpp 6 Mar 2005 14:48:05 -0000 1.2 --- demo.cpp 3 Jul 2005 20:00:50 -0000 1.3 *************** *** 23,27 **** Color Color::PaleGreen(0.75,0.85,0.75,1); ! const float Point::Size = 5; void Demo::glColor(const Color& color) { glColor4fv((float*) &color); } --- 23,27 ---- Color Color::PaleGreen(0.75,0.85,0.75,1); ! const float Point::Size = 10; void Demo::glColor(const Color& color) { glColor4fv((float*) &color); } *************** *** 682,697 **** glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE); ! if (const bool mipmapping = false) ! { ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ! glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); ! } ! else ! { ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR); ! gluBuild2DMipmaps(GL_TEXTURE_2D, 4, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); ! } return texId; } --- 682,688 ---- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE); glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); return texId; } *************** *** 702,705 **** --- 693,697 ---- world.GenerateContacts(space); world.QuickStep(delta); + assert(!world.IsCorrupt(space)); } Index: platform.h =================================================================== RCS file: /cvsroot/flatland/flatland/demo/platform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** platform.h 6 Mar 2005 14:48:05 -0000 1.2 --- platform.h 3 Jul 2005 20:00:50 -0000 1.3 *************** *** 16,20 **** #include <windows.h> #include <GL/gl.h> - #include <GL/glu.h> #include <GL/wglext.h> void fatalf(const char* format, ...); --- 16,19 ---- *************** *** 25,29 **** #include <GL/gl.h> - #include <GL/glu.h> #define fatalf(...) { fprintf(stderr, __VA_ARGS__); exit(1); } --- 24,27 ---- Index: complex.cpp =================================================================== RCS file: /cvsroot/flatland/flatland/demo/complex.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** complex.cpp 6 Mar 2005 14:48:05 -0000 1.2 --- complex.cpp 3 Jul 2005 20:00:50 -0000 1.3 *************** *** 735,739 **** } ! // Southermost, easternmost, westernmost terrain t = new Terrain(vec2(-250, 400), 5000); for (float x = 0.5 + 0.1; x < 10; x += 0.1) --- 735,739 ---- } ! // Southernmost, easternmost, westernmost terrain t = new Terrain(vec2(-250, 400), 5000); for (float x = 0.5 + 0.1; x < 10; x += 0.1) |