Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Quick Eazy Question,


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Protricity   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 October 2001 - 04:19 PM

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

Sponsor:

#2 Martee   Members   -  Reputation: 476

Like
Likes
Like

Posted 05 October 2001 - 04:30 PM

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.

#3 Maximus   Members   -  Reputation: 124

Like
Likes
Like

Posted 05 October 2001 - 04:31 PM

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

#4 Drizzt DoUrden   Members   -  Reputation: 100

Like
Likes
Like

Posted 05 October 2001 - 04:54 PM

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

#5 Protricity   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 October 2001 - 05:35 PM

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!


#6 Protricity   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 October 2001 - 05:35 PM

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!


#7 Martee   Members   -  Reputation: 476

Like
Likes
Like

Posted 05 October 2001 - 05:42 PM

Use GLfloat. There is absolutely no difference in performance, but you will ensure your code will remain portable.

#8 Protricity   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 October 2001 - 08:24 PM

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?


#9 masonium   Members   -  Reputation: 118

Like
Likes
Like

Posted 06 October 2001 - 09:23 PM

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.


#10 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 07 October 2001 - 08:34 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS