Quick Eazy Question,
What is the difference (in VC++) between float and GLfloat?
I know that the values are the same, but does GLfloat get calculated with hardware or what?
I mean, I dont see a point in having two variable types that do the same thing!
thx
typedef float GLfloat;
They are the same - on this particular architecture and this particular compiler. But they aren''t guaranteed to be the same everywhere else.
They are the same - on this particular architecture and this particular compiler. But they aren''t guaranteed to be the same everywhere else.
They''re the same, but I dont know the reason why.
Just remember that all through the C language there are identical types with different names. char, byte and bool are all a single byte as well
Just remember that all through the C language there are identical types with different names. char, byte and bool are all a single byte as well
Yeah, and what about when your making functions, like:
void Render();
sometimes I see:
GLvoid Render();
Whats up with that? And GLint... just structures holding a int/whatever it may be?
"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche
void Render();
sometimes I see:
GLvoid Render();
Whats up with that? And GLint... just structures holding a int/whatever it may be?
"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche
so, should I use float or GLfloat?
does it make a difference?
is one more efficient?
does one get calculated on the GFX card as opposed to the processor?
hmm, well if u can answer, thn thx!
does it make a difference?
is one more efficient?
does one get calculated on the GFX card as opposed to the processor?
hmm, well if u can answer, thn thx!
so, should I use float or GLfloat?
does it make a difference?
is one more efficient?
does one get calculated on the GFX card as opposed to the processor?
hmm, well if u can answer, thn thx!
does it make a difference?
is one more efficient?
does one get calculated on the GFX card as opposed to the processor?
hmm, well if u can answer, thn thx!
Use GLfloat. There is absolutely no difference in performance, but you will ensure your code will remain portable.
I see, thanks.
I dont need portability, but at least I know why its there.
I thought that mabey GLfloats were calculated by the hardware,
that would take the math load off hte processor, thadda be sweet!
but I guess thats something for the future of Geforce 3 eh?
I dont need portability, but at least I know why its there.
I thought that mabey GLfloats were calculated by the hardware,
that would take the math load off hte processor, thadda be sweet!
but I guess thats something for the future of Geforce 3 eh?
quote:Original post by Martee
Use GLfloat. There is absolutely no difference in performance, but you will ensure your code will remain portable.
As long as you''re using C++, GLfloat will be no more portable than float.
quote by masonium: As long as you''re using C++, GLfloat will be no more portable than float.
Actually the purpose is developmental portability. There might be a difference between Borland C++''s definition of int, and Visual C++''s definition of int, so the designers of OpenGL decided to make it easier for it''s users to develop using different compilers. Really a good idea given how many people develop over the internet.
-Brent Robinson
Actually the purpose is developmental portability. There might be a difference between Borland C++''s definition of int, and Visual C++''s definition of int, so the designers of OpenGL decided to make it easier for it''s users to develop using different compilers. Really a good idea given how many people develop over the internet.
-Brent Robinson
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement