by Rikku2000 » Sun Jan 30, 2011 4:34 pm
Okey i have a way to add Alpha channel:
Go to "Mod_LoadTextures" and before add:
qboolean hl_map;
then go to the line: "if (loadmodel->bspversion == HL_BSPVERSION) { ..." and add here after "byte *data;":
tx->transparent = false;
hl_map = true;
in "if ((data = WAD3_LoadTexture(mt))) {"
you add first:
if (tx->name[0] == '{')
tx->transparent = true;
change now the "GL_LoadTexture32" to:
tx->gl_texturenum = GL_LoadTexture32 (mt->name, tx->width, tx->height, (byte *)data, true, tx->transparent);
okey now we are done in here no open the "gl_rsurf.c" and
go to "R_DrawBrushModel"
before "void" add:
extern qboolean hl_map;
no go to in the void and add after "glColor3f (1,1,1);":
if (hl_map) {
glColor4f (1, 1, 1, 1);
glEnable(GL_ALPHA_TEST);
}
In "gl_model.h" find: "typedef struct texture_s"
add at end of the struct:
int transparent;