Jump to content
  • Advertisement
Sign in to follow this  
TTK-Bandit

glcolor4ub vs glcolor4f

This topic is 3639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

does anyone know any updated information on this topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=267824 I'm just wondering if it would be fine using bytes now instead of float on a completely new engine, or is there any performance issue or any other issue with using bytes instead of float for a color class..

Share this post


Link to post
Share on other sites
Advertisement
A completely new engine should not be using any of GL's immediate rendering functions (glcolor, glvertex, etc...) - instead you should copy your colour (and vertex/tex coord/etc) data into a Vertex Buffer Object.

Floats are probably preferred to bytes these days, as they are much more flexible.

Share this post


Link to post
Share on other sites
well ok, but there is still 2D drawing, you don't put font drawing & other hud elements into vbo's, do you ?
and in what points exactly are they more flexible.. since floats take 4x as much memory, it is at least worth a thought..

Share this post


Link to post
Share on other sites
You should use VBOs for all geometry in a "next gen" GL engine.

You can use the immediate mode functions for simple geometry, but it will still be less efficient than using a VBO. Inside the graphics driver, when you use the immediate functions it has to build a VBO itself - which is why these functions have been deprecated.

Share this post


Link to post
Share on other sites
Quote:
Original post by TTK-Bandit
well ok, but there is still 2D drawing, you don't put font drawing & other hud elements into vbo's, do you ?

Yep, you do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!