OpenGL building texture from sdl surface

hi!

what’s the right way to buil a texture from a surface returned by
sdl_loadbmp?
in the SDL version of [Nehe texturemaping tut] there is GL_BGR passed to
glteximage2d(), but i don’t have it defined in my gl.h file…
if i change it to RGB the colors aren’t right (b<->r) (the nehe logo is
redish instead of blueish)

how to define BGR? or should i get a newer opengl? (1,2), or swap some bytes
somehow?

plz help…

pozdroofki
gz.

hi!

what’s the right way to buil a texture from a surface returned by
sdl_loadbmp?
in the SDL version of [Nehe texturemaping tut] there is GL_BGR passed to
glteximage2d(), but i don’t have it defined in my gl.h file…
if i change it to RGB the colors aren’t right (b<->r) (the nehe logo is
redish instead of blueish)

then you have an outdated version of opengl (1.1 or older, 1.2 has been out
for several years, 1.3 just came out)

how to define BGR? or should i get a newer opengl? (1,2), or swap some bytes
somehow?

upgrade your ogl or flip the R and B bytes

plz help…

pozdroofki
gz.

    -Erik <@Erik_Greenwald> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.