CC3ViewSurfaceManager Class Reference
Inherits from | CC3SurfaceManager : NSObject |
Declared in | CC3RenderSurfaces.h |
Overview
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.
Tasks
-
viewSurface
property -
multisampleSurface
property -
renderingSurface
property -
colorFormat
property -
depthFormat
property -
stencilFormat
property -
colorTexelFormat
property -
colorTexelType
property -
depthTexelFormat
property -
depthTexelType
property -
pixelSamples
property -
isMultisampling
property -
multisamplingSize
property -
– resolveMultisampling
-
__deprecated
property -
– initFromView:
-
+ sharedViewSurfaceManager
Properties
__deprecated
@deprecated Property moved to [CC3Backgrounder sharedBackgrounder] singleton.
@property (nonatomic, retain) CC3Backgrounder *__deprecated
Declared In
CC3RenderSurfaces.h
colorFormat
Returns the color format of the pixels.
@property (nonatomic, readonly) GLenum colorFormat
Discussion
This is a convenience property that helps you create off-screen surfaces that match the fromat of the on-screen surface.
Declared In
CC3RenderSurfaces.h
colorTexelFormat
Returns the texture pixel format that matches the format of the color attachment of the view’s rendering surface.
@property (nonatomic, readonly) GLenum colorTexelFormat
Discussion
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.
Declared In
CC3RenderSurfaces.h
colorTexelType
Returns the texture pixel type that matches the format of the color attachment of the view’s rendering surface.
@property (nonatomic, readonly) GLenum colorTexelType
Discussion
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.
Declared In
CC3RenderSurfaces.h
depthFormat
Returns the depth format of the pixels.
@property (nonatomic, readonly) GLenum depthFormat
Discussion
This is a convenience property that helps you create off-screen surfaces that match the fromat of the on-screen surface.
Declared In
CC3RenderSurfaces.h
depthTexelFormat
Returns the texture pixel format that matches the format of the depth attachment of the view’s rendering surface.
@property (nonatomic, readonly) GLenum depthTexelFormat
Discussion
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.
Declared In
CC3RenderSurfaces.h
depthTexelType
Returns the texture pixel type that matches the format of the depth attachment of the view’s rendering surface.
@property (nonatomic, readonly) GLenum depthTexelType
Discussion
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.
Declared In
CC3RenderSurfaces.h
isMultisampling
Returns whether multisampling is in use.
@property (nonatomic, readonly) BOOL isMultisampling
Declared In
CC3RenderSurfaces.h
multisampleSurface
Returns the surface used for off-screen multisample rendering.
@property (nonatomic, retain, readonly) id<CC3RenderSurface> multisampleSurface
Discussion
The value of this property may be nil if multisampling is not in use.
Declared In
CC3RenderSurfaces.h
multisamplingSize
Returns the size of this surface in multisampling pixels.
@property (nonatomic, readonly) CC3IntSize multisamplingSize
Discussion
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.
Declared In
CC3RenderSurfaces.h
pixelSamples
Returns the number of samples used to define each pixel.
@property (nonatomic, readonly) GLuint pixelSamples
Discussion
If this value is larger than one, then multisampling is in use.
Declared In
CC3RenderSurfaces.h
renderingSurface
Returns the surface to which rendering should be directed.
@property (nonatomic, retain, readonly) id<CC3RenderSurface> renderingSurface
Discussion
If multisampling is in use, this property returns the framebuffer in the multisampleSurface property, otherwise it returns the framebuffer in the viewSurface property.
Declared In
CC3RenderSurfaces.h
Instance Methods
initFromView:
Initializes this instance for the specified view.
- (instancetype)initFromView:(CCGLView *)view
Declared In
CC3RenderSurfaces.h
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.
- (void)resolveMultisampling
Discussion
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.
Declared In
CC3RenderSurfaces.h