Archived

This topic is now archived and is closed to further replies.

abit help for a 3d newbie

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

Recommended Posts

hello i''m new to 3d in windows... could you explain me how i use the rgb since it''s from 0 to 1 and not 0 to 63.. and how about the 3d co-ordinates same as the rgb floats system? thanks arkon qsoft.cjb.net

Share on other sites
Not sure what you''re talking about... 0..63 is only for 8-bit colors (palettized modes) so if you''re not using that, you dont need to worry about it...

the way RGB works is basically the same in theory as the palettized mode... instead of creating a palette and initializing it with RGB triplets, and then plotting the indecies to those RGBs, you simply plot the RGB value straight to the buffer (which is usually 3 bytes in size, and sometimes 4 if it includes alpha channel).

the only difference is that when using palettes you can only output 256 colors where as with RGB triplets (16-bit, 24-bit, 32-bit modes) a lot more than that.. that''s a good thing the bad thing is that they are very slow, especially 24-bit and 32-bit...

i dont know if that makes any sense.. it doesnt to me.. anyways.. hope it doesnt confuse you more, if it doesnt help any...

Share on other sites
I think that your are using floating point numbers to approximate your rgb values. Try using a value between 0 and 1, i.e 0.5f and see if that works. I would prefer using a more acurate Hex representation. By the way are you using OpenGL?

Share on other sites
I didn''t say that I don''t know how VESA works or whatever

maybe you both didn''t understand
so i''ll explain it again i asked how to compute the normal floating (float X) to the OpenGL floating...
that''s it
and yes, i''m learning/using opengl

Share on other sites
there is an opengl glColor something command that accepts 0 to 255 values for the colors. I don't remember the exact command. is this closer to what you're looking for. also, don't be so short with people when you don't properly explain your problem.

JoeMont001@aol.com www.polarisoft.n3.net

Edited by - Julio on July 14, 2000 10:16:48 PM

Share on other sites
If you'd lookup the GL_float in the gl.h header file, you'd probably find something like:
  #define GL_float floatortypedef float GL_float;

I'm just guessing, but I'm certain: - they are the same...!

(ps: Arkon - You are a little confusing -)

Edited by - BasKuenen on July 14, 2000 10:22:41 PM

Share on other sites
Am I making any sense? Are you making any sense?

There seems to be a tiny bit of miss-communication...

Can someone clean this up? Arkon?

Share on other sites
I program in OpenGL...
for tha RGB in OpenGL, it''s 0-255 but it''s sorta different
it''s like for a RGB of (23,65,70) it''s glColorf(0.23,0.65,0.70);
it''s just a tenth...that''s why I think you mean 0-1...0 is none and 1 is full...everything inbetween is what u want.

Later,

email - mistercool@mail.com
homepage - www.tf-hq.com
codeStar

Share on other sites
sorry for being a bit confusing my english isn''t so good...

well so now how do i know how much is 155 in the float??
i can''t just divide it by 100 cuz it will be more than 1...

so how do i calculate it?

1. 1
Rutin
28
2. 2
3. 3
4. 4
5. 5

• 13
• 11
• 10
• 13
• 20
• Forum Statistics

• Total Topics
632950
• Total Posts
3009424
• Who's Online (See full list)

There are no registered users currently online

×