core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

renderbuffer.h File Reference


Functions

void _mesa_init_renderbuffer (struct gl_renderbuffer *rb, GLuint name)
 Initialize the fields of a gl_renderbuffer to default values.
struct gl_renderbuffer_mesa_new_renderbuffer (GLcontext *ctx, GLuint name)
 Allocate a new gl_renderbuffer object.
void _mesa_delete_renderbuffer (struct gl_renderbuffer *rb)
 Delete a gl_framebuffer.
struct gl_renderbuffer_mesa_new_soft_renderbuffer (GLcontext *ctx, GLuint name)
 Allocate a software-based renderbuffer.
GLboolean _mesa_soft_renderbuffer_storage (GLcontext *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height)
 This is a software fallback for the gl_renderbuffer->AllocStorage function.
GLboolean _mesa_add_color_renderbuffers (GLcontext *ctx, struct gl_framebuffer *fb, GLuint rgbBits, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight)
 Add software-based color renderbuffers to the given framebuffer.
GLboolean _mesa_add_color_index_renderbuffers (GLcontext *ctx, struct gl_framebuffer *fb, GLuint indexBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight)
 Add software-based color index renderbuffers to the given framebuffer.
GLboolean _mesa_add_alpha_renderbuffers (GLcontext *ctx, struct gl_framebuffer *fb, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight)
 Add software-based alpha renderbuffers to the given framebuffer.
void _mesa_copy_soft_alpha_renderbuffers (GLcontext *ctx, struct gl_framebuffer *fb)
 For framebuffers that use a software alpha channel wrapper created by _mesa_add_alpha_renderbuffer or _mesa_add_soft_renderbuffers, copy the back buffer alpha channel into the front buffer alpha channel.
GLboolean _mesa_add_depth_renderbuffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint depthBits)
 Add a software-based depth renderbuffer to the given framebuffer.
GLboolean _mesa_add_stencil_renderbuffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint stencilBits)
 Add a software-based stencil renderbuffer to the given framebuffer.
GLboolean _mesa_add_accum_renderbuffer (GLcontext *ctx, struct gl_framebuffer *fb, GLuint redBits, GLuint greenBits, GLuint blueBits, GLuint alphaBits)
 Add a software-based accumulation renderbuffer to the given framebuffer.
GLboolean _mesa_add_aux_renderbuffers (GLcontext *ctx, struct gl_framebuffer *fb, GLuint bits, GLuint numBuffers)
 Add a software-based accumulation renderbuffer to the given framebuffer.
void _mesa_add_soft_renderbuffers (struct gl_framebuffer *fb, GLboolean color, GLboolean depth, GLboolean stencil, GLboolean accum, GLboolean alpha, GLboolean aux)
 Create/attach software-based renderbuffers to the given framebuffer.
void _mesa_add_renderbuffer (struct gl_framebuffer *fb, GLuint bufferName, struct gl_renderbuffer *rb)
 Attach a renderbuffer to a framebuffer.
void _mesa_remove_renderbuffer (struct gl_framebuffer *fb, GLuint bufferName)
 Remove the named renderbuffer from the given framebuffer.
void _mesa_reference_renderbuffer (struct gl_renderbuffer **ptr, struct gl_renderbuffer *rb)
 Set *ptr to point to rb.
struct gl_renderbuffer_mesa_new_depthstencil_renderbuffer (GLcontext *ctx, GLuint name)
 Create a new combined depth/stencil renderbuffer for implementing the GL_EXT_packed_depth_stencil extension.


Function Documentation

GLboolean _mesa_add_accum_renderbuffer ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  redBits,
GLuint  greenBits,
GLuint  blueBits,
GLuint  alphaBits 
)

Add a software-based accumulation renderbuffer to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

GLboolean _mesa_add_alpha_renderbuffers ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  alphaBits,
GLboolean  frontLeft,
GLboolean  backLeft,
GLboolean  frontRight,
GLboolean  backRight 
)

Add software-based alpha renderbuffers to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

GLboolean _mesa_add_aux_renderbuffers ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  colorBits,
GLuint  numBuffers 
)

Add a software-based accumulation renderbuffer to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

NOTE: color-index aux buffers not supported.

