Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to use OpenGL extensions in JOGL  (Read 2627 times)
0 Members and 1 Guest are viewing this topic.
« Posted 2003-08-01 11:42:55 »

Good day. I try to learn Multi-Texturing in Jogl. Like in the Win32 tutorial

I'm new to OpenGL and extensions. Like the tutorial, my program should ask at runtime if the extension "glActiveTextureARB" is available. So I've to use the gl.isExtensionAvailable(...), but how?
Are the Jogl extension names different to the OpenGL ones? I read the Jogl Javadoc (javadoc_public.tar.gz) which says the ARB or EXT is in front of the name, but I don't understand it. Which extension name do I have to use for glActiveTextureARB when I call gl.isExtenionsAvailable(...) ? The Jogl demos just use the function without asking if it's available.

JOGL does report this:
 gl.isExtensionAvailable("GL_EXT_texture_lod"). . . . . . -> true
 gl.isExtensionAvailable("GL_ARB_vertex_buffer_object") . -> true
 gl.isExtensionAvailable("GL_EXT_abgr") . . . . . . . . . -> true
 gl.isExtensionAvailable("GL_ARB_multitexture") . . . . . -> true
 gl.isExtensionAvailable("GL_activetexture"). . . . . . . -> false
 gl.isExtensionAvailable("GL_ARB_activetexture"). . . . . -> false

By the way the extension glActiveTextureARB can be found in the GlExt.h file here  but not in the OpenGL registry . Why is this?
Offline albanc

Senior Newbie

« Reply #1 - Posted 2003-08-01 12:05:52 »

You shouldn't confuse the extension name with the name of the OpenGL commands the extension gives you access to.
If you look at again, you'll notice that GL_ARB_multitexture is an extension, but GL_activetexture doesn't exist as an extension (it is the command name gl.activeTexture() that you intended to convert as an extension !)

In fact, when GL_ARB_multitexture extension is marked as available, it gives you access to all the OpenGL commands associated with it, gl.activeTexture()  being one of these.
« Reply #2 - Posted 2003-08-01 12:57:20 »

Oh, I see. Thank you.

The C++ tutorial source code does some pointer fetching with glActiveTextureARB... so I thought I would have to do this with Jog's isExtensionAvaiable, too. :-)

In the OpenGl registry site I look at ARB_multitexturing and it says it is now standard since OpenGL 1.2.1 and "look at Gl 1.2.1 specification". I download the GL 1.2.1 PDF from and voila: there I see all the new commands. Fine.

Am I correct in assuming that Jogl's glActiveTexture() and glActiveTextureARB() functions are identical?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline albanc

Senior Newbie

« Reply #3 - Posted 2003-08-01 13:02:12 »

and you can figure if a specific OpenGL function is available using :
isFunctionAvailable(String glFunctionName)
Not to confuse with :
isExtensionAvailable(String glExtensionName)  !


« Reply #4 - Posted 2003-08-01 13:24:50 »

and you can figure if a specific OpenGL function is available using :
isFunctionAvailable(String glFunctionName)
Not to confuse with :
isExtensionAvailable(String glExtensionName)  !

Ok, thanks. So with isExtensionAvailable("GL_ARB_multitexture") you can see if that multitexture extension is available. The glActiveTextureARB() function being one of this extension's functions. A isFunctionAvailable("glActiveTextureARB") will result in true in this case.

But I can't imagine at the moment why I should want to ask for the function. I learned from your above posts that I ask for the extension GL_ARB_multitexture (with isExtenionAvailable) and then I should be able to call glActiveTextureARB(...).
So why a isFunctionAvailable...?
Offline DrLabman

Junior Newbie

Opengl games rock!

« Reply #5 - Posted 2003-08-01 22:15:16 »

the only time ive had to check for a function is with ati's GL_ATIX_PN_TRIANGLES also called GL_ATI_PN_TRIANGLES which isn't in the extention list when it should be,  so checking if the function glPNTrianglesiATI was available was the only way to see if i could use the extention.

In most cases you should just be able to check for the extention (or check your opengl version number as in the multitexture case if its later than 1.2.1 it must be there)

QMB Quake Engine -
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

BurntPizza (28 views)
2015-10-08 03:11:46

BurntPizza (16 views)
2015-10-08 00:30:40

BurntPizza (19 views)
2015-10-07 17:15:53

BurntPizza (32 views)
2015-10-07 02:11:23

KaiHH (38 views)
2015-10-06 20:22:20

KaiHH (16 views)
2015-10-06 19:41:59

BurntPizza (32 views)
2015-10-06 19:04:48

basil_ (46 views)
2015-09-30 17:04:40

shadowstryker (25 views)
2015-09-29 15:55:06

TheSpaceHedgehog (31 views)
2015-09-29 01:58:48
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!