croman102's picture

Using OpenGl without window

Hello,

I want to use some simple openGL calls without actually rendering anything (get version, get vendor...). What is the fastest way of doing this? If I just call:
Console.WriteLine(GL.GetString(StringName.Renderer));
it returns Object reference not set to an instance of an object.

Thank you


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

You need an OpenGL context before you can issue OpenGL calls. The simplest way is to create an invisible GameWindow (set Visible = false in the Load event).

croman102's picture

Thank you