New or create resources from Device.
More...
Inherits Ref.
Inherited by DeviceGL, and DeviceMTL.
|
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.
|
|
New or create resources from Device.
◆ newCommandBuffer()
◆ newBuffer()
virtual Buffer* newBuffer |
( |
size_t |
size, |
|
|
BufferType |
type, |
|
|
BufferUsage |
usage |
|
) |
| |
|
pure virtual |
New a Buffer object, not auto released.
- Parameters
-
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. |
- Returns
- A Buffer object.
◆ newTexture()
◆ createDepthStencilState()
◆ newRenderPipeline()
◆ setFrameBufferOnly()
virtual void setFrameBufferOnly |
( |
bool |
frameBufferOnly | ) |
|
|
pure virtual |
This property controls whether or not the drawables' metal textures may only be used for framebuffer attachments (YES) or whether they may also be used for texture sampling and pixel read/write operations (NO).
- Parameters
-
frameBufferOnly | A value of YES allows CAMetalLayer to allocate the MTLTexture objects in ways that are optimized for display purposes that makes them unsuitable for sampling. The recommended value for most applications is YES. |
- Note
- This interface is specificaly designed for metal.
Implemented in DeviceMTL, and DeviceGL.
◆ newProgram()
virtual Program* newProgram |
( |
const std::string & |
vertexShader, |
|
|
const std::string & |
fragmentShader |
|
) |
| |
|
pure virtual |
Create an auto released Program.
- Parameters
-
vertexShader | Specifes this is a vertex shader source. |
fragmentShader | Specifes this is a fragment shader source. |
- Returns
- A Program instance.
Implemented in DeviceMTL, and DeviceGL.
◆ getDeviceInfo()
The documentation for this class was generated from the following file: