[PyOpenGL-Users] Texture colour wrapping
Brought to you by:
mcfletch
From: Brice T. <bps...@gm...> - 2011-11-04 14:24:57
|
Good Afternoon, I am new to OpenGL and I was wondering if somebody could tell me if what I am intending to do is feasible with PyOpenGL. Here is my problem, I have data contained in a 2D numpy array of type float. The values in the array are phase data in polar coordinates. From the array, I am creating a texture which I mapped using quad strips in order to get the polar to cartesian conversion. Once this mapping is done I would like to "wrap" the phase/colour value. For example, I could have phase value ranging from 0.0 to 6.2 and I want to ignore the integer par of the value so value(1.3) = value(2.3) =value(3.3) etc... I can not do the "colour wrapping" before the mapping (I've tried). The results is not right an limited by the resolution of the texture. I was wondering if it would be possible to do such a wrapping, I have been thinking maybe a lookup table or a shader could be used... This is where I would appreciate getting some advices. Thanks in advance. Regards Brice |