/**
* Swap buffers notification callback.
- *
+ *
* \param ctx GL context.
*
* Called by window system just before swapping buffers.
/**
* Allocates a struct gl_config structure and initializes it via
* _mesa_initialize_visual().
- *
+ *
* \param dbFlag double buffering
* \param stereoFlag stereo buffer
* \param depthBits requested bits per depth buffer value. Any value in [0, 32]
* \param blueBits same as above.
* \param alphaBits same as above.
* \param numSamples not really used.
- *
+ *
* \return pointer to new struct gl_config or NULL if requested parameters
* can't be met.
*
* Destroy a visual and free its memory.
*
* \param vis visual.
- *
+ *
* Frees the visual structure.
*/
void
#if defined(DEBUG) && defined(__DATE__) && defined(__TIME__)
if (MESA_VERBOSE != 0) {
- _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n",
- PACKAGE_VERSION, __DATE__, __TIME__);
+ _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n",
+ PACKAGE_VERSION, __DATE__, __TIME__);
}
#endif
}
/* check that we don't exceed the size of various bitfields */
assert(VARYING_SLOT_MAX <=
- (8 * sizeof(ctx->VertexProgram._Current->info.outputs_written)));
+ (8 * sizeof(ctx->VertexProgram._Current->info.outputs_written)));
assert(VARYING_SLOT_MAX <=
- (8 * sizeof(ctx->FragmentProgram._Current->info.inputs_read)));
+ (8 * sizeof(ctx->FragmentProgram._Current->info.inputs_read)));
/* shader-related checks */
assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
* 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
* _mesa_choose_tex_format().
*/
memset(&ctx->TextureFormatSupported, GL_TRUE,
- sizeof(ctx->TextureFormatSupported));
+ sizeof(ctx->TextureFormatSupported));
ctx->Cache = disk_cache_create();
* "Initially all texture generation modes are set to REFLECTION_MAP_OES"
*/
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
- texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
- texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
- texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
- texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV;
- texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV;
- texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
+ texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV;
}
break;
case API_OPENGLES2:
/**
* Free the data associated with the given context.
- *
+ *
* But doesn't free the struct gl_context struct itself.
*
* \sa _mesa_initialize_context() and init_attrib_groups().
* Destroy a struct gl_context structure.
*
* \param ctx GL context.
- *
+ *
* Calls _mesa_free_context_data() and frees the gl_context object itself.
*/
void
/**
* Copy attribute groups from one context to another.
- *
+ *
* \param src source context
* \param dst destination context
* \param mask bitwise OR of GL_*_BIT flags
*
* \return GL_TRUE if compatible, GL_FALSE otherwise.
*/
-static GLboolean
+static GLboolean
check_compatible(const struct gl_context *ctx,
const struct gl_framebuffer *buffer)
{
}
}
+
static void
handle_first_current(struct gl_context *ctx)
{
/* According to GL_MESA_configless_context the default value of
* glDrawBuffers depends on the config of the first surface it is bound to.
- * For GLES it is always GL_BACK which has a magic interpretation */
+ * For GLES it is always GL_BACK which has a magic interpretation.
+ */
if (!ctx->HasConfig && _mesa_is_desktop_gl(ctx)) {
if (ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) {
GLenum buffer;
}
}
- if (curCtx &&
+ if (curCtx &&
(curCtx->WinSysDrawBuffer || curCtx->WinSysReadBuffer) &&
/* make sure this context is valid for flushing */
curCtx != newCtx &&
/* XXX only set this flag if we're really changing the draw/read
* framebuffer bindings.
*/
- newCtx->NewState |= _NEW_BUFFERS;
+ newCtx->NewState |= _NEW_BUFFERS;
_mesa_check_init_viewport(newCtx,
drawBuffer->Width, drawBuffer->Height);
if (newCtx->FirstTimeCurrent) {
handle_first_current(newCtx);
- newCtx->FirstTimeCurrent = GL_FALSE;
+ newCtx->FirstTimeCurrent = GL_FALSE;
}
}
-
+
return GL_TRUE;
}
/**
* \return pointer to the current GL context for this thread.
- *
+ *
* Calls _glapi_get_context(). This isn't the fastest way to get the current
* context. If you need speed, see the #GET_CURRENT_CONTEXT macro in
* context.h.
*
* It'll either be the immediate-mode execute dispatcher or the display list
* compile dispatcher.
- *
+ *
* \param ctx GL context.
*
* \return pointer to dispatch_table.
*
* \param ctx GL context.
* \param error error code.
- *
+ *
* Records the given error code and call the driver's dd_function_table::Error
* function if defined.
*
}
-
-
/*@}*/