Author: ArcRiley Date: 2008-07-15 17:50:03 -0400 (Tue, 15 Jul 2008) New Revision: 1319
Modified: trunk/pysoy/src/scenes/Landscape.pym Log: Ticket #929 : * Landscape position is now dynamic Modified: trunk/pysoy/src/scenes/Landscape.pym =================================================================== --- trunk/pysoy/src/scenes/Landscape.pym 2008-07-15 19:20:06 UTC (rev 1318) +++ trunk/pysoy/src/scenes/Landscape.pym 2008-07-15 21:50:03 UTC (rev 1319) @@ -92,12 +92,12 @@ for _i from 0 <= _i < self._heightmapTex._height : for _j from 0 <= _j < self._heightmapTex._width : _offset = self._heightmapTex._width*_i+_j - self._vertArray[_offset].px = <float> _j / self._heightmapTex._width \ - * self._width + self._position[0] + self._vertArray[_offset].px = <float> _j / \ + self._heightmapTex._width * self._width self._vertArray[_offset].py = self._heightmapTex._texels[_offset] \ - /255.0 * self._height + self._position[1] - self._vertArray[_offset].pz = <float> _i / self._heightmapTex._height \ - * self._depth + self._position[2] + /255.0 * self._height + self._vertArray[_offset].pz = <float> _i / \ + self._heightmapTex._height * self._depth #all below need to be calculated CORRECTLY! self._vertArray[_offset].tx = 0 # _j * texture scale self._vertArray[_offset].ty = 0 # _i * texture scale @@ -163,6 +163,8 @@ gl.glMatrixMode(gl.GL_PROJECTION) gl.glLoadIdentity() gl.gluPerspective(_fovy, _aspect, _znear, 1000.0) + gl.glPushMatrix() + gl.glTranslatef(self._position[0], self._position[1], self._position[2]) if self._buffer: py.PyMem_Free(self._elementArray) # The arrays are in Vram so lets free it in system mem py.PyMem_Free(self._vertArray) @@ -184,6 +186,7 @@ gl.glBindBufferARB(gl.GL_ARRAY_BUFFER_ARB, 0) # # Render the rest of the scene normally + gl.glPopMatrix() Scene._render(self, _fovy, _aspect, _znear, _zfar) """ _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn