core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

arbprogram.c File Reference


Detailed Description

ARB_vertex/fragment_program state management functions.

Author:
Brian Paul

#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
#include "main/imports.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "arbprogram.h"
#include "arbprogparse.h"
#include "program.h"

Functions

static GLboolean compatible_program_targets (GLenum t1, GLenum t2)
 Mixing ARB and NV vertex/fragment programs can be tricky.
void GLAPIENTRY _mesa_BindProgram (GLenum target, GLuint id)
 Bind a program (make it current).
void GLAPIENTRY _mesa_DeletePrograms (GLsizei n, const GLuint *ids)
 Delete a list of programs.
void GLAPIENTRY _mesa_GenPrograms (GLsizei n, GLuint *ids)
 Generate a list of new program identifiers.
void GLAPIENTRY _mesa_EnableVertexAttribArrayARB (GLuint index)
void GLAPIENTRY _mesa_DisableVertexAttribArrayARB (GLuint index)
void GLAPIENTRY _mesa_GetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params)
void GLAPIENTRY _mesa_GetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params)
 Return info for a generic vertex attribute array (no alias with legacy vertex attributes (pos, normal, color, etc)).
void GLAPIENTRY _mesa_GetVertexAttribivARB (GLuint index, GLenum pname, GLint *params)
void GLAPIENTRY _mesa_GetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid **pointer)
GLboolean GLAPIENTRY _mesa_IsProgramARB (GLuint id)
 Determine if id names a vertex or fragment program.
void GLAPIENTRY _mesa_ProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string)
void GLAPIENTRY _mesa_ProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 Set a program env parameter register.
void GLAPIENTRY _mesa_ProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params)
 Set a program env parameter register.
void GLAPIENTRY _mesa_ProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 Set a program env parameter register.
void GLAPIENTRY _mesa_ProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params)
 Set a program env parameter register.
void GLAPIENTRY _mesa_ProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params)
void GLAPIENTRY _mesa_GetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params)
void GLAPIENTRY _mesa_GetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params)
void GLAPIENTRY _mesa_ProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_ProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_ProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params)
void GLAPIENTRY _mesa_ProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_ProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_GetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_GetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params)
 Note, this function is also used by the GL_NV_fragment_program extension.
void GLAPIENTRY _mesa_GetProgramivARB (GLenum target, GLenum pname, GLint *params)
void GLAPIENTRY _mesa_GetProgramStringARB (GLenum target, GLenum pname, GLvoid *string)


Function Documentation

void GLAPIENTRY _mesa_BindProgram ( GLenum  target,
GLuint  id 
)

Bind a program (make it current).

Note:
Called from the GL API dispatcher by both glBindProgramNV and glBindProgramARB.

All error checking is complete now

void GLAPIENTRY _mesa_DeletePrograms ( GLsizei  n,
const GLuint *  ids 
)

Delete a list of programs.

Note:
Not compiled into display lists.

Called by both glDeleteProgramsNV and glDeleteProgramsARB.

void GLAPIENTRY _mesa_DisableVertexAttribArrayARB ( GLuint  index  ) 

void GLAPIENTRY _mesa_EnableVertexAttribArrayARB ( GLuint  index  ) 

void GLAPIENTRY _mesa_GenPrograms ( GLsizei  n,
GLuint *  ids 
)

Generate a list of new program identifiers.

Note:
Not compiled into display lists.

Called by both glGenProgramsNV and glGenProgramsARB.

void GLAPIENTRY _mesa_GetProgramEnvParameterdvARB ( GLenum  target,
GLuint  index,
GLdouble *  params 
)

void GLAPIENTRY _mesa_GetProgramEnvParameterfvARB ( GLenum  target,
GLuint  index,
GLfloat *  params 
)

void GLAPIENTRY _mesa_GetProgramivARB ( GLenum  target,
GLenum  pname,
GLint *  params 
)

void GLAPIENTRY _mesa_GetProgramLocalParameterdvARB ( GLenum  target,
GLuint  index,
GLdouble *  params 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_GetProgramLocalParameterfvARB ( GLenum  target,
GLuint  index,
GLfloat *  params 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_GetProgramStringARB ( GLenum  target,
GLenum  pname,
GLvoid *  string 
)

void GLAPIENTRY _mesa_GetVertexAttribdvARB ( GLuint  index,
GLenum  pname,
GLdouble *  params 
)

void GLAPIENTRY _mesa_GetVertexAttribfvARB ( GLuint  index,
GLenum  pname,
GLfloat *  params 
)

Return info for a generic vertex attribute array (no alias with legacy vertex attributes (pos, normal, color, etc)).

void GLAPIENTRY _mesa_GetVertexAttribivARB ( GLuint  index,
GLenum  pname,
GLint *  params 
)

void GLAPIENTRY _mesa_GetVertexAttribPointervARB ( GLuint  index,
GLenum  pname,
GLvoid **  pointer 
)

GLboolean GLAPIENTRY _mesa_IsProgramARB ( GLuint  id  ) 

Determine if id names a vertex or fragment program.

Note:
Not compiled into display lists.

Called from both glIsProgramNV and glIsProgramARB.

Parameters:
id is the program identifier
Returns:
GL_TRUE if id is a program, else GL_FALSE.

void GLAPIENTRY _mesa_ProgramEnvParameter4dARB ( GLenum  target,
GLuint  index,
GLdouble  x,
GLdouble  y,
GLdouble  z,
GLdouble  w 
)

Set a program env parameter register.

Note:
Called from the GL API dispatcher. Note, this function is also used by the GL_NV_vertex_program extension (alias to ProgramParameterdNV)

void GLAPIENTRY _mesa_ProgramEnvParameter4dvARB ( GLenum  target,
GLuint  index,
const GLdouble *  params 
)

Set a program env parameter register.

Note:
Called from the GL API dispatcher. Note, this function is also used by the GL_NV_vertex_program extension (alias to ProgramParameterdvNV)

void GLAPIENTRY _mesa_ProgramEnvParameter4fARB ( GLenum  target,
GLuint  index,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Set a program env parameter register.

Note:
Called from the GL API dispatcher. Note, this function is also used by the GL_NV_vertex_program extension (alias to ProgramParameterfNV)

void GLAPIENTRY _mesa_ProgramEnvParameter4fvARB ( GLenum  target,
GLuint  index,
const GLfloat *  params 
)

Set a program env parameter register.

Note:
Called from the GL API dispatcher. Note, this function is also used by the GL_NV_vertex_program extension (alias to ProgramParameterfvNV)

void GLAPIENTRY _mesa_ProgramEnvParameters4fvEXT ( GLenum  target,
GLuint  index,
GLsizei  count,
const GLfloat *  params 
)

void GLAPIENTRY _mesa_ProgramLocalParameter4dARB ( GLenum  target,
GLuint  index,
GLdouble  x,
GLdouble  y,
GLdouble  z,
GLdouble  w 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_ProgramLocalParameter4dvARB ( GLenum  target,
GLuint  index,
const GLdouble *  params 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_ProgramLocalParameter4fARB ( GLenum  target,
GLuint  index,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_ProgramLocalParameter4fvARB ( GLenum  target,
GLuint  index,
const GLfloat *  params 
)

Note, this function is also used by the GL_NV_fragment_program extension.

void GLAPIENTRY _mesa_ProgramLocalParameters4fvEXT ( GLenum  target,
GLuint  index,
GLsizei  count,
const GLfloat *  params 
)

void GLAPIENTRY _mesa_ProgramStringARB ( GLenum  target,
GLenum  format,
GLsizei  len,
const GLvoid *  string 
)

static GLboolean compatible_program_targets ( GLenum  t1,
GLenum  t2 
) [static]

Mixing ARB and NV vertex/fragment programs can be tricky.

Note: GL_VERTEX_PROGRAM_ARB == GL_VERTEX_PROGRAM_NV but, GL_FRAGMENT_PROGRAM_ARB != GL_FRAGMENT_PROGRAM_NV The two different fragment program targets are supposed to be compatible to some extent (see GL_ARB_fragment_program spec). This function does the compatibility check.


Generated on Sun Sep 27 06:48:02 2009 for Mesa Vertex and Fragment Program code by  doxygen 1.5.4