Adding stuff like specular highlights - required changes to texture loading to prevent gamma adjustments on all textures.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@203 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-13 03:20:04 +00:00
parent 18307cdb47
commit c0c2130978
15 changed files with 1814 additions and 1217 deletions

View file

@ -1478,7 +1478,7 @@ int GL_LoadTexture8Bump (char *identifier, int width, int height, unsigned char
int image_width, image_height; int image_width, image_height;
qbyte *COM_LoadFile (char *path, int usehunk); qbyte *COM_LoadFile (char *path, int usehunk);
int Mod_LoadHiResTexture(char *name, qboolean mipmap, qboolean alpha) int Mod_LoadHiResTexture(char *name, qboolean mipmap, qboolean alpha, qboolean colouradjust)
{ {
qboolean alphaed; qboolean alphaed;
char *buf, *data; char *buf, *data;
@ -1605,7 +1605,7 @@ int Mod_LoadReplacementTexture(char *name, qboolean mipmap, qboolean alpha)
{ {
if (!gl_load24bit.value) if (!gl_load24bit.value)
return 0; return 0;
return Mod_LoadHiResTexture(name, mipmap, alpha); return Mod_LoadHiResTexture(name, mipmap, alpha, true);
} }
int Mod_LoadBumpmapTexture(char *name) int Mod_LoadBumpmapTexture(char *name)
@ -1671,7 +1671,6 @@ int Mod_LoadBumpmapTexture(char *name)
} }
else else
{ {
// Sys_Error("Unsupported picture \"%s\"", name);
BZ_Free(buf); BZ_Free(buf);
continue; continue;
} }
@ -1683,56 +1682,6 @@ int Mod_LoadBumpmapTexture(char *name)
} }
} }
return 0; return 0;
/*
char *buf, *data;
int len;
// int h;
int width, height;
char *path[] ={
"%s",
"override/%s.tga",
"%s.tga",
"progs/%s"};
int i;
if ((len = GL_FindTexture(name))!= -1) //don't bother if it already exists.
return len;
//should write this nicer.
for (i = 0; i < sizeof(path)/sizeof(char *); i++)
{
if ((buf = COM_LoadFile (va(path[i], name), 5)))
{
if ((data = ReadTargaFile(buf, com_filesize, &width, &height, 2))) //Only load a greyscale image.
{
len = GL_LoadTexture8Bump(name, width, height, data, true);
BZ_Free(data);
}
else if ((data = ReadTargaFile(buf, com_filesize, &width, &height, false))) //Image is more than just greyscale.
{
len = GL_LoadTexture32(name, width, height, (unsigned*)data, true, false); //must be normal
BZ_Free(data);
}
else
{
// Sys_Error("Unsupported picture \"%s\"", name);
BZ_Free(buf);
continue;
}
BZ_Free(buf);
return len;
}
}
return 0;*/
} }

View file

