View Full Version : Fixed point data support?
02-26-2009, 09:19 PM
Can anybody please tell me if opengl supports fixed point data for vertex/color/texture etc buffers?
are there any extensions which might do that?
I am not interested in opengl es for this.
02-26-2009, 11:31 PM
There are various data types for OpenGL data.
Colour can be bytes for example.
And Indices can be shorts.
Vertices and the like can be both integer and float.
Texture data is usually integer format, but can also be floating point.
You can use GL_SHORT, GL_INT as well as GL_FLOAT and GL_DOUBLE, and some others..
For example, take a look at the spec for glVertexPointer..
There are also short floating point formats for some commands AFAIK.
I have not used them though.
Is that what you are referring to?
Or did you actually mean with GLSL, i.e. Shaders?
02-27-2009, 01:12 AM
Sorry for not being clear.
I was referring to the fixed point format available in OpenGL ES (16 bit integer, 16 bit fractional part - total 32 bit integer).
OpenGL arrays/vertices etc are traditionally specified in the form you specified. I am looking at any extension that supports the fixed point data type I am referring to in desktop OpenGL.
02-27-2009, 05:41 AM
None that I know of.
Just use 32 bit integer, and divide by 65536 with the modelview matrix.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.