ngfx::MTLGraphicsContext
Inherits from ngfx::GraphicsContext
Public Classes
Name | |
---|---|
struct | MTLRenderPassData |
Public Functions
Name | |
---|---|
void | create(const char * appName, bool enableDepthStencil, bool debug) |
virtual | ~MTLGraphicsContext() |
virtual void | setSurface(Surface * surface) override |
virtual CommandBuffer * | drawCommandBuffer(int32_t index =-1) override |
virtual CommandBuffer * | copyCommandBuffer() override |
virtual CommandBuffer * | computeCommandBuffer() override |
virtual void | submit(CommandBuffer * commandBuffer) override |
virtual RenderPass * | getRenderPass(RenderPassConfig config) override |
Public Attributes
Name | |
---|---|
std::vector< std::unique_ptr< MTLRenderPassData > > | mtlRenderPassCache |
MTLCommandBuffer | mtlDrawCommandBuffer |
MTLCommandBuffer | mtlCopyCommandBuffer |
MTLCommandBuffer | mtlComputeCommandBuffer |
MTLDevice | mtlDevice |
id< MTLCommandQueue > | mtlCommandQueue |
MTLPipelineCache | mtlPipelineCache |
::MTLPixelFormat | mtlSurfaceFormat |
uint32_t | numSwapchainImages |
std::vector< MTLFramebuffer > | mtlSwapchainFramebuffers |
MTLRenderPass * | mtlDefaultRenderPass |
MTLRenderPass * | mtlDefaultOffscreenRenderPass |
bool | offscreen |
uint32_t | numSamples |
Additional inherited members
Public Classes inherited from ngfx::GraphicsContext
Name | |
---|---|
struct | AttachmentDescription |
struct | RenderPassConfig |
Public Functions inherited from ngfx::GraphicsContext
Name | |
---|---|
virtual | ~GraphicsContext() |
virtual void | beginRenderPass(CommandBuffer * commandBuffer, Graphics * graphics) |
virtual void | beginOffscreenRenderPass(CommandBuffer * commandBuffer, Graphics * graphics, Framebuffer * outputFramebuffer) |
virtual void | endRenderPass(CommandBuffer * commandBuffer, Graphics * graphics) |
virtual void | endOffscreenRenderPass(CommandBuffer * commandBuffer, Graphics * graphics) |
Public Attributes inherited from ngfx::GraphicsContext
Name | |
---|---|
Device * | device |
uint32_t | numDrawCommandBuffers |
std::vector< Framebuffer * > | swapchainFramebuffers |
Queue * | queue |
RenderPass * | defaultRenderPass |
RenderPass * | defaultOffscreenRenderPass |
Swapchain * | swapchain |
Surface * | surface |
uint32_t | currentImageIndex |
std::vector< Fence * > | frameFences |
Fence * | computeFence |
Semaphore * | presentCompleteSemaphore |
Semaphore * | renderCompleteSemaphore |
PipelineCache * | pipelineCache |
PixelFormat | surfaceFormat |
PixelFormat | defaultOffscreenSurfaceFormat |
PixelFormat | depthFormat |
glm::vec4 | clearColor |
Protected Attributes inherited from ngfx::GraphicsContext
Name | |
---|---|
bool | debug |
bool | enableDepthStencil |
Public Functions Documentation
function create
void create(
const char * appName,
bool enableDepthStencil,
bool debug
)
function ~MTLGraphicsContext
virtual ~MTLGraphicsContext()
function setSurface
virtual void setSurface(
Surface * surface
) override
Reimplements: ngfx::GraphicsContext::setSurface
function drawCommandBuffer
virtual CommandBuffer * drawCommandBuffer(
int32_t index =-1
) override
Reimplements: ngfx::GraphicsContext::drawCommandBuffer
function copyCommandBuffer
virtual CommandBuffer * copyCommandBuffer() override
Reimplements: ngfx::GraphicsContext::copyCommandBuffer
function computeCommandBuffer
virtual CommandBuffer * computeCommandBuffer() override
Reimplements: ngfx::GraphicsContext::computeCommandBuffer
function submit
virtual void submit(
CommandBuffer * commandBuffer
) override
Reimplements: ngfx::GraphicsContext::submit
function getRenderPass
virtual RenderPass * getRenderPass(
RenderPassConfig config
) override
Reimplements: ngfx::GraphicsContext::getRenderPass
Public Attributes Documentation
variable mtlRenderPassCache
std::vector< std::unique_ptr< MTLRenderPassData > > mtlRenderPassCache;
variable mtlDrawCommandBuffer
MTLCommandBuffer mtlDrawCommandBuffer;
variable mtlCopyCommandBuffer
MTLCommandBuffer mtlCopyCommandBuffer;
variable mtlComputeCommandBuffer
MTLCommandBuffer mtlComputeCommandBuffer;
variable mtlDevice
MTLDevice mtlDevice;
variable mtlCommandQueue
id< MTLCommandQueue > mtlCommandQueue;
variable mtlPipelineCache
MTLPipelineCache mtlPipelineCache;
variable mtlSurfaceFormat
::MTLPixelFormat mtlSurfaceFormat;
variable numSwapchainImages
uint32_t numSwapchainImages;
variable mtlSwapchainFramebuffers
std::vector< MTLFramebuffer > mtlSwapchainFramebuffers;
variable mtlDefaultRenderPass
MTLRenderPass * mtlDefaultRenderPass = nullptr;
variable mtlDefaultOffscreenRenderPass
MTLRenderPass * mtlDefaultOffscreenRenderPass = nullptr;
variable offscreen
bool offscreen = true;
variable numSamples
uint32_t numSamples = 1;
Updated on 3 April 2021 at 20:21:51 PDT