textures, lightmaps, hardcoded texture hack for testing
[laserbrain_demo] / src / texture.cc
index a787abd..5bf291d 100644 (file)
@@ -381,14 +381,17 @@ static int glfmt_from_ifmt(unsigned int ifmt)
        switch(ifmt) {
        case GL_LUMINANCE16F_ARB:
        case GL_LUMINANCE32F_ARB:
+       case GL_SLUMINANCE:
                return GL_LUMINANCE;
 
        case GL_RGB16F:
        case GL_RGB32F:
+       case GL_SRGB:
                return GL_RGB;
 
        case GL_RGBA16F:
        case GL_RGBA32F:
+       case GL_SRGB_ALPHA:
                return GL_RGBA;
 
        default:
@@ -421,15 +424,15 @@ static int glifmt_from_imgfmt(Image::Format fmt)
 {
        switch(fmt) {
        case Image::FMT_GREY:
-               return GL_LUMINANCE;
+               return GL_SLUMINANCE;
        case Image::FMT_GREY_FLOAT:
                return GL_LUMINANCE16F_ARB;
        case Image::FMT_RGB:
-               return GL_RGB;
+               return GL_SRGB;
        case Image::FMT_RGB_FLOAT:
                return GL_RGB16F;
        case Image::FMT_RGBA:
-               return GL_RGBA;
+               return GL_SRGB_ALPHA;
        case Image::FMT_RGBA_FLOAT:
                return GL_RGBA16F;
        default: