Re: [PyOpenGL-Users] Textures Different Every Time!
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2009-06-21 19:49:35
|
Ian Mallett wrote: > I think I figured out the problem. The array wasn't defining some of > the voxels, so they were random (as in empty memory?). > glPixelStoref(GL_UNPACK_ALIGNMENT,1) fixes it. Ah, and I think I know why it only failed with 3-d textures (would have failed with 1D and 4D too, actually). The PyOpenGL wrapper was only setting unpack alignment for the 2D case. It actually does a lot of configuration to make the operation "natural" for Python code, but it wasn't doing this config for the non-2D versions. I've checked in code to always do the pack alignment setting in the "traditional" (non-raw) API. If you want to test with that, pull from bzr. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |