Changeset 3582 for trunk/src/opengl/mesa/context.h
- Timestamp:
- May 21, 2000, 10:57:14 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/context.h
r2970 r3582 1 /* $Id: context.h,v 1. 3 2000-03-02 13:27:30 sandervlExp $ */1 /* $Id: context.h,v 1.4 2000-05-21 20:26:33 jeroen Exp $ */ 2 2 3 3 /* 4 4 * Mesa 3-D graphics library 5 * Version: 3. 15 * Version: 3.3 6 6 * 7 7 * Copyright (C) 1999 Brian Paul All Rights Reserved. … … 34 34 35 35 #include "types.h" 36 37 #ifdef THREADS 38 /* 39 * A seperate GLcontext for each thread 40 */ 41 extern GLcontext *gl_get_thread_context( void ); 42 #else 43 /* 44 * All threads use same pointer to current context. 45 */ 46 extern GLcontext *CC; 47 extern struct immediate *CURRENT_INPUT; 48 #endif 49 50 36 #include "glapi.h" 51 37 52 38 /* … … 91 77 92 78 /* 79 * Create/destroy a GLframebuffer. A GLframebuffer is like a GLX drawable. 80 * It bundles up the depth buffer, stencil buffer and accum buffers into a 81 * single entity. 82 */ 83 extern GLframebuffer *gl_create_framebuffer( GLvisual *visual, 84 GLboolean softwareDepth, 85 GLboolean softwareStencil, 86 GLboolean softwareAccum, 87 GLboolean softwareAlpha ); 88 89 extern void gl_destroy_framebuffer( GLframebuffer *buffer ); 90 91 92 93 /* 93 94 * Create/destroy a GLcontext. A GLcontext is like a GLX context. It 94 95 * contains the rendering state. … … 99 100 GLboolean direct); 100 101 102 extern GLboolean gl_initialize_context_data( GLcontext *ctx, 103 GLvisual *visual, 104 GLcontext *share_list, 105 void *driver_ctx, 106 GLboolean direct ); 107 108 extern void gl_free_context_data( GLcontext *ctx ); 109 101 110 extern void gl_destroy_context( GLcontext *ctx ); 102 111 103 /* Called by the driver after both the context and driver are fully 104 * initialized. Currently just reads the config file. 105 */ 112 106 113 extern void gl_context_initialize( GLcontext *ctx ); 107 114 108 /* 109 * Create/destroy a GLframebuffer. A GLframebuffer is like a GLX drawable. 110 * It bundles up the depth buffer, stencil buffer and accum buffers into a 111 * single entity. 112 */ 113 extern GLframebuffer *gl_create_framebuffer( GLvisual *visual ); 114 115 extern void gl_destroy_framebuffer( GLframebuffer *buffer ); 116 115 116 extern void gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); 117 117 118 118 119 119 extern void gl_make_current( GLcontext *ctx, GLframebuffer *buffer ); 120 120 121 122 extern void gl_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer, 123 GLframebuffer *readBuffer ); 124 125 121 126 extern GLcontext *gl_get_current_context(void); 122 127 123 extern void gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); 124 125 extern void gl_set_api_table( GLcontext *ctx, const struct gl_api_table *api ); 126 127 128 129 /* 130 * GL_MESA_resize_buffers extension 131 */ 132 extern void gl_ResizeBuffersMESA( GLcontext *ctx ); 128 129 /* 130 * Macros for fetching current context, input buffer, etc. 131 */ 132 #ifdef THREADS 133 134 #define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context()) 135 136 #define GET_IMMEDIATE struct immediate *IM = ((GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context()))->input 137 138 #define SET_IMMEDIATE(ctx, im) \ 139 do { \ 140 ctx->input = im; \ 141 } while (0) 142 143 #else 144 145 extern struct immediate *_mesa_CurrentInput; 146 147 #define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context 148 149 #define GET_IMMEDIATE struct immediate *IM = _mesa_CurrentInput 150 151 #define SET_IMMEDIATE(ctx, im) \ 152 do { \ 153 ctx->input = im; \ 154 _mesa_CurrentInput = im; \ 155 } while (0) 156 157 #endif 158 159 160 161 extern void 162 _mesa_swapbuffers(GLcontext *ctx); 163 164 165 extern struct _glapi_table * 166 _mesa_get_dispatch(GLcontext *ctx); 133 167 134 168 … … 143 177 144 178 extern void gl_error( GLcontext *ctx, GLenum error, const char *s ); 179 145 180 extern void gl_compile_error( GLcontext *ctx, GLenum error, const char *s ); 146 181 147 extern GLenum gl_GetError( GLcontext *ctx ); 148 149 150 extern void gl_update_state( GLcontext *ctx ); 151 152 153 /* for debugging */ 154 extern void gl_print_state( const char *msg, GLuint state ); 155 156 /* for debugging */ 157 extern void gl_print_enable_flags( const char *msg, GLuint flags ); 182 183 184 extern void 185 _mesa_Finish( void ); 186 187 extern void 188 _mesa_Flush( void ); 189 190 191 192 extern void 193 _mesa_init_no_op_table(struct _glapi_table *exec); 194 195 extern void 196 _mesa_init_exec_table(struct _glapi_table *exec); 197 158 198 159 199
Note:
See TracChangeset
for help on using the changeset viewer.