]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
manually inlined GL_LockArray and GL_UnlockArray in the only places they were used
[xonotic/darkplaces.git] / gl_textures.c
index 8aa0457f31984dc5ad961b4e1026d3f58bbb4415..a9842972b69bf7abbc9ebd1677ac3755ce643dc3 100644 (file)
@@ -45,7 +45,7 @@ typedef struct
 textypeinfo_t;
 
 static textypeinfo_t textype_qpalette       = {TEXTYPE_QPALETTE, 1, 4, GL_RGBA, 3, 1};
-static textypeinfo_t textype_rgb            = {TEXTYPE_RGB     , 3, 3, GL_RGB , 3, 3};
+static textypeinfo_t textype_rgb            = {TEXTYPE_RGB     , 3, 3, GL_RGB , 3, 1};
 static textypeinfo_t textype_rgba           = {TEXTYPE_RGBA    , 4, 4, GL_RGBA, 3, 1};
 static textypeinfo_t textype_qpalette_alpha = {TEXTYPE_QPALETTE, 1, 4, GL_RGBA, 4, 1};
 static textypeinfo_t textype_rgba_alpha     = {TEXTYPE_RGBA    , 4, 4, GL_RGBA, 4, 1};
@@ -446,6 +446,9 @@ static void r_textures_start(void)
        // deal with size limits of various drivers (3dfx in particular)
        qglGetIntegerv(GL_MAX_TEXTURE_SIZE, &realmaxsize);
        CHECKGLERROR
+       // LordHavoc: allow any alignment
+       qglPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+       CHECKGLERROR
 
        // use the largest scrap texture size we can (not sure if this is really a good idea)
        for (block_size = 1;block_size < realmaxsize && block_size < r_max_scrapsize.integer;block_size <<= 1);