PDA

View Full Version : Different between GLfloat and float



Binqay
05-12-2001, 05:33 AM
What are the different between:
GLfloat and float | GLint and int | etc..

T2k
05-12-2001, 06:00 AM
ehm ? none !?

look into gl.h !

...

ffish
05-12-2001, 07:44 AM
None on current hardware. There may be differences once 64 bit processors are introduced.

Bob
05-12-2001, 10:17 AM
As ffish says, theres no difference on most hardware today. However, there might be when 64-bit architectures are comming. A GLfloat is guarateed to be 32-bit long, while a float might be 64-bit on a 64-bit architecture. Same goes for other types, int might be of different length on different platforms, but a GLint is guarateed to give you a 32-bit singed integer.

Binqay
05-13-2001, 08:57 PM
So that's mean GLfloat will be faster when the 64 bit architectures come out?

ffish
05-13-2001, 09:57 PM
Depends on the architecture http://www.opengl.org/discussion_boards/ubb/smile.gif It may be optimized for 64-bit floats, just like current architecture likes 32-bit floats.

Binqay
05-14-2001, 12:16 AM
OK,thanks to all.I'll change all my float to GLfloat! Before this,I prefer float than GLfloat because it is shorter http://www.opengl.org/discussion_boards/ubb/smile.gif

john
05-14-2001, 03:39 AM
typedef GLfloat f;

http://www.opengl.org/discussion_boards/ubb/smile.gif