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

enable.c File Reference

Enable/disable/query GL capabilities. More...

#include "glheader.h"
#include "context.h"
#include "enable.h"
#include "light.h"
#include "macros.h"
#include "simple_list.h"
#include "mtypes.h"
#include "enums.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"

Defines

#define CHECK_EXTENSION(EXTNAME, CAP)
#define CHECK_EXTENSION2(EXT1, EXT2, CAP)
#define CHECK_EXTENSION(EXTNAME, CAP)
#define CHECK_EXTENSION(EXTNAME)

Functions

void client_state (GLcontext *ctx, GLenum cap, GLboolean state)
void GLAPIENTRY _mesa_EnableClientState (GLenum cap)
 Enable GL capability. More...

void GLAPIENTRY _mesa_DisableClientState (GLenum cap)
 Disable GL capability. More...

void _mesa_set_enable (GLcontext *ctx, GLenum cap, GLboolean state)
 Perform glEnable() and glDisable() calls. More...

void GLAPIENTRY _mesa_Enable (GLenum cap)
 Enable GL capability. More...

void GLAPIENTRY _mesa_Disable (GLenum cap)
 Disable GL capability. More...

GLboolean GLAPIENTRY _mesa_IsEnabled (GLenum cap)
 Test whether a capability is enabled. More...


Detailed Description

Enable/disable/query GL capabilities.


Define Documentation

#define CHECK_EXTENSION EXTNAME   
 

Value:

if (!ctx->Extensions.EXTNAME) {                 \
      _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); \
      return GL_FALSE;                                  \
   }

#define CHECK_EXTENSION EXTNAME,
CAP   
 

Value:

if (!ctx->Extensions.EXTNAME) {                                 \
      _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)",                   \
                  state ? "Enable" : "Disable", CAP);                   \
      return;                                                           \
   }

#define CHECK_EXTENSION EXTNAME,
CAP   
 

Value:

if (!ctx->Extensions.EXTNAME) {                                 \
      _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)",        \
                  state ? "Enable" : "Disable", CAP);                   \
      return;                                                           \
   }

#define CHECK_EXTENSION2 EXT1,
EXT2,
CAP   
 

Value:

if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) {           \
      _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)",        \
                  state ? "Enable" : "Disable", CAP);                   \
      return;                                                           \
   }


Function Documentation

void GLAPIENTRY _mesa_Disable GLenum    cap
 

Disable GL capability.

Parameters:
cap  capability.
See also:
glDisable().
Get's the current context, assures that we're outside glBegin()/glEnd() and calls _mesa_set_enable().

void GLAPIENTRY _mesa_DisableClientState GLenum    cap
 

Disable GL capability.

Parameters:
cap  capability.
See also:
glDisable().
Get's the current context, assures that we're outside glBegin()/glEnd() and calls client_state().

void GLAPIENTRY _mesa_Enable GLenum    cap
 

Enable GL capability.

Parameters:
cap  capability.
See also:
glEnable().
Get's the current context, assures that we're outside glBegin()/glEnd() and calls _mesa_set_enable().

void GLAPIENTRY _mesa_EnableClientState GLenum    cap
 

Enable GL capability.

Parameters:
cap  capability.
See also:
glEnable().
Get's the current context, assures that we're outside glBegin()/glEnd() and calls client_state().

GLboolean GLAPIENTRY _mesa_IsEnabled GLenum    cap
 

Test whether a capability is enabled.

Parameters:
cap  capability.
Returns the state of the specified capability from the current GL context. For the capabilities associated with extensions verifies that those extensions are effectively present before reporting.

void _mesa_set_enable GLcontext   ctx,
GLenum    cap,
GLboolean    state
 

Perform glEnable() and glDisable() calls.

Parameters:
ctx  GL context.
cap  capability.
state  whether to enable or disable the specified capability.
Updates the current context and flushes the vertices as needed. For capabilities associated with extensions it verifies that those extensions are effectivly present before updating. Notifies the driver via dd_function_table::Enable.

void client_state GLcontext   ctx,
GLenum    cap,
GLboolean    state
[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