   direct x color - OGL color
  Just wondering about the color format direct x.I'm currently using openGL and whenever I'm specifying an array of color elements for use with vertex arrays, I always need to run this loop:// convert colors into a format OGL understands (from a single int,// to a series of chars)for(int i=0; i < vertex_count*4; i+=4){color_buffer = v[i/4].color.getRed();color_buffer[i+1] = v[i/4].color.getGreen();color_buffer[i+2] = v[i/4].color.getBlue();color_buffer[i+3] = v[i/4].color.getAlpha();}Because the format that my color objects are in is ARGB, whereas OpenGL uses RGBA.What does direct x use? The reason why I'm wondering is that is would undoubtedly be easier/faster to just change the internal format of my color object to RGBA and instead of the loop above, just assign it an int at a time.I mean, it's probably not a bottleneck now, but it might be in the future and I'd rather optimise all the small things now, and a big thing later, than all the small things and big things later.Edit:: Second question: if you're using lighting, does everything have to have a material applied to it? (using OGL if it matters) Because I just finished my md2 loader, so do I have to go back and add a material to it, or will it work just fine with only the normals and nothing extra?[Edited by - Endar on December 5, 2005 5:19:26 AM]
  DirectX uses the ARGB convention.May I ask why you need to know how DirectX work when you're using OpenGL ? Because if OpenGL is using RGBA and you're developing for OpenGL, then you should store your data as RGBA, it would be easier / faster, no ?   ;  I'm planning to learn direct x later on when I can use openGL "fluently". So, I was just wondering because I'll be re-using most of the current support/util code for my engine.   