Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / Game Design & Programming / OpenGL -- Texture Promblem Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
maxam

April 14, 2005, 02:47 PM

I recently fixed a few problems with my 3d engine and came accross another. I have been updating my 3ds loader. Before my engine only used texture maps, every object had a texture map or wass assigned the default. No problems so far but I want a color texture, no image just the color. Defined by diffuse, spectacular, and so on. Can I create a texture out of just color info and address it like a image texutre:

glBindTexture(GL_TEXTURE_2D, TextureID);

Would just texture maps be enough or would color textures be needed for particle effects like fire, snow, or rain?

 
Wernaeh

April 14, 2005, 03:09 PM

Either disable texturing (glDisable(GL_TEXTURE)) before drawing elements that should have simple material based coloring, or create a 1x1 pixel completely white texture and use that (since by default, a fragment that has texturing disabled is also white).

Yes, I guess color textures are a requirement for particle effects, since color textures may also contain alpha values, so you can for example fade out the border of your particle quad. Consider the same without texturing: your particles will be single colored, all solid, which probably looks kinda weird.

Cheers,
- Wernaeh

 
Rui Martins

April 15, 2005, 05:08 AM

... Consider the same without texturing: your particles will be single colored, all solid, which probably looks kinda weird.


Do you remember Quake II Particles ?
They were just like that!

It's not that bad, if the particles don't exceed 2 pixels with/height.

 
Wernaeh

April 15, 2005, 02:03 PM

You've got a point there ;) They indeed were cool back then ;o)

Cheers,
- Wernaeh

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.