Handling Non-Power-of-two textures.

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

Handling Non-Power-of-two textures.

anandcta123
Hi,

I am having video frames which are non-power-of 2. I am rendering these video frames using glTexImage2D with video width and height.

Please clear my below doubts.

Passing NPOT textures to glTexImage2D API is correct or not. Whether this will decrease the performance of video rendering.

Is there any specific way is there to handle NPOT in jogl. Like NV_texture_rectangle extension which will handle NPOT. OR JOGL itself will handle internally. If we need to handle NPOT rendering, please suggest me, how to handle this.

Thanks and Regards,
Anand

Reply | Threaded
Open this post in threaded view
|

Re: Handling Non-Power-of-two textures.

gouessej
Administrator
Hi

Look at the source code of the classes Texture and TextureData to understand how JOGL handles NPOT. The support of NPOT depends on the support of extensions about NPOT. If NPOT is unsupported, you can use a larger texture whose size is a power of two (which is done in Ardor3D for example, I don't remember whether JOGL does that too) which forces you to send useless data but it's better than nothing.
Julien Gouesse | Personal blog | Website