mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 10:50:23 +01:00
Some code movement so that the gl_framebuffer is fully initialized before
calling _mesa_make_current() to avoid hitting the initialize_framebuffer_size() stuff in context.c
This commit is contained in:
parent
d21fa9cd79
commit
9cbe0e24ac
1 changed files with 9 additions and 5 deletions
|
|
@ -1376,21 +1376,25 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
|
|||
*/
|
||||
_glapi_check_multithread();
|
||||
|
||||
/* Set the framebuffer's size. This causes the
|
||||
* osmesa_renderbuffer_storage() function to get called.
|
||||
*/
|
||||
_mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height);
|
||||
osmesa->gl_buffer->Initialized = GL_TRUE; /* XXX TEMPORARY? */
|
||||
|
||||
_mesa_make_current( &osmesa->mesa, osmesa->gl_buffer, osmesa->gl_buffer );
|
||||
|
||||
/* Set the color renderbuffer's pointer to the user buffer,
|
||||
* update row pointers, etc.
|
||||
*/
|
||||
if (osmesa->userRowLength)
|
||||
osmesa->rowlength = osmesa->userRowLength;
|
||||
else
|
||||
osmesa->rowlength = width;
|
||||
|
||||
osmesa->rb->Data = buffer;
|
||||
osmesa->rb->DataType = type;
|
||||
compute_row_addresses( osmesa );
|
||||
|
||||
/* update the color renderbuffer's format, type, width, height */
|
||||
osmesa_renderbuffer_storage(&osmesa->mesa, osmesa->rb,
|
||||
osmesa->rb->InternalFormat, width, height);
|
||||
|
||||
/* Remove renderbuffer attachment, then re-add. This installs the
|
||||
* renderbuffer adaptor/wrapper if needed.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue