Functions | |
struct gl_framebuffer * | _mesa_create_framebuffer (const GLvisual *visual) |
Create and initialize a gl_framebuffer object. | |
struct gl_framebuffer * | _mesa_new_framebuffer (GLcontext *ctx, GLuint name) |
Allocate a new gl_framebuffer object. | |
void | _mesa_initialize_framebuffer (struct gl_framebuffer *fb, const GLvisual *visual) |
Initialize a gl_framebuffer object. | |
void | _mesa_destroy_framebuffer (struct gl_framebuffer *buffer) |
Deallocate buffer and everything attached to it. | |
void | _mesa_free_framebuffer_data (struct gl_framebuffer *buffer) |
Free all the data hanging off the given gl_framebuffer, but don't free the gl_framebuffer object itself. | |
void | _mesa_reference_framebuffer (struct gl_framebuffer **ptr, struct gl_framebuffer *fb) |
Set *ptr to point to fb, with refcounting and locking. | |
void | _mesa_resize_framebuffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height) |
Resize the given framebuffer's renderbuffers to the new width and height. | |
void | _mesa_resizebuffers (GLcontext *ctx) |
XXX THIS IS OBSOLETE - drivers should take care of detecting window size changes and act accordingly, likely calling _mesa_resize_framebuffer(). | |
void GLAPIENTRY | _mesa_ResizeBuffersMESA (void) |
void | _mesa_update_draw_buffer_bounds (GLcontext *ctx) |
Update the context's current drawing buffer's Xmin, Xmax, Ymin, Ymax fields. | |
void | _mesa_update_framebuffer_visual (struct gl_framebuffer *fb) |
The glGet queries of the framebuffer red/green/blue size, stencil size, etc. | |
void | _mesa_update_depth_buffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint attIndex) |
Update the framebuffer's _DepthBuffer field using the renderbuffer found at the given attachment index. | |
void | _mesa_update_stencil_buffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint attIndex) |
Update the framebuffer's _StencilBuffer field using the renderbuffer found at the given attachment index. | |
void | _mesa_update_framebuffer (GLcontext *ctx) |
Update state related to the current draw/read framebuffers. | |
GLboolean | _mesa_source_buffer_exists (GLcontext *ctx, GLenum format) |
Check if the renderbuffer for a read operation (glReadPixels, glCopyPixels, glCopyTex[Sub]Image, etc) exists. | |
GLboolean | _mesa_dest_buffer_exists (GLcontext *ctx, GLenum format) |
As above, but for drawing operations. |
struct gl_framebuffer* _mesa_create_framebuffer | ( | const GLvisual * | visual | ) | [read] |
Create and initialize a gl_framebuffer object.
This is intended for creating _window_system_ framebuffers, not generic framebuffer objects ala GL_EXT_framebuffer_object.
GLboolean _mesa_dest_buffer_exists | ( | GLcontext * | ctx, | |
GLenum | format | |||
) |
As above, but for drawing operations.
XXX could do some code merging w/ above function.
void _mesa_destroy_framebuffer | ( | struct gl_framebuffer * | fb | ) |
Deallocate buffer and everything attached to it.
Typically called via the gl_framebuffer->Delete() method.
void _mesa_free_framebuffer_data | ( | struct gl_framebuffer * | buffer | ) |
Free all the data hanging off the given gl_framebuffer, but don't free the gl_framebuffer object itself.
void _mesa_initialize_framebuffer | ( | struct gl_framebuffer * | fb, | |
const GLvisual * | visual | |||
) |
Initialize a gl_framebuffer object.
Typically used to initialize window system-created framebuffers, not user-created framebuffers.
struct gl_framebuffer* _mesa_new_framebuffer | ( | GLcontext * | ctx, | |
GLuint | name | |||
) | [read] |
Allocate a new gl_framebuffer object.
This is the default function for ctx->Driver.NewFramebuffer(). This is for allocating user-created framebuffers, not window-system framebuffers!
void _mesa_reference_framebuffer | ( | struct gl_framebuffer ** | ptr, | |
struct gl_framebuffer * | fb | |||
) |
Set *ptr to point to fb, with refcounting and locking.
void _mesa_resize_framebuffer | ( | GLcontext * | ctx, | |
struct gl_framebuffer * | fb, | |||
GLuint | width, | |||
GLuint | height | |||
) |
Resize the given framebuffer's renderbuffers to the new width and height.
This should only be used for window-system framebuffers, not user-created renderbuffers (i.e. made with GL_EXT_framebuffer_object). This will typically be called via ctx->Driver.ResizeBuffers() or directly from a device driver.
void _mesa_resizebuffers | ( | GLcontext * | ctx | ) |
XXX THIS IS OBSOLETE - drivers should take care of detecting window size changes and act accordingly, likely calling _mesa_resize_framebuffer().
GL_MESA_resize_buffers extension.
When this function is called, we'll ask the window system how large the current window is. If it's a new size, we'll call the driver's ResizeBuffers function. The driver will then resize its color buffers as needed, and maybe call the swrast's routine for reallocating swrast-managed depth/stencil/accum/etc buffers.
void GLAPIENTRY _mesa_ResizeBuffersMESA | ( | void | ) |
GLboolean _mesa_source_buffer_exists | ( | GLcontext * | ctx, | |
GLenum | format | |||
) |
Check if the renderbuffer for a read operation (glReadPixels, glCopyPixels, glCopyTex[Sub]Image, etc) exists.
format | a basic image format such as GL_RGB, GL_RGBA, GL_ALPHA, GL_DEPTH_COMPONENT, etc. or GL_COLOR, GL_DEPTH, GL_STENCIL. |
void _mesa_update_depth_buffer | ( | GLcontext * | ctx, | |
struct gl_framebuffer * | fb, | |||
GLuint | attIndex | |||
) |
Update the framebuffer's _DepthBuffer field using the renderbuffer found at the given attachment index.
If that attachment points to a combined GL_DEPTH_STENCIL renderbuffer, create and install a depth wrapper/adaptor.
fb | the framebuffer whose _DepthBuffer field to update | |
attIndex | indicates the renderbuffer to possibly wrap |
void _mesa_update_draw_buffer_bounds | ( | GLcontext * | ctx | ) |
Update the context's current drawing buffer's Xmin, Xmax, Ymin, Ymax fields.
These values are computed from the buffer's width and height and the scissor box, if it's enabled.
ctx | the GL context. |
void _mesa_update_framebuffer | ( | GLcontext * | ctx | ) |
Update state related to the current draw/read framebuffers.
void _mesa_update_framebuffer_visual | ( | struct gl_framebuffer * | fb | ) |
The glGet queries of the framebuffer red/green/blue size, stencil size, etc.
are satisfied by the fields of ctx->DrawBuffer->Visual. These can change depending on the renderbuffer bindings. This function updates the given framebuffer's Visual from the current renderbuffer bindings.
This may apply to user-created framebuffers or window system framebuffers.
Also note: ctx->DrawBuffer->Visual.depthBits might not equal ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer.DepthBits. The former one is used to convert floating point depth values into integer Z values.
void _mesa_update_stencil_buffer | ( | GLcontext * | ctx, | |
struct gl_framebuffer * | fb, | |||
GLuint | attIndex | |||
) |
Update the framebuffer's _StencilBuffer field using the renderbuffer found at the given attachment index.
If that attachment points to a combined GL_DEPTH_STENCIL renderbuffer, create and install a stencil wrapper/adaptor.
fb | the framebuffer whose _StencilBuffer field to update | |
attIndex | indicates the renderbuffer to possibly wrap |