Jump to content
  • Advertisement

Archived

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

michaweyel

OpenGL init OpenGL without a window...

This topic is 5398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Take a look at the source to glxinfo - it does what you''re talking about:

http://dri.sourceforge.net/res/glxinfo.c

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!