Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 safe it is to use GL_ARB_texture_rectangle  (Read 1528 times)
0 Members and 1 Guest are viewing this topic.
Offline Bombadil

Senior Member





« Posted 2005-03-16 13:48:55 »

According to  http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_rectangle.txt

the former extension "GL_EXT_texture_rectangle" became an official ARB extension in summer 2004: "GL_ARB_texture_rectangle".

Please also see
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1110639195

Nvidia drivers support the GL_ARB_texture_rectangle extension, Ati drivers support the older but technically equivalent GL_EXT_texture_rectangle extension, to name two of the biggest 3d card vendors.

How safe is it to use this extension extensively in a 2d OpenGL game, which is targeted at computers with a minimum of 64 MB texture memory? Are there any numbers to see how many older PCs/Macs/Workstation ;-) you're going to upset?
Offline Spasi
« Reply #1 - Posted 2005-03-16 14:50:29 »

All of the texture_rectangle extensions (ARB, EXT, NV) define the same constants, with the same values. If any of the above is present, you can use rectangle textures.

That means, you can use it on:

ATI Radeon 7000 or better
NVIDIA GeForce 1 or better

Given your minimum, I'd say you're ok.
Offline Bombadil

Senior Member





« Reply #2 - Posted 2005-03-16 14:51:25 »

The linked OpenGL extension registry says:
Quote
4) Should anything be said about performance?
No, but developers should not be surprised if conventional POTS textures will render slightly faster than texture rectangle textures. This is particularly likely to be true when texture rectangle textures are minified leading to texture cache thrashing due to lack of support for mipmaps.

Anybody with experiences on this?
What magnitude is "render slightly faster" ?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Bombadil

Senior Member





« Reply #3 - Posted 2005-03-16 14:52:50 »

Quote
All of the texture_rectangle extensions (ARB, EXT, NV) define the same constants, with the same values. If any of the above is present, you can use rectangle textures.

That means, you can use it on:

ATI Radeon 7000 or better
NVIDIA GeForce 1 or better

Given your minimum, I'd say you're ok.

Sounds very good.
Thanks for your suggestion.


One final question, though: compression of rectangle textures.
Paragraph "9) Can compressed texture images be specified for a rectangular texture?" says something about it.
I'm not sure if I fully undersand it, though. Can I still use
gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA, ...)
as I did for power-of-two textures (provided the card supports the extension "GL_ARB_texture_compression") ?

Is it "just" that you can't use glCompressedTexImage ?
Offline Spasi
« Reply #4 - Posted 2005-03-16 15:39:30 »

Quote
Anybody with experiences on this?
What magnitude is "render slightly faster" ?


I would not expect much difference, but it generally depends. For example, I recently read that ATI does not support unnormalized texture coordinates, so they have to add, behind the scenes, the proper instructions in a fragment shader to normalize the texcoords. Another possibility is that the texture gets resized to the next POT dimensions (you lose memory of course) and then texcoords get treated accordingly.

But rectangle textures may be faster in other cases. One example is render-to-texture. Because render-to-texture works better with unswizzled formats and rectangle textures are generally stored that way, it actually renders faster. I have verified this in Marathon.

Quote
I'm not sure if I fully undersand it, though. Can I still use
gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA, ...)
as I did for power-of-two textures (provided the card supports the extension "GL_ARB_texture_compression") ?

Is it "just" that you can't use glCompressedTexImage ?


I haven't tried it but, if I read correctly, I think you may use GL_COMPRESSED_X in glTexImage, but most probably you won't get any compression (you should try though).
Offline Bombadil

Senior Member





« Reply #5 - Posted 2005-03-17 05:30:54 »

Quote

Another possibility is that the texture gets resized to the next POT dimensions (you lose memory of course) and then texcoords get treated accordingly.

Thanks for your reply! I'm going to do some tests on the rectangle extension with compression.
However, if internally NPOT textures would be expanded to POT dimensions, this would kill my intended benefts and explode my VRAM usage... Because I use very many 2d texture sprites. So long I put the small sprites into large texture pages. However handling them is very awkward, especially when it comes to animations of large hierarchical 2d sprites.

I'm going to have to study if NPOT textures are expanded by some drivers/cards...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (24 views)
2014-04-15 18:08:23

BurntPizza (19 views)
2014-04-15 03:46:01

UprightPath (33 views)
2014-04-14 17:39:50

UprightPath (17 views)
2014-04-14 17:35:47

Porlus (33 views)
2014-04-14 15:48:38

tom_mai78101 (59 views)
2014-04-10 04:04:31

BurntPizza (117 views)
2014-04-08 23:06:04

tom_mai78101 (217 views)
2014-04-05 13:34:39

trollwarrior1 (184 views)
2014-04-04 12:06:45

CJLetsGame (191 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!