PDA

View Full Version : Version of OpenGL



WikiBorneo
05-11-2011, 05:44 AM
Hi guys,

I am new in OpenGL - can anyone tell me, How can I write simple code (In Java) to know what version, vendor, renderer and extension of OpengGL I am using?

I would like to define these four string variables to hold all the results querying GL_VENDOR,GL_RENDERER, GL_VERSION and GL_EXTENSIONS and add some code in the init() method to query these results. Then create a new JFrame and write the results into it.

Anyone can help me please?
Thank you.

WikiBorneo
05-11-2011, 06:26 AM
I tried to do as following in the init() method:

glGetString(GL_VERSION);

but it does not like the glGetString - so should I put it as gl.glGetString(GL_VERSION);?

Anyone please?

przemo_li
05-11-2011, 06:29 AM
glGetString(GL_VERSION);

Is a good way to check gl version but AFTER creating opengl context. Extensions are queried by similar method. Look at Java bindings docs.

WikiBorneo
05-11-2011, 09:10 AM
Thanks...got it there at the end..!