#include "imports.h"
#include "mtypes.h"
#include "hash.h"
#include "arrayobj.h"
#include "bufferobj.h"
#include "shared.h"
#include "shader/program.h"
#include "shader/shader_api.h"
Functions | |
struct gl_shared_state * | _mesa_alloc_shared_state (GLcontext *ctx) |
Allocate and initialize a shared context state structure. | |
static void | delete_displaylist_cb (GLuint id, void *data, void *userData) |
Callback for deleting a display list. | |
static void | delete_texture_cb (GLuint id, void *data, void *userData) |
Callback for deleting a texture object. | |
static void | delete_program_cb (GLuint id, void *data, void *userData) |
Callback for deleting a program object. | |
static void | delete_bufferobj_cb (GLuint id, void *data, void *userData) |
Callback for deleting a buffer object. | |
static void | free_shader_program_data_cb (GLuint id, void *data, void *userData) |
Callback for freeing shader program data. | |
static void | delete_shader_cb (GLuint id, void *data, void *userData) |
Callback for deleting shader and shader programs objects. | |
static void | delete_framebuffer_cb (GLuint id, void *data, void *userData) |
Callback for deleting a framebuffer object. | |
static void | delete_renderbuffer_cb (GLuint id, void *data, void *userData) |
Callback for deleting a renderbuffer object. | |
void | _mesa_free_shared_state (GLcontext *ctx, struct gl_shared_state *shared) |
Deallocate a shared state object and all children structures. |
struct gl_shared_state* _mesa_alloc_shared_state | ( | GLcontext * | ctx | ) | [read] |
Allocate and initialize a shared context state structure.
Initializes the display list, texture objects and vertex programs hash tables, allocates the texture objects. If it runs out of memory, frees everything already allocated before returning NULL.
void _mesa_free_shared_state | ( | GLcontext * | ctx, | |
struct gl_shared_state * | shared | |||
) |
Deallocate a shared state object and all children structures.
ctx | GL context. | |
shared | shared state pointer. |
static void delete_bufferobj_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a buffer object.
Called by _mesa_HashDeleteAll().
static void delete_displaylist_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a display list.
Called by _mesa_HashDeleteAll().
static void delete_framebuffer_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a framebuffer object.
Called by _mesa_HashDeleteAll()
static void delete_program_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a program object.
Called by _mesa_HashDeleteAll().
static void delete_renderbuffer_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a renderbuffer object.
Called by _mesa_HashDeleteAll()
static void delete_shader_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting shader and shader programs objects.
Called by _mesa_HashDeleteAll().
static void delete_texture_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for deleting a texture object.
Called by _mesa_HashDeleteAll().
static void free_shader_program_data_cb | ( | GLuint | id, | |
void * | data, | |||
void * | userData | |||
) | [static] |
Callback for freeing shader program data.
Call it before delete_shader_cb to avoid memory access error.