Skip to main content

(Multi)Texture Memory Bloat ?

1 reply [Last post]
nvaidya
Offline
Joined: 2004-08-03
Points: 0

Alright, this has been bothering me for a while now, and I want to find out if there is something that I've missed reading in the docs.

Firstly - as a confirmation - if I do really want the functionality of a Texture1D, there is currently no alternative in Java3D other than to specify a Texture2D and, additionally, provide a TextureCoords array of length 2 * numVerts as opposed to 1 * numerts, am I right ?

Secondly, I'm very intrigued about the TEXTURE_COORDINATE_n flag that has to be specified as part of the GeometryArray. Now, in a multitexture scenario, doesn't this mean that every texture stage has to have TexCoord arrays all of the same length ? Is this an OpenGL restriction ?

For example, consider the following multitexture geometry spec.:
stage 1: texture_coord_1
stage 2: texture_coord_1
stage 3: texture_coord_3

The actual dimensionality of Texture image object is actually irrelevant. The above spec., for example, is what I'm using to model color-mapped, alpha mapped, anisotropically lit lines. Because of the restriction that the TexCoord dimensionality (TEXTURE_COORDINATE_n) has to be specified on a per-geometry basis, as opposed to per element of TexCoordSetMap/TextureUnitState, and the restriction (am I right here ?) that all the TexCoord arrays will have to have a length as a multiple of "n", I think that there is needless memory bloat.

For instance, in the above spec., for a geometry with million verts, there is a memory bloat of 16MB assuming that we have the Texture1D facility in Java3D. So, the question is should TEXTURE_COORDINATE_n be efficiently specified as an array corresponding to TexCoordSetMap ? And wouldn't such considerations also arise in vertex-varying parameters in Shaders ?

If I'm grossly missing something in the API, let me know. Otherwise, I'll like to submit an RFE.

Thanks

Message was edited by: NVaidya

Message was edited by: NVaidya

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nvaidya
Offline
Joined: 2004-08-03
Points: 0

*Bump*

Kevin,

Any thoughts on the above ?

Thanks

-- Vaidya