Texture colour wrapping

Brice Thurin <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAMww5+ZiOztMt=pCVAwFqaQmgYY6fVYyfH1EqqdjMuTBfbD5+Q@mail.gmail.com>
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

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.