Using OpenGl extensions in JOGL.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using OpenGl extensions in JOGL.

anandcta123
Hi,

I am rendering non-power-of-two textures using glTextureImage2D with GL_TEXTURE_2D. But I understood that textures will operate as power of two textures. So I learnt about GL_ARB_texture_non_power_of_two, but if I try to use this with OpenGL, I am not found this extension macro with the GL2 class. If I call isExtensionAvailable. it returns true. Please tell me how I can use this extension with JOGL.

If not possible. Give suggestions to use Non-power-of-two textures.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Using OpenGl extensions in JOGL.

Xerxes Rånby
Like you said you can check if the extension is available using:
gl.isExtensionAvailable("GL_ARB_texture_non_power_of_two")

Then please look at the specification of the extension:
http://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt
" There is no additional procedural or enumerant api introduced by this extension except that an implementation which exports the extension string will allow an application to pass in texture dimensions for the 1D, 2D, cube map, and 3D targets that may or may not be a power of two. "

Thats how you use it.


2014-02-04 anandcta123 [via jogamp] <[hidden email]>:
Hi,

I am rendering non-power-of-two textures using glTextureImage2D with GL_TEXTURE_2D. But I understood that textures will operate as power of two textures. So I learnt about GL_ARB_texture_non_power_of_two, but if I try to use this with OpenGL, I am not found this extension macro with the GL2 class. If I call isExtensionAvailable. it returns true. Please tell me how I can use this extension with JOGL.

If not possible. Give suggestions to use Non-power-of-two textures.

Thanks and Regards,
Anand


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Using-OpenGl-extensions-in-JOGL-tp4031433.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Using OpenGl extensions in JOGL.

anandcta123
Hi,

I am not understanding this in detail as a beginner. Currently I am performing texture display using glTexImage2D for non-power-of-2 pixel data with GL_TEXTURE_2D. Is it fine to do like this or is there any specific way to handle non-power-of-2 textures. Please suggest me correct way of handling non-power-of-2 textures, because this API lagging in performance, I want to boost performance.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Using OpenGl extensions in JOGL.

Xerxes Rånby
This post was updated on .
anandcta123 wrote
...I want to boost performance.

Thanks and Regards,
Anand
I suggest you to study a book on modern opengl using the programmable pipeline.
http://www.arcsynthesis.org/gltut/
http://www.arcsynthesis.org/gltut/Texturing/Texturing.html

JOGL 2 ports of the gltut examples can be found at: https://github.com/elect86/modern-jogl-examples

If you want help optimizing your own application then please upload your whole application to a public source-code repository under a free software license and we may give you suggestions how to improve performance. For closed source projects we can provide expert support as consultants.