#include <OpenGL/gl3.h>
#include <glut/glut.h>
#include <stdio.h>
void display (void) {
glClearColor (0.5,0.0,0.0,0.0);
glClear (GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
int main(int argc, char* argv[]) {
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_3_2_CORE_PROFILE);
glutInitWindowSize (950, 570);
glutInitWindowPosition (10, 10);
glutCreateWindow ("GLUT Core Profile Demo");
glutDisplayFunc (display);
printf("Version: %s\r\n", glGetString(GL_VERSION));
printf("Renderer: %s\r\n", glGetString(GL_RENDERER));
printf("Vendor: %s\r\n", glGetString(GL_VENDOR));
printf("GLSL Version: %s\r\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
glutMainLoop();
return 0;
}
And I get this output too:
Version: 3.3 ATI-8.24.11
Renderer: ATI Radeon HD 4850 OpenGL Engine
Vendor: ATI Technologies Inc.
GLSL Version: 3.30
Now I made some changes in order to add a FLTK window. When I run the code I get the window, everything is ok but the background is gray, this is the code:
#include <OpenGL/gl3.h>
#include <glut/glut.h>
#include <stdio.h>
#include <Fl/Fl.H>
#include <FL/Fl_Double_Window.H>
void display (void) {
glClearColor (0.5,0.0,0.0,0.0);
glClear (GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
int main(int argc, char* argv[]) {
Fl_Double_Window *window_glut = new Fl_Double_Window(970, 590);
window_glut->end();
window_glut->show();
window_glut->begin();
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_3_2_CORE_PROFILE);
glutInitWindowSize (950, 570);
glutInitWindowPosition (10, 10);
glutCreateWindow ("GLUT Core Profile Demo");
glutDisplayFunc (display);
window_glut->end();
printf("Version: %s\r\n", glGetString(GL_VERSION));
printf("Renderer: %s\r\n", glGetString(GL_RENDERER));
printf("Vendor: %s\r\n", glGetString(GL_VENDOR));
printf("GLSL Version: %s\r\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
Fl::run();
return 0;
}
Of course, the output is the same (Vendor, GLSL Version, etc.). And when I run these codes in Linux, both works well.
Hope you can help me :)
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.