Cocos2d-x  v4
cocos2d::backend Namespace Reference

Command used to render one or more Triangles, which is similar to QuadCommand. More...

Classes

struct  AttributeInfo
 Store attribute information. More...
 
struct  BlendDescriptor
 a structor to store blend descriptor More...
 
class  Buffer
 Used to store vertex and index data data. More...
 
class  BufferGL
 Store vertex and index data. More...
 
class  BufferManager
 A static class to manage BufferMTL Schedule next available buffer at the beginning of frame for the render pass. More...
 
class  BufferMTL
 Used to store vertex and index data data. More...
 
class  CommandBuffer
 Store encoded commands for the GPU to execute. More...
 
class  CommandBufferGL
 Store encoded commands for the GPU to execute. More...
 
class  CommandBufferMTL
 Store encoded commands for the GPU to execute. More...
 
struct  DepthStencilDescriptor
 Depth and stencil descriptor. More...
 
class  DepthStencilState
 Store Depth and stencil status. More...
 
class  DepthStencilStateGL
 Set depth and stencil status to pipeline. More...
 
class  DepthStencilStateMTL
 A class represent a depth/stencil test status. More...
 
class  Device
 New or create resources from Device. More...
 
class  DeviceGL
 Use to create resoureces. More...
 
class  DeviceInfo
 Used to query features and implementation limits. More...
 
class  DeviceInfoGL
 Used to query features and implementation limits. More...
 
class  DeviceInfoMTL
 Used to query features and implementation limits. More...
 
class  DeviceMTL
 Create resources from MTLDevice. More...
 
class  Program
 A program. More...
 
class  ProgramCache
 Cache and reuse program object. More...
 
class  ProgramGL
 An OpenGL program. More...
 
class  ProgramMTL
 A metal Program. More...
 
struct  RenderPassDescriptor
 Store values about color, depth and stencil attachment. More...
 
class  RenderPipeline
 Render pipeline. More...
 
struct  RenderPipelineDescriptor
 Store values about pipeline. More...
 
class  RenderPipelineGL
 Set program and blend state. More...
 
class  RenderPipelineMTL
 Create and compile a new MTLRenderPipelineState object synchronously. More...
 
class  ShaderCache
 Create and reuse shader module. More...
 
class  ShaderModule
 Create shader. More...
 
class  ShaderModuleGL
 Create and compile shader. More...
 
class  ShaderModuleMTL
 To Create a vertex or fragment shader. More...
 
struct  StencilDescriptor
 Stencil descriptor. More...
 
class  Texture2DBackend
 A 2D texture. More...
 
class  Texture2DGL
 A 2D texture. More...
 
class  TextureBackend
 A base texture. More...
 
class  TextureCubeGL
 Texture cube. More...
 
class  TextureCubemapBackend
 A cubemap texture. More...
 
class  TextureCubeMTL
 A texture cube. More...
 
struct  TextureDescriptor
 Store texture description. More...
 
struct  TextureInfoGL
 Store texture information. More...
 
class  TextureMTL
 A 2D texture. More...
 
class  Utils
 create and manager default depth and stencil attachment. More...
 
class  VertexLayout
 Store vertex attribute layout. More...
 

Enumerations

enum  PixelFormat {
  AUTO, BGRA8888, RGBA8888, RGB888,
  RGB565, A8, I8, AI88,
  RGBA4444, RGB5A1, PVRTC4, PVRTC4A,
  PVRTC2, PVRTC2A, ETC, S3TC_DXT1,
  S3TC_DXT3, S3TC_DXT5, ATC_RGB, ATC_EXPLICIT_ALPHA,
  ATC_INTERPOLATED_ALPHA, MTL_B5G6R5
}
 

Detailed Description

Command used to render one or more Triangles, which is similar to QuadCommand.

Every TrianglesCommand will have generate material ID by give textureID, glProgramState, Blend function if the material id is the same, these TrianglesCommands could be batched to save draw call.

Enumeration Type Documentation

◆ PixelFormat

enum PixelFormat
strong

Possible texture pixel formats

Enumerator
AUTO 

auto detect the type

BGRA8888 

32-bit texture: BGRA8888

RGBA8888 

32-bit texture: RGBA8888

RGB888 

24-bit texture: RGBA888

RGB565 

16-bit texture without Alpha channel

A8 

8-bit textures used as masks

I8 

8-bit intensity texture

AI88 

16-bit textures used as masks

RGBA4444 

16-bit textures: RGBA4444

RGB5A1 

16-bit textures: RGB5A1

PVRTC4 

4-bit PVRTC-compressed texture: PVRTC4

PVRTC4A 

4-bit PVRTC-compressed texture: PVRTC4 (has alpha channel)

PVRTC2 

2-bit PVRTC-compressed texture: PVRTC2

PVRTC2A 

2-bit PVRTC-compressed texture: PVRTC2 (has alpha channel)

ETC 

ETC-compressed texture: ETC.

S3TC_DXT1 

S3TC-compressed texture: S3TC_Dxt1.

S3TC_DXT3 

S3TC-compressed texture: S3TC_Dxt3.

S3TC_DXT5 

S3TC-compressed texture: S3TC_Dxt5.

ATC_RGB 

ATITC-compressed texture: ATC_RGB.

ATC_EXPLICIT_ALPHA 

ATITC-compressed texture: ATC_EXPLICIT_ALPHA.

ATC_INTERPOLATED_ALPHA 

ATITC-compressed texture: ATC_INTERPOLATED_ALPHA.

MTL_B5G6R5 

Default texture format: AUTO.