New or create resources from GraphicsDevice.
More...
#include <GraphicsDevice.h>
Inherited by GraphicsDeviceImpl, , and GraphicsDeviceImpl.
|
| virtual GraphicsContext * | createGraphicsContext (SurfaceHandle surface)=0 |
| | Create a GraphicsContext (not auto‑released).
|
| virtual Buffer * | createBuffer (size_t size, BufferType type, BufferUsage usage, const void *inital=nullptr)=0 |
| | New a Buffer object, not auto released.
|
| virtual Texture * | createTexture (const TextureDesc &descriptor, std::optional< Color > clearColorHint=std::nullopt)=0 |
| | New a Texture object with a render-target clear color hint, not auto released.
|
|
virtual Texture * | createTextureFromNativeHandle (const ExternalTextureDesc &descriptor)=0 |
| | Wrap a backend-native texture owned by an external runtime, not auto released.
|
| virtual GraphicsPipeline * | createGraphicsPipeline ()=0 |
| | New a GraphicsPipeline object, not auto released.
|
| virtual ComputePipeline * | createComputePipeline (Program *program)=0 |
| | Create a compute pipeline from a compute program, not auto released.
|
| virtual Program * | createProgram (Data vsData, Data fsData)=0 |
| | Create an auto released Program.
|
| virtual std::string | getVendor () const =0 |
| | below is driver info
|
| virtual std::string | getRenderer () const =0 |
| | Get the full name of the vendor device.
|
| virtual std::string | getVersion () const =0 |
| | Get version name.
|
|
virtual bool | hasExtension (std::string_view) const |
| | Check does device has extension.
|
|
virtual std::string | dumpExtensions () const |
| | Dump all extensions to string.
|
| virtual bool | checkForFeatureSupported (FeatureType feature)=0 |
| | Check if feature supported by device.
|
| int | getMaxTextureSize () const |
| | Get maximum texture size.
|
| int | getMaxAttributes () const |
| | Get maximum attribute counts.
|
| int | getMaxTextureUnits () const |
| | Get maximum texture unit.
|
| int | getMaxSamplesAllowed () const |
| | Get maximum sampler count.
|
New or create resources from GraphicsDevice.
◆ createGraphicsContext()
◆ createBuffer()
| virtual Buffer * createBuffer |
( |
size_t | size, |
|
|
BufferType | type, |
|
|
BufferUsage | usage, |
|
|
const void * | inital = nullptr ) |
|
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.
Implemented in GraphicsDeviceImpl, GraphicsDeviceImpl, and GraphicsDeviceImpl.
◆ createTexture()
| virtual Texture * createTexture |
( |
const TextureDesc & | descriptor, |
|
|
std::optional< Color > | clearColorHint = std::nullopt ) |
|
pure virtual |
New a Texture object with a render-target clear color hint, not auto released.
- Parameters
-
| descriptor | Specifies texture description. |
| clearColorHint | Optional render-target clear color hint. D3D12 uses it as D3D12_CLEAR_VALUE metadata for optimized ClearRenderTargetView operations. Other backends ignore it. |
- Returns
- A Texture object.
Implemented in GraphicsDeviceImpl, GraphicsDeviceImpl, and GraphicsDeviceImpl.
◆ createGraphicsPipeline()
◆ createComputePipeline()
◆ createProgram()
| virtual Program * createProgram |
( |
Data | vsData, |
|
|
Data | fsData ) |
|
pure virtual |
◆ getVendor()
| virtual std::string getVendor |
( |
| ) |
const |
|
pure virtual |
◆ getRenderer()
| virtual std::string getRenderer |
( |
| ) |
const |
|
pure virtual |
◆ getVersion()
| virtual std::string getVersion |
( |
| ) |
const |
|
pure virtual |
◆ checkForFeatureSupported()
| virtual bool checkForFeatureSupported |
( |
FeatureType | feature | ) |
|
|
pure virtual |
◆ 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.
◆ GraphicsCore
| friend class GraphicsCore |
|
friend |
The documentation for this class was generated from the following file: