v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3ViewSurfaceManager Class Reference

#import <CC3RenderSurfaces.h>

Inheritance diagram for CC3ViewSurfaceManager:
Inheritance graph
[legend]

Instance Methods

(instancetype) - initFromView:
 
(void) - resolveMultisampling
 
- Instance Methods inherited from CC3SurfaceManager
(void) - addSurface:
 
(void) - removeSurface:
 
(void) - retainSurface:inIvar:
 

Class Methods

(CC3ViewSurfaceManager *) + sharedViewSurfaceManager
 
- Class Methods inherited from CC3SurfaceManager
(instancetype) + surfaceManager
 

Properties

CC3Backgrounder *backgrounder __deprecated
 
BOOL
shouldUseDedicatedPickingSurface 
__deprecated
 
GLenum colorFormat
 
GLenum colorTexelFormat
 
GLenum colorTexelType
 
GLenum depthFormat
 
GLenum depthTexelFormat
 
GLenum depthTexelType
 
BOOL isMultisampling
 
id< CC3RenderSurfacemultisampleSurface
 
CC3IntSize multisamplingSize
 
GLuint pixelSamples
 
id< CC3RenderSurfacerenderingSurface
 
GLenum stencilFormat
 
id< CC3RenderSurfaceviewSurface
 
- Properties inherited from CC3SurfaceManager
CC3IntSize size
 

Detailed Description

Manages the render surfaces used to render content to the OS view on the screen.

Wraps the view's surface, and an optional anti-aliasing multisampling surface.

If multisampling is not in use, rendering is directed to the surface in the the viewSurface property, which is attached to the underlying core animation layer.

If multisampling is used, rendering is directed to the surface in the the multisampleSurface property, and then once rendering is complete, the multisampled surface can be resolved onto the view surface.

Method Documentation

- (instancetype) initFromView: (CCGLView *)  view

Initializes this instance for the specified view.

- (void) resolveMultisampling

This method should only be used if multisampling is not being resolved already within the CCGLView.

Under normal operation, CCGLView manages the resolution of multisampling.

If the view supports multisampling, resolve the multisampling surface into the view surface.

If framebuffer discarding is supported, this method also instructs the GL engine to allow the discarding of any framebuffers that are not needed for presenting the final image to the screen.

Upon completion, this method leaves the renderbuffer that is attached to the view bound to the GL engine, so that it can be presented to the view.

+ (CC3ViewSurfaceManager*) sharedViewSurfaceManager

Returns a singleton instance.

This method must be invoked after the view has been established in the CCDirector.

Property Documentation

- (CC3Backgrounder* backgrounder) __deprecated
readwritenonatomicretain
Deprecated:
Property moved to [CC3Backgrounder sharedBackgrounder] singleton.
- (BOOL shouldUseDedicatedPickingSurface) __deprecated
readwritenonatomicassign
Deprecated:
The picking surface is always dedicated. This property always returns YES. Setting this property has no effect.
- (GLenum) colorFormat
readnonatomicassign

Returns the color format of the pixels.

This is a convenience property that helps you create off-screen surfaces that match the fromat of the on-screen surface.

- (GLenum) colorTexelFormat
readnonatomicassign

Returns the texture pixel format that matches the format of the color attachment of the view's rendering surface.

This is a convenience property that helps you create off-screen texture rendering surfaces that match the fromat of the on-screen surface.

Under OpenGL, textures use different formatting than renderbuffers. When creating an off-screen surface that uses a texture as its color attachment, you can use the values returned by this property and the colorTexelType property to create a texture that matches the format of the color buffer of the view's rendering surface.

- (GLenum) colorTexelType
readnonatomicassign

Returns the texture pixel type that matches the format of the color attachment of the view's rendering surface.

This is a convenience property that helps you create off-screen texture rendering surfaces that match the fromat of the on-screen surface.

Under OpenGL, textures use different formatting than renderbuffers. When creating an off-screen surface that uses a texture as its color attachment, you can use the values returned by this property and the colorTexelFormat property to create a texture that matches the format of the color buffer of the view's rendering surface.

- (GLenum) depthFormat
readnonatomicassign

Returns the depth format of the pixels.

This is a convenience property that helps you create off-screen surfaces that match the fromat of the on-screen surface.

- (GLenum) depthTexelFormat
readnonatomicassign

Returns the texture pixel format that matches the format of the depth attachment of the view's rendering surface.

This is a convenience property that helps you create off-screen texture rendering surfaces that match the fromat of the on-screen surface.

Under OpenGL, textures use different formatting than renderbuffers. When creating an off-screen surface that uses a texture as its depth attachment, you can use the values returned by this property and the depthTexelType property to create a texture that matches the format of the depth buffer of the view's rendering surface.

- (GLenum) depthTexelType
readnonatomicassign

Returns the texture pixel type that matches the format of the depth attachment of the view's rendering surface.

This is a convenience property that helps you create off-screen texture rendering surfaces that match the fromat of the on-screen surface.

Under OpenGL, textures use different formatting than renderbuffers. When creating an off-screen surface that uses a texture as its depth attachment, you can use the values returned by this property and the depthTexelFormat property to create a texture that matches the format of the depth buffer of the view's rendering surface.

- (BOOL) isMultisampling
readnonatomicassign

Returns whether multisampling is in use.

- (id<CC3RenderSurface>) multisampleSurface
readnonatomicretain

Returns the surface used for off-screen multisample rendering.

The value of this property may be nil if multisampling is not in use.

- (CC3IntSize) multisamplingSize
readnonatomicassign

Returns the size of this surface in multisampling pixels.

The value of this property will be larger than the value of the size property if multisampling is in use. For example, if the value of the pixelSamples property is 4, then the width and height returned by this property will be twice that of the width and height of returned by the size property.

- (GLuint) pixelSamples
readnonatomicassign

Returns the number of samples used to define each pixel.

If this value is larger than one, then multisampling is in use.

- (id<CC3RenderSurface>) renderingSurface
readnonatomicretain

Returns the surface to which rendering should be directed.

If multisampling is in use, this property returns the framebuffer in the multisampleSurface property, otherwise it returns the framebuffer in the viewSurface property.

- (GLenum) stencilFormat
readnonatomicassign

Returns the stencil format of the pixels.

This is a convenience property that helps you create off-screen surfaces that match the fromat of the on-screen surface.

- (id<CC3RenderSurface>) viewSurface
readnonatomicretain

Returns the on-screen surface attached to the underlying core animation layer.


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