g = (j * 256) / 256;
b = (j * 128) / 256;
a = noise3[y][x] * 3 - 128;
- data[y][x][0] = bound(0, r, 255);
+ data[y][x][2] = bound(0, r, 255);
data[y][x][1] = bound(0, g, 255);
- data[y][x][2] = bound(0, b, 255);
+ data[y][x][0] = bound(0, b, 255);
data[y][x][3] = bound(0, a, 255);
}
}
- explosiontexture = R_LoadTexture2D(explosiontexturepool, "explosiontexture", 128, 128, &data[0][0][0], TEXTYPE_RGBA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_PRECACHE | TEXF_COMPRESS, NULL);
+ explosiontexture = R_LoadTexture2D(explosiontexturepool, "explosiontexture", 128, 128, &data[0][0][0], TEXTYPE_BGRA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_PRECACHE, NULL);
for (y = 0;y < 128;y++)
for (x = 0;x < 128;x++)
data[y][x][0] = data[y][x][1] = data[y][x][2] = 255;
- explosiontexturefog = R_LoadTexture2D(explosiontexturepool, "explosiontexturefog", 128, 128, &data[0][0][0], TEXTYPE_RGBA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_PRECACHE | TEXF_COMPRESS, NULL);
+ explosiontexturefog = R_LoadTexture2D(explosiontexturepool, "explosiontexturefog", 128, 128, &data[0][0][0], TEXTYPE_BGRA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_PRECACHE, NULL);
// note that explosions survive the restart
}
GL_DepthRange(0, 1);
GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset);
GL_DepthTest(true);
- GL_CullFace(GL_FRONT); // quake is backwards, this culls back faces
+ GL_CullFace(r_view.cullface_back);
R_Mesh_Matrix(&identitymatrix);
R_Mesh_ColorPointer(NULL, 0, 0);