Hello Christoph,
Christoph John wrote:
> Hello,
> I have a question concerning texture coordinates. I would like to store
> texture coordinates as integer values rather then floats as I have to use the
> coordinates as grid indices and I do not want to rescale them.
> Is this currently possible with OpenSG?
if you are using the fixed function OpenGL pipeline (i.e. no shaders)
you only can pass float or double texture coordinates by setting the
texture coordinate properties of a Geometry to an object of type
GeoTexCoords{1,2,3,4}{f,d} properties. Note however that texture
coordinates are not clamped to the [0 .. 1] range so you can pass 0.0f,
1.0f, 3.0f.
If you are using a shader anyways you could "abuse" for example the
secondary colors, as for those there are GeoColor3ub properties. The
downside there is that you are limited to the range 0..255 for the values.
Hope it helps,
Carsten
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users