GLboolean _mesa_add_color_index_renderbuffers ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  indexBits,
GLboolean  frontLeft,
GLboolean  backLeft,
GLboolean  frontRight,
GLboolean  backRight 
)

Add software-based color index renderbuffers to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

GLboolean _mesa_add_color_renderbuffers ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  rgbBits,
GLuint  alphaBits,
GLboolean  frontLeft,
GLboolean  backLeft,
GLboolean  frontRight,
GLboolean  backRight 
)

Add software-based color renderbuffers to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

GLboolean _mesa_add_depth_renderbuffer ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  depthBits 
)

Add a software-based depth renderbuffer to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

void _mesa_add_renderbuffer ( struct gl_framebuffer fb,
GLuint  bufferName,
struct gl_renderbuffer rb 
)

Attach a renderbuffer to a framebuffer.

void _mesa_add_soft_renderbuffers ( struct gl_framebuffer fb,
GLboolean  color,
GLboolean  depth,
GLboolean  stencil,
GLboolean  accum,
GLboolean  alpha,
GLboolean  aux 
)

Create/attach software-based renderbuffers to the given framebuffer.

This is a helper routine for device drivers. Drivers can just as well call the individual _mesa_add_*_renderbuffer() routines directly.

GLboolean _mesa_add_stencil_renderbuffer ( GLcontext ctx,
struct gl_framebuffer fb,
GLuint  stencilBits 
)

Add a software-based stencil renderbuffer to the given framebuffer.

This is a helper routine for device drivers when creating a window system framebuffer (not a user-created render/framebuffer). Once this function is called, you can basically forget about this renderbuffer; core Mesa will handle all the buffer management and rendering!

void _mesa_copy_soft_alpha_renderbuffers ( GLcontext ctx,
struct gl_framebuffer fb 
)

For framebuffers that use a software alpha channel wrapper created by _mesa_add_alpha_renderbuffer or _mesa_add_soft_renderbuffers, copy the back buffer alpha channel into the front buffer alpha channel.

void _mesa_delete_renderbuffer ( struct gl_renderbuffer rb  ) 

Delete a gl_framebuffer.

This is the default function for renderbuffer->Delete().

void _mesa_init_renderbuffer ( struct gl_renderbuffer rb,
GLuint  name 
)

Initialize the fields of a gl_renderbuffer to default values.

struct gl_renderbuffer* _mesa_new_depthstencil_renderbuffer ( GLcontext ctx,
GLuint  name 
) [read]

Create a new combined depth/stencil renderbuffer for implementing the GL_EXT_packed_depth_stencil extension.

Returns:
new depth/stencil renderbuffer

struct gl_renderbuffer* _mesa_new_renderbuffer ( GLcontext ctx,
GLuint  name 
) [read]

Allocate a new gl_renderbuffer object.

This can be used for user-created renderbuffers or window-system renderbuffers.

struct gl_renderbuffer* _mesa_new_soft_renderbuffer ( GLcontext ctx,
GLuint  name 
) [read]

Allocate a software-based renderbuffer.

This is called via the ctx->Driver.NewRenderbuffer() function when the user creates a new renderbuffer. This would not be used for hardware-based renderbuffers.

void _mesa_reference_renderbuffer ( struct gl_renderbuffer **  ptr,
struct gl_renderbuffer rb 
)

Set *ptr to point to rb.

If *ptr points to another renderbuffer, dereference that buffer first. The new renderbuffer's refcount will be incremented. The old renderbuffer's refcount will be decremented.

void _mesa_remove_renderbuffer ( struct gl_framebuffer fb,
GLuint  bufferName 
)

Remove the named renderbuffer from the given framebuffer.

GLboolean _mesa_soft_renderbuffer_storage ( GLcontext ctx,
struct gl_renderbuffer rb,
GLenum  internalFormat,
GLuint  width,
GLuint  height 
)

This is a software fallback for the gl_renderbuffer->AllocStorage function.

Device drivers will typically override this function for the buffers which it manages (typically color buffers, Z and stencil). Other buffers (like software accumulation and aux buffers) which the driver doesn't manage can be handled with this function.

This one multi-purpose function can allocate stencil, depth, accum, color or color-index buffers!

This function also plugs in the appropriate GetPointer, Get/PutRow and Get/PutValues functions.


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4