Color coding

Hi everybody!
I have a 100x100 2D-array of oscillators. Each node(i,j) stores the phase of one oscillator. I want to use color to display the phase of oscillators so I have to draw a square of size 100x100. Each pixel of this square is corresponding to one oscillator.

I am a beginner at OpenGL and X-window programming so please help me!
Thanks a lot!

Hi !

glDrawPixels will render a ram area as an image, I assume you want to update each pixel pretty often so that is one solution, even though not very fast.

Another one is to render each pixel as a quad like:

glBegin( GL_QUADS);
glVertex…



glEnd();

Disable lighting and use glColor… to set the color of each quad.

Mikael