New or create resources from DriverBase.
More...
#include <DriverBase.h>
Inherited by DriverGL, and DriverMTL.
New or create resources from DriverBase.
◆ 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()
◆ 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 DriverGL, and DriverMTL.
◆ newProgram()
virtual Program * newProgram |
( |
std::string_view | vertexShader, |
|
|
std::string_view | 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 DriverGL, and DriverMTL.
◆ getVendor()
virtual const char * getVendor |
( |
| ) |
const |
|
pure virtual |
below is driver info
Get vendor device name.
- Returns
- Vendor device name.
Implemented in DriverGL, and DriverMTL.
◆ getRenderer()
virtual const char * getRenderer |
( |
| ) |
const |
|
pure virtual |
Get the full name of the vendor device.
- Returns
- The full name of the vendor device.
Implemented in DriverGL, and DriverMTL.
◆ getVersion()
virtual const char * getVersion |
( |
| ) |
const |
|
pure virtual |
◆ checkForFeatureSupported()
virtual bool checkForFeatureSupported |
( |
FeatureType | feature | ) |
|
|
pure virtual |
Check if feature supported by device.
- Parameters
-
feature | Specify feature to be query. |
- Returns
- true if the feature is supported, false otherwise.
Implemented in DriverGL, and DriverMTL.
◆ getMaxTextureSize()
int getMaxTextureSize |
( |
| ) |
const |
|
inline |
Get maximum texture size.
- Returns
- Maximum texture size.
◆ getMaxAttributes()
int getMaxAttributes |
( |
| ) |
const |
|
inline |
Get maximum attribute counts.
- Returns
- Maximum attribute counts.
◆ getMaxTextureUnits()
int getMaxTextureUnits |
( |
| ) |
const |
|
inline |
Get maximum texture unit.
- Returns
- Maximum texture unit.
◆ getMaxSamplesAllowed()
int getMaxSamplesAllowed |
( |
| ) |
const |
|
inline |
Get maximum sampler count.
- Returns
- Maximum sampler count.
The documentation for this class was generated from the following file: