core  array_cache  math  swrast  swrast_setup  tnl  tnl_dd 
Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

get.c File Reference

State query functions. More...

#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "enable.h"
#include "enums.h"
#include "extensions.h"
#include "get.h"
#include "macros.h"
#include "mtypes.h"
#include "texcompress.h"
#include "version.h"
#include "math/m_matrix.h"

Defines

#define FLOAT_TO_BOOL(X)   ( (X)==0.0F ? GL_FALSE : GL_TRUE )
#define INT_TO_BOOL(I)   ( (I)==0 ? GL_FALSE : GL_TRUE )
#define ENUM_TO_BOOL(E)   ( (E)==0 ? GL_FALSE : GL_TRUE )
#define ENUM_TO_FLOAT(X)   ((GLfloat)(X))
#define ENUM_TO_DOUBLE(X)   ((GLdouble)(X))
#define CHECK1(E1, str, PNAME)
#define CHECK2(E1, E2, str, PNAME)
#define CHECK_EXTENSION_B(EXTNAME, PNAME)   CHECK1(EXTNAME, "Boolean", PNAME )
#define CHECK_EXTENSION_I(EXTNAME, PNAME)   CHECK1(EXTNAME, "Integer", PNAME )
#define CHECK_EXTENSION_F(EXTNAME, PNAME)   CHECK1(EXTNAME, "Float", PNAME )
#define CHECK_EXTENSION_D(EXTNAME, PNAME)   CHECK1(EXTNAME, "Double", PNAME )
#define CHECK_EXTENSION2_B(EXT1, EXT2, PNAME)   CHECK2(EXT1, EXT2, "Boolean", PNAME)
#define CHECK_EXTENSION2_I(EXT1, EXT2, PNAME)   CHECK2(EXT1, EXT2, "Integer", PNAME)
#define CHECK_EXTENSION2_F(EXT1, EXT2, PNAME)   CHECK2(EXT1, EXT2, "Float", PNAME)
#define CHECK_EXTENSION2_D(EXT1, EXT2, PNAME)   CHECK2(EXT1, EXT2, "Double", PNAME)

Functions

GLenum pixel_texgen_mode (const GLcontext *ctx)
void GLAPIENTRY _mesa_GetBooleanv (GLenum pname, GLboolean *params)
 Get the value(s) of a selected parameter. More...

void GLAPIENTRY _mesa_GetDoublev (GLenum pname, GLdouble *params)
 Get the value(s) of a selected parameter. More...

void GLAPIENTRY _mesa_GetFloatv (GLenum pname, GLfloat *params)
 Get the value(s) of a selected parameter. More...

void GLAPIENTRY _mesa_GetIntegerv (GLenum pname, GLint *params)
 Get the value(s) of a selected parameter. More...

void GLAPIENTRY _mesa_GetPointerv (GLenum pname, GLvoid **params)
 Get the address of a selected pointer. More...

const GLubyte *GLAPIENTRY _mesa_GetString (GLenum name)
 Get a string describing the current GL connection. More...

GLenum GLAPIENTRY _mesa_GetError (void)
 Execute a glGetError() command. More...


Detailed Description

State query functions.


Define Documentation

#define CHECK1 E1,
str,
PNAME   
 

Value:

if (!ctx->Extensions.E1) {                                      \
      _mesa_error(ctx, GL_INVALID_VALUE,                        \
                  "glGet" str "v(0x%x)", (int) PNAME);          \
      return;                                                   \
   }

#define CHECK2 E1,
E2,
str,
PNAME   
 

Value:

if (!ctx->Extensions.E1 && !ctx->Extensions.E2) {               \
      _mesa_error(ctx, GL_INVALID_VALUE,                        \
                  "glGet" str "v(0x%x)", (int) PNAME);          \
      return;                                                   \
   }

#define CHECK_EXTENSION2_B EXT1,
EXT2,
PNAME       CHECK2(EXT1, EXT2, "Boolean", PNAME)
 

#define CHECK_EXTENSION2_D EXT1,
EXT2,
PNAME       CHECK2(EXT1, EXT2, "Double", PNAME)
 

#define CHECK_EXTENSION2_F EXT1,
EXT2,
PNAME       CHECK2(EXT1, EXT2, "Float", PNAME)
 

#define CHECK_EXTENSION2_I EXT1,
EXT2,
PNAME       CHECK2(EXT1, EXT2, "Integer", PNAME)
 

#define CHECK_EXTENSION_B EXTNAME,
PNAME       CHECK1(EXTNAME, "Boolean", PNAME )
 

#define CHECK_EXTENSION_D EXTNAME,
PNAME       CHECK1(EXTNAME, "Double", PNAME )
 

#define CHECK_EXTENSION_F EXTNAME,
PNAME       CHECK1(EXTNAME, "Float", PNAME )
 

#define CHECK_EXTENSION_I EXTNAME,
PNAME       CHECK1(EXTNAME, "Integer", PNAME )
 

#define ENUM_TO_BOOL      ( (E)==0 ? GL_FALSE : GL_TRUE )
 

#define ENUM_TO_DOUBLE X       ((GLdouble)(X))
 

#define ENUM_TO_FLOAT X       ((GLfloat)(X))
 

#define FLOAT_TO_BOOL X       ( (X)==0.0F ? GL_FALSE : GL_TRUE )
 

#define INT_TO_BOOL I       ( (I)==0 ? GL_FALSE : GL_TRUE )
 


Function Documentation

void GLAPIENTRY _mesa_GetBooleanv GLenum    pname,
GLboolean *    params
 

Get the value(s) of a selected parameter.

Parameters:
pname  parameter to be returned.
params  will hold the value(s) of the speficifed parameter.
See also:
glGetBooleanv().
Tries to get the specified parameter via dd_function_table::GetBooleanv, otherwise gets the specified parameter from the current context, converting it value into GLboolean.

void GLAPIENTRY _mesa_GetDoublev GLenum    pname,
GLdouble *    params
 

Get the value(s) of a selected parameter.

Parameters:
pname  parameter to be returned.
params  will hold the value(s) of the speficifed parameter.
See also:
glGetDoublev().
Tries to get the specified parameter via dd_function_table::GetDoublev, otherwise gets the specified parameter from the current context, converting it value into GLdouble.

GLenum GLAPIENTRY _mesa_GetError void   
 

Execute a glGetError() command.

Returns:
error number.
Returns __GLcontextRec::ErrorValue.

void GLAPIENTRY _mesa_GetFloatv GLenum    pname,
GLfloat *    params
 

Get the value(s) of a selected parameter.

Parameters:
pname  parameter to be returned.
params  will hold the value(s) of the speficifed parameter.
See also:
glGetFloatv().
Tries to get the specified parameter via dd_function_table::GetFloatv, otherwise gets the specified parameter from the current context, converting it value into GLfloat.

void GLAPIENTRY _mesa_GetIntegerv GLenum    pname,
GLint *    params
 

Get the value(s) of a selected parameter.

Parameters:
pname  parameter to be returned.
params  will hold the value(s) of the speficifed parameter.
See also:
glGetIntegerv().
Tries to get the specified parameter via dd_function_table::GetIntegerv, otherwise gets the specified parameter from the current context, converting it value into GLinteger.

void GLAPIENTRY _mesa_GetPointerv GLenum    pname,
GLvoid **    params
 

Get the address of a selected pointer.

Parameters:
pname  array or buffer to be returned.
params  will hold the pointer speficifed by pname.
See also:
glGetPointerv().
Tries to get the specified pointer via dd_function_table::GetPointerv, otherwise gets the specified pointer from the current context.

const GLubyte* GLAPIENTRY _mesa_GetString GLenum    name
 

Get a string describing the current GL connection.

Parameters:
name  name symbolic constant.
See also:
glGetString().
Tries to get the string from dd_function_table::GetString, otherwise returns the hardcoded strings.

GLenum pixel_texgen_mode const GLcontext   ctx [static]
 


Generated on Sun May 16 15:55:11 2004 for Mesa Core by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001