@ -630,7 +630,7 @@ void R_ParticleEffect_f(void)
#ifdef RGLQUAKE #ifdef RGLQUAKE
if (qrenderer == QR_OPENGL) if (qrenderer == QR_OPENGL)
{ {
ptype->texturenum = Mod_LoadHiResTexture(ptype->texname, true, true); ptype->texturenum = Mod_LoadHiResTexture(ptype->texname, true, true, true);
if (!ptype->texturenum) if (!ptype->texturenum)
ptype->texturenum = explosiontexture; ptype->texturenum = explosiontexture;
} }
@ -840,7 +840,7 @@ void R_ClearParticles (void)
{ {
if (*part_type[i].texname) if (*part_type[i].texname)
{ {
part_type[i].texturenum = Mod_LoadHiResTexture(part_type[i].texname, true, true); part_type[i].texturenum = Mod_LoadHiResTexture(part_type[i].texname, true, true, true);
if (!part_type[i].texturenum) if (!part_type[i].texturenum)
part_type[i].texturenum = explosiontexture; part_type[i].texturenum = explosiontexture;
} }

View file

@ -1865,7 +1865,7 @@ void CModQ3_LoadShaders (lump_t *l)
#ifdef RGLQUAKE #ifdef RGLQUAKE
if (qrenderer == QR_OPENGL) if (qrenderer == QR_OPENGL)
{ {
loadmodel->texinfo[i].texture->gl_texturenum = Mod_LoadHiResTexture(in->shadername, true, false); loadmodel->texinfo[i].texture->gl_texturenum = Mod_LoadHiResTexture(in->shadername, true, false, true);
loadmodel->texinfo[i].texture->gl_texturenumfb = 0; loadmodel->texinfo[i].texture->gl_texturenumfb = 0;
loadmodel->texinfo[i].texture->gl_texturenumbumpmap = 0; loadmodel->texinfo[i].texture->gl_texturenumbumpmap = 0;
} }

View file

@ -1713,13 +1713,13 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
char name[MAX_QPATH]; char name[MAX_QPATH];
COM_StripExtension(skinname, name); //go for the normalmap COM_StripExtension(skinname, name); //go for the normalmap
strcat(name, "_norm"); strcat(name, "_norm");
texnums->bump = Mod_LoadHiResTexture(name, true, true); texnums->bump = Mod_LoadHiResTexture(name, true, true, false);
if (!texnums->bump) if (!texnums->bump)
{ {
strcpy(name, loadmodel->name); strcpy(name, loadmodel->name);
COM_StripExtension(COM_SkipPath(skinname), COM_SkipPath(name)); COM_StripExtension(COM_SkipPath(skinname), COM_SkipPath(name));
strcat(name, "_norm"); strcat(name, "_norm");
texnums->bump = Mod_LoadHiResTexture(name, true, true); texnums->bump = Mod_LoadHiResTexture(name, true, true, false);
if (!texnums->bump) if (!texnums->bump)
{ {
COM_StripExtension(skinname, name); //bother, go for heightmap and convert COM_StripExtension(skinname, name); //bother, go for heightmap and convert
@ -2459,12 +2459,12 @@ void GL_LoadQ3Model(model_t *mod, void *buffer)
skin->skinheight = 0; skin->skinheight = 0;
skin->skinspeed = 0; skin->skinspeed = 0;
texnum->base = Mod_LoadHiResTexture(inshader->name, true, true); texnum->base = Mod_LoadHiResTexture(inshader->name, true, true, true);
if (!texnum->base) if (!texnum->base)
{ {
strcpy(name, loadmodel->name); strcpy(name, loadmodel->name);
strcpy(COM_SkipPath(name), COM_SkipPath(inshader->name)); //eviile eh? strcpy(COM_SkipPath(name), COM_SkipPath(inshader->name)); //eviile eh?
texnum->base = Mod_LoadHiResTexture(name, true, true); texnum->base = Mod_LoadHiResTexture(name, true, true, true);
} }
texnum->bump = 0; texnum->bump = 0;
@ -2472,13 +2472,13 @@ void GL_LoadQ3Model(model_t *mod, void *buffer)
{ {
COM_StripExtension(inshader->name, name); //go for the normalmap COM_StripExtension(inshader->name, name); //go for the normalmap
strcat(name, "_norm"); strcat(name, "_norm");
texnum->bump = Mod_LoadHiResTexture(name, true, true); texnum->bump = Mod_LoadHiResTexture(name, true, true, false);
if (!texnum->bump) if (!texnum->bump)
{ {
strcpy(name, loadmodel->name); strcpy(name, loadmodel->name);
COM_StripExtension(COM_SkipPath(inshader->name), COM_SkipPath(name)); COM_StripExtension(COM_SkipPath(inshader->name), COM_SkipPath(name));
strcat(name, "_norm"); strcat(name, "_norm");
texnum->bump = Mod_LoadHiResTexture(name, true, true); texnum->bump = Mod_LoadHiResTexture(name, true, true, false);
if (!texnum->bump) if (!texnum->bump)
{ {
COM_StripExtension(inshader->name, name); //bother, go for heightmap and convert COM_StripExtension(inshader->name, name); //bother, go for heightmap and convert
@ -2499,7 +2499,7 @@ void GL_LoadQ3Model(model_t *mod, void *buffer)
{ {
COM_StripExtension(inshader->name, name); //go for the normalmap COM_StripExtension(inshader->name, name); //go for the normalmap
strcat(name, "_luma"); strcat(name, "_luma");
texnum->fullbright = Mod_LoadHiResTexture(name, true, true); texnum->fullbright = Mod_LoadHiResTexture(name, true, true, true);
if (!texnum->base) if (!texnum->base)
{ {
strcpy(name, loadmodel->name); strcpy(name, loadmodel->name);

View file

@ -244,7 +244,7 @@ qboolean Draw_RealPicFromWad (qpic_t *out, char *name)
if (!in && !texnum) //try a q2 texture if (!in && !texnum) //try a q2 texture
{ {
sprintf(name2, "pics/%s", name); sprintf(name2, "pics/%s", name);
texnum = Mod_LoadHiResTexture(name2, false, true); texnum = Mod_LoadHiResTexture(name2, false, true, true);
} }
if (texnum) if (texnum)
@ -700,7 +700,7 @@ void GLDraw_ReInit (void)
{ {
if (!draw_chars) //or low res. if (!draw_chars) //or low res.
{ {
if (!(char_texture=Mod_LoadHiResTexture("pics/conchars.pcx", false, true))) //try low res q2 path if (!(char_texture=Mod_LoadHiResTexture("pics/conchars.pcx", false, true, true))) //try low res q2 path
{ {
char *tempchars = COM_LoadMallocFile("gfx/menu/conchars.lmp"); char *tempchars = COM_LoadMallocFile("gfx/menu/conchars.lmp");
char *in, *out; char *in, *out;
@ -896,7 +896,7 @@ void GLDraw_ReInit (void)
{ {
if (!ncdata) //no fallback if (!ncdata) //no fallback
{ {
if (!(gl->texnum=Mod_LoadHiResTexture("pics/conback.pcx", false, true))) if (!(gl->texnum=Mod_LoadHiResTexture("pics/conback.pcx", false, true, true)))
if (!(gl->texnum=Mod_LoadReplacementTexture("gfx/menu/conback.lmp", false, true))) if (!(gl->texnum=Mod_LoadReplacementTexture("gfx/menu/conback.lmp", false, true)))
Sys_Error ("Couldn't load gfx/conback.lmp"); //that's messed it up, hasn't it?... Sys_Error ("Couldn't load gfx/conback.lmp"); //that's messed it up, hasn't it?...
} }
@ -948,6 +948,9 @@ void GLDraw_ReInit (void)
detailtexture = Mod_LoadReplacementTexture("textures/detail", true, false); detailtexture = Mod_LoadReplacementTexture("textures/detail", true, false);
inited15to8 = false; inited15to8 = false;
PPL_LoadSpecularFragmentProgram();
} }
void GLDraw_Init (void) void GLDraw_Init (void)
@ -1171,7 +1174,7 @@ void GLDraw_Crosshair(void)
} }
else if ((*crosshair.string>='a' && *crosshair.string<='z') || (*crosshair.string>='A' && *crosshair.string<='Z')) else if ((*crosshair.string>='a' && *crosshair.string<='z') || (*crosshair.string>='A' && *crosshair.string<='Z'))
{ {
int i = Mod_LoadHiResTexture (crosshair.string, false, true); int i = Mod_LoadHiResTexture (crosshair.string, false, true, true);
GL_Bind (i); GL_Bind (i);
} }
else else
@ -1704,7 +1707,7 @@ void GL_Set2D (void)
if (gl_font.modified) if (gl_font.modified)
{ {
gl_font.modified = 0; gl_font.modified = 0;
if (!*gl_font.string || !(char_texture=Mod_LoadHiResTexture(va("fonts/%s", gl_font.string), false, true))) if (!*gl_font.string || !(char_texture=Mod_LoadHiResTexture(va("fonts/%s", gl_font.string), false, true, true)))
char_texture = default_char_texture; char_texture = default_char_texture;
gl_smoothfont.modified = 1; gl_smoothfont.modified = 1;
@ -1713,7 +1716,7 @@ void GL_Set2D (void)
{ {
int newtex = 0; int newtex = 0;
gl_conback.modified = 0; gl_conback.modified = 0;
if (!*gl_conback.string || !(newtex=Mod_LoadHiResTexture(va("conbacks/%s", gl_conback.string), false, true))) if (!*gl_conback.string || !(newtex=Mod_LoadHiResTexture(va("conbacks/%s", gl_conback.string), false, true, true)))
conback = default_conback; conback = default_conback;
else else
{ {

View file

@ -83,6 +83,9 @@ extern int mod_numknown;
#endif #endif
extern cvar_t r_loadlits; extern cvar_t r_loadlits;
#ifdef SPECULAR
extern cvar_t gl_specular;
#endif
extern cvar_t r_fb_bmodels; extern cvar_t r_fb_bmodels;
extern cvar_t gl_subdivide_size; extern cvar_t gl_subdivide_size;
extern cvar_t gl_subdivide_water; extern cvar_t gl_subdivide_water;
@ -808,12 +811,12 @@ void GLMod_LoadAdvancedTextureSection(char *section, char *name, int *base, int
*base = 0; *base = 0;
*norm = 0; *norm = 0;
if (!*norm && *normname) if (!*norm && *normname)
*norm = Mod_LoadHiResTexture(normname, true, false); *norm = Mod_LoadHiResTexture(normname, true, false, false);
if (!*norm && *bumpname) if (!*norm && *bumpname)
*norm = Mod_LoadBumpmapTexture(bumpname); *norm = Mod_LoadBumpmapTexture(bumpname);
if (*norm && *flatname) if (*norm && *flatname)
*base = Mod_LoadHiResTexture(flatname, true, false); *base = Mod_LoadHiResTexture(flatname, true, false, true);
} }
else else
{ {
@ -822,11 +825,11 @@ void GLMod_LoadAdvancedTextureSection(char *section, char *name, int *base, int
*norm = 0; *norm = 0;
} }
if (!*base && *stdname) if (!*base && *stdname)
*base = Mod_LoadHiResTexture(stdname, true, false); *base = Mod_LoadHiResTexture(stdname, true, false, true);
if (!*base && *flatname) if (!*base && *flatname)
*base = Mod_LoadHiResTexture(flatname, true, false); *base = Mod_LoadHiResTexture(flatname, true, false, true);
if (luma && *lumaname) if (luma && *lumaname)
*luma = Mod_LoadHiResTexture(lumaname, true, true); *luma = Mod_LoadHiResTexture(lumaname, true, true, true);
} }
void GLMod_LoadAdvancedTexture(char *name, int *base, int *norm, int *luma, int *alphamode, qboolean *cull) //fixme: add gloss void GLMod_LoadAdvancedTexture(char *name, int *base, int *norm, int *luma, int *alphamode, qboolean *cull) //fixme: add gloss
@ -972,6 +975,13 @@ void GLMod_LoadTextures (lump_t *l)
tx->gl_texturenumbumpmap = GL_LoadTexture8Bump(altname, tx->width, tx->height, base, true); //normalise it and then bump it. tx->gl_texturenumbumpmap = GL_LoadTexture8Bump(altname, tx->width, tx->height, base, true); //normalise it and then bump it.
} }
//don't do any complex quake 8bit -> glossmap. It would likly look a little ugly...
if (gl_specular.value && gl_load24bit.value)
{
_snprintf(altname, sizeof(altname)-1, "%s_gloss", mt->name);
tx->gl_texturenumspec = Mod_LoadHiResTexture(altname, true, false, false);
}
} }
} }
} }
@ -1097,7 +1107,7 @@ void GLMod_NowLoadExternal(void)
tx->alphaed = alphaed; tx->alphaed = alphaed;
} }
if (!(tx->gl_texturenum = Mod_LoadHiResTexture(tx->name, true, false))) if (!(tx->gl_texturenum = Mod_LoadHiResTexture(tx->name, true, false, true)))
tx->gl_texturenum = Mod_LoadReplacementTexture("light1_4", true, false); tx->gl_texturenum = Mod_LoadReplacementTexture("light1_4", true, false);
texture_mode = GL_LINEAR; texture_mode = GL_LINEAR;
} }
@ -2897,7 +2907,7 @@ void GLMod_LoadSprite2Model (model_t *mod, void *buffer)
frame = psprite->frames[i].frameptr = Hunk_AllocName(sizeof(mspriteframe_t), loadname); frame = psprite->frames[i].frameptr = Hunk_AllocName(sizeof(mspriteframe_t), loadname);
frame->gl_texturenum = Mod_LoadHiResTexture(pframetype->name, true, true); frame->gl_texturenum = Mod_LoadHiResTexture(pframetype->name, true, true, true);
frame->width = LittleLong(pframetype->width); frame->width = LittleLong(pframetype->width);
frame->height = LittleLong(pframetype->height); frame->height = LittleLong(pframetype->height);
origin[0] = LittleLong (pframetype->origin_x); origin[0] = LittleLong (pframetype->origin_x);

View file

@ -143,6 +143,7 @@ typedef struct texture_s
int gl_texturenum; int gl_texturenum;
int gl_texturenumfb; int gl_texturenumfb;
int gl_texturenumbumpmap; int gl_texturenumbumpmap;
int gl_texturenumspec;
struct msurface_s *texturechain; // for gl_texsort drawing struct msurface_s *texturechain; // for gl_texsort drawing
int anim_total; // total tenths in sequence ( 0 = no) int anim_total; // total tenths in sequence ( 0 = no)
int anim_min, anim_max; // time for this frame min <=time< max int anim_min, anim_max; // time for this frame min <=time< max
@ -182,7 +183,12 @@ typedef struct mtexinfo_s
struct mtexinfo_s *next; struct mtexinfo_s *next;
} mtexinfo_t; } mtexinfo_t;
#define SPECULAR
#ifdef SPECULAR
#define VERTEXSIZE 10
#else
#define VERTEXSIZE 7 #define VERTEXSIZE 7
#endif
typedef struct glpoly_s typedef struct glpoly_s
{ {
@ -191,7 +197,7 @@ typedef struct glpoly_s
#ifdef SHADERS #ifdef SHADERS
float texcenter[2]; //center of texture made by adveraging the tex coords float texcenter[2]; //center of texture made by adveraging the tex coords
#endif #endif
float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2) float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2 (ldir_xyz)
} glpoly_t; } glpoly_t;
typedef struct msurface_s typedef struct msurface_s

File diff suppressed because it is too large Load diff

View file

@ -21,13 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h" #include "quakedef.h"
#include "glquake.h" #include "glquake.h"
#include "gl_draw.h"
#ifdef WATERLAYERS #ifdef WATERLAYERS
cvar_t r_waterlayers = {"r_waterlayers","3"}; cvar_t r_waterlayers = {"r_waterlayers","3"};
#endif #endif
cvar_t gl_skyboxname = {"r_skybox", ""};
extern void R_InitBubble(); extern void R_InitBubble();
/* /*

View file

@ -3146,6 +3146,7 @@ void BuildSurfaceDisplayList (msurface_t *fa)
float distoff; float distoff;
vec3_t offcenter; vec3_t offcenter;
glpoly_t *poly; glpoly_t *poly;
int lm;
// reconstruct the polygon // reconstruct the polygon
pedges = currentmodel->edges; pedges = currentmodel->edges;
@ -3180,35 +3181,51 @@ void BuildSurfaceDisplayList (msurface_t *fa)
r_pedge = &pedges[-lindex]; r_pedge = &pedges[-lindex];
vec = r_pcurrentvertbase[r_pedge->v[1]].position; vec = r_pcurrentvertbase[r_pedge->v[1]].position;
} }
s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
s /= fa->texinfo->texture->width;
t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
t /= fa->texinfo->texture->height;
VectorAdd(vec, fa->center, fa->center); VectorAdd(vec, fa->center, fa->center);
s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
VectorCopy (vec, poly->verts[i]); VectorCopy (vec, poly->verts[i]);
poly->verts[i][3] = s; poly->verts[i][3] = s/fa->texinfo->texture->width;
poly->verts[i][4] = t; poly->verts[i][4] = t/fa->texinfo->texture->height;
// //
// lightmap texture coordinates // lightmap texture coordinates
// //
s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
s -= fa->texturemins[0]; s -= fa->texturemins[0];
lm = s*fa->light_t;
s += fa->light_s*16; s += fa->light_s*16;
s += 8; s += 8;
s /= LMBLOCK_WIDTH*16; //fa->texinfo->texture->width; s /= LMBLOCK_WIDTH*16; //fa->texinfo->texture->width;
t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
t -= fa->texturemins[1]; t -= fa->texturemins[1];
lm += t;
t += fa->light_t*16; t += fa->light_t*16;
t += 8; t += 8;
t /= LMBLOCK_HEIGHT*16; //fa->texinfo->texture->height; t /= LMBLOCK_HEIGHT*16; //fa->texinfo->texture->height;
poly->verts[i][5] = s; poly->verts[i][5] = s;
poly->verts[i][6] = t; poly->verts[i][6] = t;
#ifdef SPECULAR
/* if (currentmodel->deluxdata&&fa->samples)
{
qbyte *dlm = fa->samples - currentmodel->lightdata + currentmodel->deluxdata;
dlm += lm;
poly->verts[i][7] = (dlm[0]-127)/128.0f;
poly->verts[i][8] = (dlm[1]-127)/128.0f;
poly->verts[i][9] = (dlm[2]-127)/128.0f;
}
else*/
if (fa->flags & SURF_PLANEBACK)
{
VectorNegate(fa->plane->normal, (poly->verts[i]+7));
}
else
VectorCopy(fa->plane->normal, (poly->verts[i]+7));
#endif
} }
fa->center[0]/=lnumverts; fa->center[0]/=lnumverts;

View file

@ -28,6 +28,7 @@ void (APIENTRY *qglEnd) (void);
void (APIENTRY *qglFinish) (void); void (APIENTRY *qglFinish) (void);
void (APIENTRY *qglFlush) (void); void (APIENTRY *qglFlush) (void);
void (APIENTRY *qglFrustum) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); void (APIENTRY *qglFrustum) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
GLenum (APIENTRY *qglGetError) (void);
void (APIENTRY *qglGetFloatv) (GLenum pname, GLfloat *params); void (APIENTRY *qglGetFloatv) (GLenum pname, GLfloat *params);
void (APIENTRY *qglGetIntegerv) (GLenum pname, GLint *params); void (APIENTRY *qglGetIntegerv) (GLenum pname, GLint *params);
const GLubyte * (APIENTRY *qglGetString) (GLenum name); const GLubyte * (APIENTRY *qglGetString) (GLenum name);
@ -51,6 +52,7 @@ void (APIENTRY *qglTexCoord1f) (GLfloat s);
void (APIENTRY *qglTexCoord2f) (GLfloat s, GLfloat t); void (APIENTRY *qglTexCoord2f) (GLfloat s, GLfloat t);
void (APIENTRY *qglTexCoord2fv) (const GLfloat *v); void (APIENTRY *qglTexCoord2fv) (const GLfloat *v);
void (APIENTRY *qglTexEnvf) (GLenum target, GLenum pname, GLfloat param); void (APIENTRY *qglTexEnvf) (GLenum target, GLenum pname, GLfloat param);
void (APIENTRY *qglTexEnvfv) (GLenum target, GLenum pname, const GLfloat *param);
void (APIENTRY *qglTexEnvi) (GLenum target, GLenum pname, GLint param); void (APIENTRY *qglTexEnvi) (GLenum target, GLenum pname, GLint param);
void (APIENTRY *qglTexGeni) (GLenum coord, GLenum pname, GLint param); void (APIENTRY *qglTexGeni) (GLenum coord, GLenum pname, GLint param);
void (APIENTRY *qglTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); void (APIENTRY *qglTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
@ -69,6 +71,7 @@ void (APIENTRY *qglVertexPointer) (GLint size, GLenum type, GLsizei stride, cons
void (APIENTRY *qglNormalPointer) (GLenum type, GLsizei stride, const GLvoid *pointer); void (APIENTRY *qglNormalPointer) (GLenum type, GLsizei stride, const GLvoid *pointer);
void (APIENTRY *qglTexCoordPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void (APIENTRY *qglTexCoordPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void (APIENTRY *qglColorPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void (APIENTRY *qglColorPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void (APIENTRY *qglDrawArrays) (GLenum mode, GLint first, GLsizei count);
void (APIENTRY *qglDisableClientState) (GLenum array); void (APIENTRY *qglDisableClientState) (GLenum array);
void (APIENTRY *qglEnableClientState) (GLenum array); void (APIENTRY *qglEnableClientState) (GLenum array);
@ -78,6 +81,12 @@ void (APIENTRY *qglStencilFunc) (GLenum func, GLint ref, GLuint mask);
void (APIENTRY *qglPushAttrib) (GLbitfield mask); void (APIENTRY *qglPushAttrib) (GLbitfield mask);
void (APIENTRY *qglPopAttrib) (void); void (APIENTRY *qglPopAttrib) (void);
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
PFNGLGETPROGRAMIVARBPROC qglGetProgramivARB;
PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
@ -112,6 +121,8 @@ qboolean gl_mtexable = false;
qboolean gl_compressable=false; qboolean gl_compressable=false;
int gl_bumpmappingpossible; int gl_bumpmappingpossible;
qboolean gl_arb_fragment_program;
@ -162,6 +173,13 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name))
qglPNTrianglesfATI = NULL; qglPNTrianglesfATI = NULL;
qglPNTrianglesiATI = NULL; qglPNTrianglesiATI = NULL;
//fragment programs
gl_arb_fragment_program = false;
qglProgramStringARB = NULL;
qglGetProgramivARB = NULL;
qglBindProgramARB = NULL;
qglGenProgramsARB = NULL;
if (strstr(gl_extensions, "GL_ARB_multitexture") && !COM_CheckParm("-noamtex")) if (strstr(gl_extensions, "GL_ARB_multitexture") && !COM_CheckParm("-noamtex"))
{ //ARB multitexture is the popular choice. { //ARB multitexture is the popular choice.
Con_SafePrintf("ARB Multitexture extensions found. Use -noamtex to disable.\n"); Con_SafePrintf("ARB Multitexture extensions found. Use -noamtex to disable.\n");
@ -243,6 +261,16 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name))
if (gl_mtexarbable && support_GL_ARB_texture_cube_map && support_GL_ARB_texture_env_combine && support_GL_ARB_texture_env_dot3 && !COM_CheckParm("-nobump") && gl_bump.value) if (gl_mtexarbable && support_GL_ARB_texture_cube_map && support_GL_ARB_texture_env_combine && support_GL_ARB_texture_env_dot3 && !COM_CheckParm("-nobump") && gl_bump.value)
gl_bumpmappingpossible = true; gl_bumpmappingpossible = true;
if (!!strstr(gl_extensions, "GL_ARB_fragment_program"))
{
gl_arb_fragment_program = true;
qglProgramStringARB = (void *)getglext("glProgramStringARB");
qglGetProgramivARB = (void *)getglext("glGetProgramivARB");
qglBindProgramARB = (void *)getglext("glBindProgramARB");
qglGenProgramsARB = (void *)getglext("glGenProgramsARB");
}
} }
//the vid routines have initialised a window, and now they are giving us a reference to some of of GetProcAddress to get pointers to the funcs. //the vid routines have initialised a window, and now they are giving us a reference to some of of GetProcAddress to get pointers to the funcs.
@ -299,6 +327,7 @@ void GL_Init(void *(*getglfunction) (char *name))
qglTexCoord2f = (void *)getglcore("glTexCoord2f"); qglTexCoord2f = (void *)getglcore("glTexCoord2f");
qglTexCoord2fv = (void *)getglcore("glTexCoord2fv"); qglTexCoord2fv = (void *)getglcore("glTexCoord2fv");
qglTexEnvf = (void *)getglcore("glTexEnvf"); qglTexEnvf = (void *)getglcore("glTexEnvf");
qglTexEnvfv = (void *)getglcore("glTexEnvfv");
qglTexEnvi = (void *)getglcore("glTexEnvi"); qglTexEnvi = (void *)getglcore("glTexEnvi");
qglTexGeni = (void *)getglcore("glTexGeni"); qglTexGeni = (void *)getglcore("glTexGeni");
qglTexImage2D = (void *)getglcore("glTexImage2D"); qglTexImage2D = (void *)getglcore("glTexImage2D");
@ -311,12 +340,15 @@ void GL_Init(void *(*getglfunction) (char *name))
qglVertex3fv = (void *)getglcore("glVertex3fv"); qglVertex3fv = (void *)getglcore("glVertex3fv");
qglViewport = (void *)getglcore("glViewport"); qglViewport = (void *)getglcore("glViewport");
//fixme: make non-core? qglGetError = (void *)getglcore("glGetError");
//various vertex array stuff.
qglDrawElements = (void *)getglcore("glDrawElements"); qglDrawElements = (void *)getglcore("glDrawElements");
qglVertexPointer = (void *)getglcore("glVertexPointer"); qglVertexPointer = (void *)getglcore("glVertexPointer");
qglNormalPointer = (void *)getglcore("glNormalPointer"); qglNormalPointer = (void *)getglcore("glNormalPointer");
qglTexCoordPointer = (void *)getglcore("glTexCoordPointer"); qglTexCoordPointer = (void *)getglcore("glTexCoordPointer");
qglColorPointer = (void *)getglcore("glColorPointer"); qglColorPointer = (void *)getglcore("glColorPointer");
qglDrawArrays = (void *)getglcore("glDrawArrays");
qglEnableClientState = (void *)getglcore("glEnableClientState"); qglEnableClientState = (void *)getglcore("glEnableClientState");
qglDisableClientState = (void *)getglcore("glDisableClientState"); qglDisableClientState = (void *)getglcore("glDisableClientState");

View file

@ -433,7 +433,7 @@ void R_LoadSkys (void)
{ {
sprintf (name, "env/%s%s.tga", gl_skyboxname.string, suf[i]); sprintf (name, "env/%s%s.tga", gl_skyboxname.string, suf[i]);
skyboxtex[i] = Mod_LoadHiResTexture(name, false, false); skyboxtex[i] = Mod_LoadHiResTexture(name, false, false, true);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

View file

@ -1080,7 +1080,7 @@ static int Doom_LoadPatch(char *name)
return texnum; return texnum;
} }
//all else failed. //all else failed.
return Mod_LoadHiResTexture(name, true, false); return Mod_LoadHiResTexture(name, true, false, true);
} }
#endif #endif
static void CleanWalls(dsidedef_t *sidedefsl) static void CleanWalls(dsidedef_t *sidedefsl)

View file

@ -61,6 +61,13 @@ void GLR_DrawAlphaSurfaces (void);
void GL_FlushSkinCache(void); void GL_FlushSkinCache(void);
void GL_GAliasFlushSkinCache(void); void GL_GAliasFlushSkinCache(void);
void PPL_LoadSpecularFragmentProgram(void);
void PPL_BaseBModelTextures(entity_t *e);
#ifdef RUNTIMELIGHTING
void LightFace (int surfnum);
void LightLoadEntities(char *entstring);
#endif
// Function prototypes for the Texture Object Extension routines // Function prototypes for the Texture Object Extension routines
typedef GLboolean (APIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *, typedef GLboolean (APIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *,
@ -286,7 +293,7 @@ void GL_BuildLightmaps (void);
void GL_LoadShaders(void); void GL_LoadShaders(void);
int Mod_LoadReplacementTexture(char *name, qboolean mipmap, qboolean alpha); int Mod_LoadReplacementTexture(char *name, qboolean mipmap, qboolean alpha);
int Mod_LoadHiResTexture(char *name, qboolean mipmap, qboolean alpha); int Mod_LoadHiResTexture(char *name, qboolean mipmap, qboolean alpha, qboolean colouradjust);
int Mod_LoadBumpmapTexture(char *name); int Mod_LoadBumpmapTexture(char *name);
#define LMBLOCK_WIDTH 128 #define LMBLOCK_WIDTH 128
@ -675,6 +682,12 @@ extern BOOL (WINAPI *qwglMakeCurrent)(HDC, HGLRC);
extern BOOL (WINAPI *qSwapBuffers)(HDC); extern BOOL (WINAPI *qSwapBuffers)(HDC);
#endif #endif
extern qboolean gl_arb_fragment_program;
extern PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
extern PFNGLGETPROGRAMIVARBPROC qglGetProgramivARB;
extern PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
extern PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
#define glAlphaFunc qglAlphaFunc #define glAlphaFunc qglAlphaFunc
#define glBlendFunc qglBlendFunc #define glBlendFunc qglBlendFunc
@ -704,6 +717,7 @@ extern BOOL (WINAPI *qSwapBuffers)(HDC);
#define glMultMatrixf qglMultMatrixf #define glMultMatrixf qglMultMatrixf
#define glGetIntegerv qglGetIntegerv #define glGetIntegerv qglGetIntegerv
#define glTexEnvf qglTexEnvf #define glTexEnvf qglTexEnvf
#define glTexEnvfv qglTexEnvfv
#define glTexEnvi qglTexEnvi #define glTexEnvi qglTexEnvi
#define glTexGeni qglTexGeni #define glTexGeni qglTexGeni
#define glVertex2f qglVertex2f #define glVertex2f qglVertex2f
@ -745,6 +759,7 @@ extern BOOL (WINAPI *qSwapBuffers)(HDC);
#define glDrawElements qglDrawElements #define glDrawElements qglDrawElements
#define glDisableClientState qglDisableClientState #define glDisableClientState qglDisableClientState
#define glEnableClientState qglEnableClientState #define glEnableClientState qglEnableClientState
#define glDrawArrays qglDrawArrays
//stencil functions //stencil functions
#define glStencilOp qglStencilOp #define glStencilOp qglStencilOp

View file

@ -1,5 +1,7 @@
//gl suppliment for Quake //gl suppliment for Quake
#define APIENTRYP APIENTRY *
//contains the extra things that would otherwise be found in glext.h //contains the extra things that would otherwise be found in glext.h
typedef void (APIENTRY *qlpMTex2FUNC) (GLenum, GLfloat, GLfloat); typedef void (APIENTRY *qlpMTex2FUNC) (GLenum, GLfloat, GLfloat);
@ -201,4 +203,187 @@ typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
#endif #endif
#ifndef GL_ARB_vertex_program
#define GL_COLOR_SUM_ARB 0x8458
#define GL_VERTEX_PROGRAM_ARB 0x8620
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
#define GL_PROGRAM_LENGTH_ARB 0x8627
#define GL_PROGRAM_STRING_ARB 0x8628
#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
#define GL_CURRENT_MATRIX_ARB 0x8641
#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
#define GL_PROGRAM_BINDING_ARB 0x8677
#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
#define GL_PROGRAM_FORMAT_ARB 0x8876
#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
#define GL_MATRIX0_ARB 0x88C0
#define GL_MATRIX1_ARB 0x88C1
#define GL_MATRIX2_ARB 0x88C2
#define GL_MATRIX3_ARB 0x88C3
#define GL_MATRIX4_ARB 0x88C4
#define GL_MATRIX5_ARB 0x88C5
#define GL_MATRIX6_ARB 0x88C6
#define GL_MATRIX7_ARB 0x88C7
#define GL_MATRIX8_ARB 0x88C8
#define GL_MATRIX9_ARB 0x88C9
#define GL_MATRIX10_ARB 0x88CA
#define GL_MATRIX11_ARB 0x88CB
#define GL_MATRIX12_ARB 0x88CC
#define GL_MATRIX13_ARB 0x88CD
#define GL_MATRIX14_ARB 0x88CE
#define GL_MATRIX15_ARB 0x88CF
#define GL_MATRIX16_ARB 0x88D0
#define GL_MATRIX17_ARB 0x88D1
#define GL_MATRIX18_ARB 0x88D2
#define GL_MATRIX19_ARB 0x88D3
#define GL_MATRIX20_ARB 0x88D4
#define GL_MATRIX21_ARB 0x88D5
#define GL_MATRIX22_ARB 0x88D6
#define GL_MATRIX23_ARB 0x88D7
#define GL_MATRIX24_ARB 0x88D8
#define GL_MATRIX25_ARB 0x88D9
#define GL_MATRIX26_ARB 0x88DA
#define GL_MATRIX27_ARB 0x88DB
#define GL_MATRIX28_ARB 0x88DC
#define GL_MATRIX29_ARB 0x88DD
#define GL_MATRIX30_ARB 0x88DE
#define GL_MATRIX31_ARB 0x88DF
#endif
#ifndef GL_ARB_fragment_program
#define GL_FRAGMENT_PROGRAM_ARB 0x8804
#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
#endif
#ifndef GL_ARB_vertex_program
#define GL_ARB_vertex_program 1
typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
#endif
#ifndef GL_ARB_fragment_program
#define GL_ARB_fragment_program 1
/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
#endif
#endif #endif