Cocos2d-x
4.0.0
|
Use to create resoureces. More...
Inherits Device.
Public Member Functions | |
virtual CommandBuffer * | newCommandBuffer () override |
New a CommandBuffer object, not auto released. | |
virtual Buffer * | newBuffer (std::size_t size, BufferType type, BufferUsage usage) override |
New a Buffer object, not auto released. | |
virtual TextureBackend * | newTexture (const TextureDescriptor &descriptor) override |
New a TextureBackend object, not auto released. | |
virtual DepthStencilState * | createDepthStencilState (const DepthStencilDescriptor &descriptor) override |
Create an auto released DepthStencilState object. | |
virtual RenderPipeline * | newRenderPipeline () override |
New a RenderPipeline object, not auto released. | |
virtual void | setFrameBufferOnly (bool frameBufferOnly) override |
Design for metal. | |
virtual Program * | newProgram (const std::string &vertexShader, const std::string &fragmentShader) override |
New a Program, not auto released. | |
![]() | |
virtual Buffer * | newBuffer (size_t size, BufferType type, BufferUsage usage)=0 |
New a Buffer object, not auto released. | |
DeviceInfo * | getDeviceInfo () const |
Get a DeviceInfo object. | |
![]() | |
void | retain () |
Retains the ownership. | |
void | release () |
Releases the ownership immediately. | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. | |
virtual | ~Ref () |
Destructor. | |
Additional Inherited Members | |
![]() | |
static Device * | getInstance () |
Returns a shared instance of the device. | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
Use to create resoureces.
|
overridevirtual |
|
overridevirtual |
New a Buffer object, not auto released.
size | Specifies the size in bytes of the buffer object's new data store. |
type | Specifies the target buffer object. The symbolic constant must be BufferType::VERTEX or BufferType::INDEX. |
usage | Specifies the expected usage pattern of the data store. The symbolic constant must be BufferUsage::STATIC, BufferUsage::DYNAMIC. |
|
overridevirtual |
New a TextureBackend object, not auto released.
descriptor | Specifies texture description. |
Implements Device.
|
overridevirtual |
Create an auto released DepthStencilState object.
descriptor | Specifies depth and stencil description. |
Implements Device.
|
overridevirtual |
New a RenderPipeline object, not auto released.
descriptor | Specifies render pipeline description. |
Implements Device.
|
overridevirtual |