Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct OpenGLWindow : GLCtrl {
- Point point;
- virtual void GLPaint()
- {
- StdView();
- //glClearColor(10.0, 20.0, 10.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glMatrixMode (GL_PROJECTION);
- glLoadIdentity ();
- gluOrtho2D (0.0,xsfact*(float)xs, ysfact*(float)ys, 0.0);
- if (enable_draw)
- {
- int i=0;
- while (i<xs)
- {
- int j=0;
- while(j<ys)
- {
- glBegin(GL_POINTS);
- float tmp_gl=gl_matrix[i][j];
- glColor3f(tmp_gl,tmp_gl,tmp_gl);
- glVertex2f(i,j);
- glEnd();
- j++;
- }
- i++;
- }
- };
- glFlush();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement