Jump to content
  • Advertisement

Archived

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

superpig

glGetString out of context

This topic is 5375 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 call glGetString without creating a context first? Failing that, is it possible to create a context without a visible window? I want to check the various things glGetString tells me (like the available OpenGL extensions) without actually creating a window/initializing the renderer.

Share this post


Link to post
Share on other sites
Advertisement
i think you''ll find pretty much ALL the OGL commands require a context, however you can create one without a visable window, just dont tell windows to show it
The OpenGL Extension Viewer uses this system afaik (and i''ll be using the same trick)

Share this post


Link to post
Share on other sites
in my experience that depends on:

years ago, when the first TNT cards went out,
and when ATI''s current card was this shitty-8MB-software-only-card (i forgot the name), i encountered different situations:
on nvidia cards it worked without creating a context and activating it, on ATI card''s it didn''t work - since then i''m creating always a context.
i wouldn''t rely on such topics; do it the save way...

DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites
Yes, glGetString does require a valid rendering context. However I don''t think you need a window : you should try creating a rendering context for the desktop.

Share this post


Link to post
Share on other sites
quote:
Original post by superpig
I want to check the various things glGetString tells me (like the available OpenGL extensions) without actually creating a window/initializing the renderer.

Creating an invisible context would be about the only way to do it IIRC, but you might not get the results you expect. The extensions avalible can be different depending on the context.

Share this post


Link to post
Share on other sites
creating a pretty generic window seems to do the trick something like 16bit color, 16bit z-buffer, no stencil, 800*600, no accum - if your gfx card cant hardware accelrate that then ya doomed tbh :D

As for getting the context from the desktop, bad bad bad naughty and bad and not remotely recomended, it can cause problems, ya better of building and making your own window, setting it up with a tempory context, finding ya info and then shuting down again.
With the desktop system i think you can get ownership problems and just because it happens to work now doesnt mean it will forever, best not to take the chance imo

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!