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

api_validate.c File Reference

#include "glheader.h"
#include "api_validate.h"
#include "bufferobj.h"
#include "context.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"
#include "vbo/vbo.h"

Functions

static GLsizei index_bytes (GLenum type, GLsizei count)
 
Returns:
number of bytes in array [count] of type.

GLuint _mesa_max_buffer_index (GLcontext *ctx, GLuint count, GLenum type, const void *indices, struct gl_buffer_object *elementBuf)
 Find the max index in the given element/index buffer.
static GLboolean check_valid_to_render (GLcontext *ctx, const char *function)
 Check if OK to draw arrays/elements.
static GLboolean check_index_bounds (GLcontext *ctx, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
GLboolean _mesa_validate_DrawElements (GLcontext *ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
 Error checking for glDrawElements().
GLboolean _mesa_validate_DrawRangeElements (GLcontext *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
 Error checking for glDrawRangeElements().
GLboolean _mesa_validate_DrawArrays (GLcontext *ctx, GLenum mode, GLint start, GLsizei count)
 Called from the tnl module to error check the function parameters and verify that we really can draw something.


Function Documentation

GLuint _mesa_max_buffer_index ( GLcontext ctx,
GLuint  count,
GLenum  type,
const void *  indices,
struct gl_buffer_object elementBuf 
)

Find the max index in the given element/index buffer.

GLboolean _mesa_validate_DrawArrays ( GLcontext ctx,
GLenum  mode,
GLint  start,
GLsizei  count 
)

Called from the tnl module to error check the function parameters and verify that we really can draw something.

Returns:
GL_TRUE if OK to render, GL_FALSE if error found

GLboolean _mesa_validate_DrawElements ( GLcontext ctx,
GLenum  mode,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLint  basevertex 
)

Error checking for glDrawElements().

Includes parameter checking and VBO bounds checking.

Returns:
GL_TRUE if OK to render, GL_FALSE if error found

GLboolean _mesa_validate_DrawRangeElements ( GLcontext ctx,
GLenum  mode,
GLuint  start,
GLuint  end,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLint  basevertex 
)

Error checking for glDrawRangeElements().

Includes parameter checking and VBO bounds checking.

Returns:
GL_TRUE if OK to render, GL_FALSE if error found

static GLboolean check_index_bounds ( GLcontext ctx,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLint  basevertex 
) [static]

static GLboolean check_valid_to_render ( GLcontext ctx,
const char *  function 
) [static]

Check if OK to draw arrays/elements.

static GLsizei index_bytes ( GLenum  type,
GLsizei  count 
) [static]

Returns:
number of bytes in array [count] of type.


Generated on Sun Sep 27 06:47:45 2009 for Mesa Main by  doxygen 1.5.4