urgent buzzard
12th February 2004, 23:48
Here is the cel texture code:
void LoadTex(void)
{
GLuint shaderTexture[1];
GLubyte CelShadeDate[16] = {120, 120, 150, 150, 150, 160,160, 255,255, 255, 255, 255, 255, 255, 255, 255};
(*orig_glGenTextures)(1, &shaderTexture[0]);
(*orig_glEnable)(GL_TEXTURE_1D);
(*orig_glBindTexture)(GL_TEXTURE_1D, shaderTexture[0]);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M AG_FILTER, GL_NEAREST);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M IN_FILTER, GL_NEAREST);
(*orig_glTexImage1D)(GL_TEXTURE_1D, 0, GL_RGBA, 16, 0,GL_LUMINANCE, GL_UNSIGNED_BYTE, CelShadeDate);
}
One of the problems is that misc. textures from the map and gui are displayed on the walls, menus, ect.
The other problem is that the texture only looks good on a few models.
EDIT: nvm got it working
Here is a pic:
void LoadTex(void)
{
GLuint shaderTexture[1];
GLubyte CelShadeDate[16] = {120, 120, 150, 150, 150, 160,160, 255,255, 255, 255, 255, 255, 255, 255, 255};
(*orig_glGenTextures)(1, &shaderTexture[0]);
(*orig_glEnable)(GL_TEXTURE_1D);
(*orig_glBindTexture)(GL_TEXTURE_1D, shaderTexture[0]);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M AG_FILTER, GL_NEAREST);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M IN_FILTER, GL_NEAREST);
(*orig_glTexImage1D)(GL_TEXTURE_1D, 0, GL_RGBA, 16, 0,GL_LUMINANCE, GL_UNSIGNED_BYTE, CelShadeDate);
}
One of the problems is that misc. textures from the map and gui are displayed on the walls, menus, ect.
The other problem is that the texture only looks good on a few models.
EDIT: nvm got it working
Here is a pic: