Hi,
Modern OpenGL drivers are optimised for Q3, so storing the colour information in the same format as the game is almost guaranteed to be fastest.
4 bytes packed into an int, not floats. Also D3D takes colour in this form, so I think it''s the way to go.
That''s a shortsighted way of thinking. Beyond that, not all drivers are optimized for Q3. In fact—arguably—no drivers are except for ATI''s. We also mustn''t forget that Windows is not the only OpenGL platform.
I''d say go with the real numbers and then just have some constant that represents 1/256 (.00390625). While the video cards have 8bit color components, the API that rests on top of them work in a different number format, and those API are usually highly optomized by highly paid professionals, which means you probably couldn''t out do their code.
:: Inmate2993
:: William C. Bubel
"Please refrain from bothering Booster."
:: Inmate2993
:: William C. Bubel
"Please refrain from bothering Booster."
quote:Original post by ANSI2000
Scuse me the look up table was my idea!!! Trying to short change me over heres
Oops, sorry bout that Ansi2000, thought it was Admiral Binary that posted it. My mistake.
Beer - the love catalyst
Oh yeah, I am not sure if anyone else has mentioned this above (can''t be bothered checking) but you can use (albeit it is slower) glColor3b() instead (or something similar to it if I got the name wrong).
There are variants of the functions that take different types (float, int, double, char) and stuff, so just use the char version.
Beer - the love catalyst
There are variants of the functions that take different types (float, int, double, char) and stuff, so just use the char version.
Beer - the love catalyst
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement