#include "glheader.h"
#include "imports.h"
#include "accum.h"
#include "attrib.h"
#include "blend.h"
#include "buffers.h"
#include "bufferobj.h"
#include "colortab.h"
#include "context.h"
#include "debug.h"
#include "depth.h"
#include "dlist.h"
#include "eval.h"
#include "enums.h"
#include "extensions.h"
#include "feedback.h"
#include "fog.h"
#include "get.h"
#include "glthread.h"
#include "glapioffsets.h"
#include "histogram.h"
#include "hint.h"
#include "hash.h"
#include "light.h"
#include "lines.h"
#include "macros.h"
#include "matrix.h"
#include "occlude.h"
#include "pixel.h"
#include "points.h"
#include "polygon.h"
#include "program.h"
#include "rastpos.h"
#include "simple_list.h"
#include "state.h"
#include "stencil.h"
#include "texcompress.h"
#include "teximage.h"
#include "texobj.h"
#include "texstate.h"
#include "mtypes.h"
#include "varray.h"
#include "vtxfmt.h"
#include "math/m_translate.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
#include "math/mathmod.h"
Context allocation, initialization, destroying | |
| The purpose of the most initialization functions here is to provide the default state values according to the OpenGL specification. | |
| void | free_shared_state (GLcontext *ctx, struct gl_shared_state *ss) |
| Deallocate a shared state context and all children structures. More... | |
| _glthread_DECLARE_STATIC_MUTEX (OneTimeLock) | |
| One-time initialization mutex lock. More... | |
| void | one_time_init (GLcontext *ctx) |
| Calls all the various one-time-init functions in Mesa. More... | |
| GLboolean | alloc_shared_state (GLcontext *ctx) |
| Allocate and initialize a shared context state structure. More... | |
| void | _mesa_init_current (GLcontext *ctx) |
| Initialize fields of gl_current_attrib (aka ctx->Current.*). More... | |
| void | _mesa_init_constants (GLcontext *ctx) |
| Initialize fields of gl_constants (aka ctx->Const.*). More... | |
| GLboolean | init_attrib_groups (GLcontext *ctx) |
| Initialize the attribute groups in a GL context. More... | |
| void | add_newer_entrypoints (void) |
| If the DRI libGL.so library is old, it may not have the entrypoints for some recent OpenGL extensions. More... | |
| GLboolean | _mesa_initialize_context (GLcontext *ctx, const GLvisual *visual, GLcontext *share_list, const struct dd_function_table *driverFunctions, void *driverContext) |
| Initialize a GLcontext struct (rendering context). More... | |
| GLcontext * | _mesa_create_context (const GLvisual *visual, GLcontext *share_list, const struct dd_function_table *driverFunctions, void *driverContext) |
| Allocate and initialize a GLcontext structure. More... | |
| void | _mesa_free_context_data (GLcontext *ctx) |
| Free the data associated with the given context. More... | |
| void | _mesa_destroy_context (GLcontext *ctx) |
| Destroy a GLcontext structure. More... | |
| void | _mesa_copy_context (const GLcontext *src, GLcontext *dst, GLuint mask) |
| Copy attribute groups from one context to another. More... | |
| GLboolean | check_compatible (const GLcontext *ctx, const GLframebuffer *buffer) |
| Check if the given context can render into the given framebuffer by checking visual attributes. More... | |
| void | _mesa_make_current (GLcontext *newCtx, GLframebuffer *buffer) |
| Set the current context, binding the given frame buffer to the context. More... | |
| void | _mesa_make_current2 (GLcontext *newCtx, GLframebuffer *drawBuffer, GLframebuffer *readBuffer) |
| Bind the given context to the given draw-buffer and read-buffer and make it the current context for this thread. More... | |
| GLcontext * | _mesa_get_current_context (void) |
| Get current context for the calling thread. More... | |
| _glapi_table * | _mesa_get_dispatch (GLcontext *ctx) |
| Get context's current API dispatch table. More... | |
OpenGL SI-style interface (new in Mesa 3.5) | |
| GLboolean | _mesa_destroyContext (__GLcontext *gc) |
| Destroy context callback. More... | |
| GLboolean | _mesa_loseCurrent (__GLcontext *gc) |
| Unbind context callback. More... | |
| GLboolean | _mesa_makeCurrent (__GLcontext *gc) |
| Bind context callback. More... | |
| GLboolean | _mesa_shareContext (__GLcontext *gc, __GLcontext *gcShare) |
| Share context callback. More... | |
| GLboolean | _mesa_copyContext (__GLcontext *dst, const __GLcontext *src, GLuint mask) |
| Copy context callback. More... | |
| GLboolean | _mesa_forceCurrent (__GLcontext *gc) |
| No-op. More... | |
| GLboolean | _mesa_notifyResize (__GLcontext *gc) |
| Windows/buffer resizing notification callback. More... | |
| void | _mesa_notifyDestroy (__GLcontext *gc) |
| Window/buffer destruction notification callback. More... | |
| void | _mesa_notifySwapBuffers (__GLcontext *gc) |
| Swap buffers notification callback. More... | |
| __GLdispatchStateRec * | _mesa_dispatchExec (__GLcontext *gc) |
| No-op. More... | |
| void | _mesa_beginDispatchOverride (__GLcontext *gc) |
| No-op. More... | |
| void | _mesa_endDispatchOverride (__GLcontext *gc) |
| No-op. More... | |
| void | _mesa_init_default_exports (__GLexports *exports) |
| Setup the exports. More... | |
| __GLcontext * | __glCoreCreateContext (__GLimports *imports, __GLcontextModes *modes) |
| Exported OpenGL SI interface. More... | |
| void | __glCoreNopDispatch (void) |
| Exported OpenGL SI interface. More... | |
GL Visual allocation/destruction | |
| GLvisual * | _mesa_create_visual (GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, GLint accumAlphaBits, GLint numSamples) |
| Allocates a GLvisual structure and initializes it via _mesa_initialize_visual(). More... | |
| GLboolean | _mesa_initialize_visual (GLvisual *vis, GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, GLint accumAlphaBits, GLint numSamples) |
| Makes some sanity checks and fills in the fields of the GLvisual structure with the given parameters. More... | |
| void | _mesa_destroy_visual (GLvisual *vis) |
| Destroy a visual and free its memory. More... | |
GL Framebuffer allocation/destruction | |
| GLframebuffer * | _mesa_create_framebuffer (const GLvisual *visual, GLboolean softwareDepth, GLboolean softwareStencil, GLboolean softwareAccum, GLboolean softwareAlpha) |
| Allocate a GLframebuffer structure and initializes it via _mesa_initialize_framebuffer(). More... | |
| void | _mesa_initialize_framebuffer (GLframebuffer *buffer, const GLvisual *visual, GLboolean softwareDepth, GLboolean softwareStencil, GLboolean softwareAccum, GLboolean softwareAlpha) |
| Makes some sanity checks and fills in the fields of the GLframebuffer structure with the given parameters. More... | |
| void | _mesa_destroy_framebuffer (GLframebuffer *buffer) |
| Free a framebuffer struct and its buffers. More... | |
| void | _mesa_free_framebuffer_data (GLframebuffer *buffer) |
Free the data hanging off of buffer, but not buffer itself. More... | |
Miscellaneous functions | |
| void | _mesa_record_error (GLcontext *ctx, GLenum error) |
| Record an error. More... | |
| void GLAPIENTRY | _mesa_Finish (void) |
| Execute glFinish(). More... | |
| void GLAPIENTRY | _mesa_Flush (void) |
| Execute glFlush(). More... | |
Variables | |
| GLfloat | _mesa_ubyte_to_float_color_tab [256] |
| Convert GLubyte in [0,255] to GLfloat in [0.0,1.0]. More... | |
|
||||||||||||
|
Exported OpenGL SI interface.
|
|
|
Exported OpenGL SI interface.
|
|
|
One-time initialization mutex lock.
|
|
|
No-op.
|
|
||||||||||||||||
|
Copy attribute groups from one context to another.
mask, copies the corresponding attributes from src into \dst. For many of the attributes a simple memcpy is not enough due to the existence of internal pointers in their data structures. |
|
||||||||||||||||
|
Copy context callback.
|
|
||||||||||||||||||||
|
Allocate and initialize a GLcontext structure. Note that the driver needs to pass in its dd_function_table here since we need to at least call driverFunctions->NewTextureObject to initialize the rendering context.
|
|
||||||||||||||||||||||||
|
Allocate a GLframebuffer structure and initializes it via _mesa_initialize_framebuffer(). A GLframebuffer is a structure which encapsulates the depth, stencil and accum buffers and related parameters.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Allocates a GLvisual structure and initializes it via _mesa_initialize_visual().
|
|
|
Destroy a GLcontext structure.
|
|
|
Free a framebuffer struct and its buffers. Calls _mesa_free_framebuffer_data() and frees the structure. |
|
|
Destroy a visual and free its memory.
|
|
|
Destroy context callback.
Frees the context data and the context structure. |
|
|
No-op.
|
|
|
No-op.
|
|
|
Execute glFinish(). Calls the ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH macro and the dd_function_table::Finish driver callback, if not NULL. |
|
|
Execute glFlush(). Calls the ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH macro and the dd_function_table::Flush driver callback, if not NULL. |
|
|
No-op.
|
|
|
Free the data associated with the given context. But doesn't free the GLcontext struct itself.
|
|
|
Free the data hanging off of
|
|
|
Get current context for the calling thread.
|
|
|
Get context's current API dispatch table. It'll either be the immediate-mode execute dispatcher or the display list compile dispatcher.
|
|
|
Initialize fields of gl_constants (aka ctx->Const.*). Use defaults from config.h. The device drivers will often override some of these values (such as number of texture units). |
|
|
Initialize fields of gl_current_attrib (aka ctx->Current.*).
|
|
|
Setup the exports. The window system will call these functions when it needs Mesa to do something.
|
|
||||||||||||||||||||||||
|
Initialize a GLcontext struct (rendering context). This includes allocating all the other structs and arrays which hang off of the context by pointers. Note that the driver needs to pass in its dd_function_table here since we need to at least call driverFunctions->NewTextureObject to create the default texture objects. Called by _mesa_create_context().
Performs the imports and exports callback tables initialization, and miscellaneous one-time initializations. If no shared context is supplied one is allocated, and increase its reference count. Setups the GL API dispatch tables. Initialize the TNL module. Sets the maximum Z buffer depth. Finally queries the
|
|
||||||||||||||||||||||||||||
|
Makes some sanity checks and fills in the fields of the GLframebuffer structure with the given parameters.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Makes some sanity checks and fills in the fields of the GLvisual structure with the given parameters.
|
|
|
Unbind context callback.
No-op |
|
||||||||||||
|
Set the current context, binding the given frame buffer to the context.
buffer as read and write framebuffer. |
|
||||||||||||||||
|
Bind the given context to the given draw-buffer and read-buffer and make it the current context for this thread.
newCtx is not NULL, associates drawBuffer and readBuffer with it and calls dd_function_table::ResizeBuffers if the buffers size has changed. Calls dd_function_table::MakeCurrent callback if defined.
When a context is bound by the first time and the |
|
|
Bind context callback.
No-op |
|
|
Window/buffer destruction notification callback.
No-op |
|
|
Windows/buffer resizing notification callback.
|
|
|
Swap buffers notification callback.
|
|
||||||||||||
|
Record an error.
|
|
||||||||||||
|
Share context callback.
Update the shared context reference count, gl_shared_state::RefCount. |
|
|
If the DRI libGL.so library is old, it may not have the entrypoints for some recent OpenGL extensions. Dynamically add them now. If we're building stand-alone Mesa where libGL.so has both the dispatcher and driver code, this won't be an issue (and calling this function won't do any harm). |
|
|
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.
|
|
||||||||||||
|
Check if the given context can render into the given framebuffer by checking visual attributes.
|
|
||||||||||||
|
Deallocate a shared state context and all children structures.
|
|
|
Initialize the attribute groups in a GL context.
init* functions for the more complex data structures. |
|
|
Calls all the various one-time-init functions in Mesa.
While holding a global mutex lock, calls several initialization functions, and sets the glapi callbacks if the
|
|
|
Convert GLubyte in [0,255] to GLfloat in [0.0,1.0].
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001