#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 "api_arrayelt.h"
Defines | |
#define | CHECK_EXTENSION(EXTNAME, CAP) |
#define | CHECK_EXTENSION(EXTNAME, CAP) |
#define | CHECK_EXTENSION2(EXT1, EXT2, CAP) |
#define | CHECK_EXTENSION(EXTNAME) |
#define | CHECK_EXTENSION2(EXT1, EXT2) |
Functions | |
static void | client_state (GLcontext *ctx, GLenum cap, GLboolean state) |
Helper to enable/disable client-side state. | |
void GLAPIENTRY | _mesa_EnableClientState (GLenum cap) |
Enable GL capability. | |
void GLAPIENTRY | _mesa_DisableClientState (GLenum cap) |
Disable GL capability. | |
static struct gl_texture_unit * | get_texcoord_unit (GLcontext *ctx) |
Return pointer to current texture unit for setting/getting coordinate state. | |
static GLboolean | enable_texture (GLcontext *ctx, GLboolean state, GLbitfield texBit) |
Helper function to enable or disable a texture target. | |
void | _mesa_set_enable (GLcontext *ctx, GLenum cap, GLboolean state) |
Helper function to enable or disable state. | |
void GLAPIENTRY | _mesa_Enable (GLenum cap) |
Enable GL capability. | |
void GLAPIENTRY | _mesa_Disable (GLenum cap) |
Disable GL capability. | |
static GLboolean | is_texture_enabled (GLcontext *ctx, GLbitfield bit) |
Helper function to determine whether a texture target is enabled. | |
GLboolean GLAPIENTRY | _mesa_IsEnabled (GLenum cap) |
Return simple enable/disable state. |
#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 | ) |
Value:
if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \ _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); \ return GL_FALSE; \ }
#define CHECK_EXTENSION2 | ( | EXT1, | |||
EXT2, | |||||
CAP | ) |
Value:
if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \ _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \ state ? "Enable" : "Disable", CAP); \ return; \ }
void GLAPIENTRY _mesa_Disable | ( | GLenum | cap | ) |
Disable GL capability.
Called by glDisable()
cap | state to disable. |
void GLAPIENTRY _mesa_DisableClientState | ( | GLenum | cap | ) |
Disable GL capability.
cap | state to enable/disable. |
void GLAPIENTRY _mesa_Enable | ( | GLenum | cap | ) |
Enable GL capability.
Called by glEnable()
cap | state to enable. |
void GLAPIENTRY _mesa_EnableClientState | ( | GLenum | cap | ) |
Enable GL capability.
cap | state to enable/disable. |
GLboolean GLAPIENTRY _mesa_IsEnabled | ( | GLenum | cap | ) |
Return simple enable/disable state.
cap | state variable to query. |
void _mesa_set_enable | ( | GLcontext * | ctx, | |
GLenum | cap, | |||
GLboolean | state | |||
) |
Helper function to enable or disable state.
ctx | GL context. | |
cap | the state to enable/disable | |
state | whether to enable or disable the specified capability. |
static void client_state | ( | GLcontext * | ctx, | |
GLenum | cap, | |||
GLboolean | state | |||
) | [static] |
Helper to enable/disable client-side state.
static GLboolean enable_texture | ( | GLcontext * | ctx, | |
GLboolean | state, | |||
GLbitfield | texBit | |||
) | [static] |
Helper function to enable or disable a texture target.
bit | one of the TEXTURE_x_BIT values |
static struct gl_texture_unit* get_texcoord_unit | ( | GLcontext * | ctx | ) | [static, read] |
Return pointer to current texture unit for setting/getting coordinate state.
Note that we'll set GL_INVALID_OPERATION if the active texture unit is higher than the number of supported coordinate units. And we'll return NULL.
static GLboolean is_texture_enabled | ( | GLcontext * | ctx, | |
GLbitfield | bit | |||
) | [static] |
Helper function to determine whether a texture target is enabled.