Archived

This topic is now archived and is closed to further replies.

michaweyel

OpenGL init OpenGL without a window...

Recommended Posts

Is it possible to initialize openGL without having a window to draw in? What i want it to is just to print out some Information about the version number, graphics hardware etc. with the glGet...-funtions to the console and then exit. i could use glut with linux or create a window for a win32 app and just not show it but i wonder if there isn''t an easier way (my programm is supposed to work on Linux and Windows and i don''t want to use any libraries like SDL or GLFW or something).

Share this post


Link to post
Share on other sites
As long as i know, in case to use OpenLG commands (gl...) you must have a valid rendering context. I''m aware of any method with which you can get an HGLRC without having a valid window!

HellRaiZer

Share this post


Link to post
Share on other sites
I am not aware of it either, rather I believe it can be done hidding creating the window but do not call showWindow();
or with params of WM_SHOW. That should allow you to get a window handle without actually displaying it.

Share this post


Link to post
Share on other sites