glBegin(GL_LINES);
glColor3f(1.0f,0.0,0.0);
glVertex2f(50,1);
glVertex2f(120,1);
glEnd()
;
glBegin(GL_LINES);
glColor3f(1.0f,0.0,0.0);
glVertex2f(50,1);
glVertex2f(120,1);
glEnd()
;
To copy to clipboard, switch view to plain text mode
void Plot::paintGL()
{
glBegin(GL_LINES);
glColor3f(1.0f,0.0,0.0);
glVertex2f(50,1);
glVertex2f(120,1);
glEnd();
}
void Plot::initializeGL()
{
// Also i've tried a lot of combinations here. GL_FLAT and others.
glClearColor(1.0, 1.0 , 1.0, 0.0);
glLoadIdentity();
glTranslatef(0,0.0,0);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glShadeModel(GL_SMOOTH);
}
void Plot::resizeGL(int w, int h)
{
glViewport( 0, 0, (GLint)w, (GLint)h );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0, 800, yMin, yMax, -5.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
}
void Plot::paintGL()
{
glBegin(GL_LINES);
glColor3f(1.0f,0.0,0.0);
glVertex2f(50,1);
glVertex2f(120,1);
glEnd();
}
void Plot::initializeGL()
{
// Also i've tried a lot of combinations here. GL_FLAT and others.
glClearColor(1.0, 1.0 , 1.0, 0.0);
glLoadIdentity();
glTranslatef(0,0.0,0);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glShadeModel(GL_SMOOTH);
}
void Plot::resizeGL(int w, int h)
{
glViewport( 0, 0, (GLint)w, (GLint)h );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0, 800, yMin, yMax, -5.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
}
To copy to clipboard, switch view to plain text mode
Bookmarks