cocos3d  2.0.0
Instance Methods | Class Methods | Properties | List of all members
CC3GLRenderbuffer Class Reference

#import <CC3RenderSurfaces.h>

Inheritance diagram for CC3GLRenderbuffer:
Inheritance graph
[legend]

Instance Methods

(id) - initWithPixelFormat:
 
(id) - initWithPixelFormat:andPixelSamples:
 
(id) - initWithSize:andPixelFormat:
 
- Instance Methods inherited from <CC3FramebufferAttachment>
(void) - bindToFramebuffer:asAttachment:
 
(void) - unbindFromFramebuffer:asAttachment:
 
- Instance Methods inherited from <CC3RenderSurfaceAttachment>
(void) - replacePixels:withContent:
 
(void) - resizeTo:
 
- Instance Methods inherited from <CC3Object>
(id) - asWeakReference
 
(NSString *) - fullDescription
 
(id) - resolveWeakReference
 

Class Methods

(id) + renderbuffer
 
(id) + renderbufferWithPixelFormat:
 
(id) + renderbufferWithPixelFormat:andPixelSamples:
 
(id) + renderbufferWithSize:andPixelFormat:
 

Properties

GLenum pixelFormat
 
GLuint pixelSamples
 
GLuint renderbufferID
 

Detailed Description

Represents an OpenGL renderbuffer.

CC3GLRenderbuffer implements the CC3FramebufferAttachment, allowing it to be attached to a framebuffer.

This class represents a general off-screen renderbuffer, whose storage is allocated from GL memory. For the on-screen renderbuffer whose storage is shared by the view, use the CC3IOSOnScreenGLRenderbuffer subclass.

Method Documentation

- (id) initWithPixelFormat: (GLenum)  format

Initializes this instance with the specified pixel format and with one sample per pixel.

See the pixelFormat property for allowable values for the format parameter.

The size of this renderbuffer can be set by invoking the resizeTo: method.

- (id) initWithPixelFormat: (GLenum)  format
andPixelSamples: (GLuint)  samples 

Initializes this instance with the specified pixel format and with number of samples per pixel.

See the pixelFormat property for allowable values for the format parameter.

The size of this renderbuffer can be set by invoking the resizeTo: method.

- (id) initWithSize: (CC3IntSize size
andPixelFormat: (GLenum)  format 

Initializes this instance and allocates off-screen storage space within GL memory for this buffer, sufficient to render an image of the specified size in the specified pixel format.

The size and pixelFormat properties of this instance are set to the specified values. The pixelSamples property is set to one.

See the pixelFormat property for allowable values for the format parameter.

+ (id) renderbuffer

Allocates and initializes an autoreleased instance with one sample per pixel.

The size and pixel format of this renderbuffer can be set by invoking the resizeTo: method.

+ (id) renderbufferWithPixelFormat: (GLenum)  format

Allocates and initializes an autoreleased instance with the specified pixel format and with one sample per pixel.

See the pixelFormat property for allowable values for the format parameter.

The size of the renderbuffer can be set by invoking the resizeTo: method.

+ (id) renderbufferWithPixelFormat: (GLenum)  format
andPixelSamples: (GLuint)  samples 

Allocates and initializes an autoreleased instance with the specified pixel format and number of samples per pixel.

See the pixelFormat property for allowable values for the format parameter.

The size of the renderbuffer can be set by invoking the resizeTo: method.

+ (id) renderbufferWithSize: (CC3IntSize size
andPixelFormat: (GLenum)  format 

Allocates and initializes an autoreleased instance and allocates off-screen storage space within GL memory for this buffer, sufficient to render an image of the specified size in the specified pixel format.

The size and pixelFormat properties of this instance are set to the specified values. The pixelSamples property will be set to one.

See the pixelFormat property for allowable values for the format parameter.

Property Documentation

- (GLenum) pixelFormat
readnonatomicassign

Returns the format of each pixel in the buffer.

The returned value may be one of the following:

  • GL_RGB8
  • GL_RGBA8
  • GL_RGBA4
  • GL_RGB5_A1
  • GL_RGB565
  • GL_DEPTH_COMPONENT16
  • GL_DEPTH_COMPONENT24
  • GL_DEPTH24_STENCIL8
  • GL_STENCIL_INDEX8
- (GLuint) pixelSamples
readnonatomicassign

Returns the number of samples used to define each pixel.

- (GLuint) renderbufferID
readnonatomicassign

The ID used to identify the renderbuffer to the GL engine.


The documentation for this class was generated from the following file: