shader interface
parent
5850d0851f
commit
fddba3a94d
|
@ -24,6 +24,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifndef REFRESH_H
|
#ifndef REFRESH_H
|
||||||
#define REFRESH_H
|
#define REFRESH_H
|
||||||
|
|
||||||
|
@ -468,6 +470,12 @@ typedef struct REFRESH_RenderPassCreateInfo
|
||||||
const REFRESH_DepthTargetDescription *depthTargetDescription; /* can be NULL */
|
const REFRESH_DepthTargetDescription *depthTargetDescription; /* can be NULL */
|
||||||
} REFRESH_RenderPassCreateInfo;
|
} REFRESH_RenderPassCreateInfo;
|
||||||
|
|
||||||
|
typedef struct REFRESH_ShaderModuleCreateInfo
|
||||||
|
{
|
||||||
|
size_t codeSize;
|
||||||
|
const uint32_t *byteCode;
|
||||||
|
} REFRESH_ShaderModuleCreateInfo;
|
||||||
|
|
||||||
/* Pipeline state structures */
|
/* Pipeline state structures */
|
||||||
|
|
||||||
typedef struct REFRESH_ShaderStageState
|
typedef struct REFRESH_ShaderStageState
|
||||||
|
@ -682,6 +690,12 @@ REFRESHAPI REFRESH_Framebuffer* REFRESH_CreateFramebuffer(
|
||||||
REFRESH_FramebufferCreateInfo *framebufferCreateInfo
|
REFRESH_FramebufferCreateInfo *framebufferCreateInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Returns an allocated ShaderModule* object. */
|
||||||
|
REFRESHAPI REFRESH_ShaderModule* REFRESH_CreateShaderModule(
|
||||||
|
REFRESH_Device *device,
|
||||||
|
REFRESH_ShaderModuleCreateInfo *shaderModuleCreateInfo
|
||||||
|
);
|
||||||
|
|
||||||
/* Creates a 2D texture.
|
/* Creates a 2D texture.
|
||||||
*
|
*
|
||||||
* format: The pixel format of the texture data.
|
* format: The pixel format of the texture data.
|
||||||
|
@ -1090,6 +1104,18 @@ REFRESHAPI void REFRESH_AddDisposeIndexBuffer(
|
||||||
REFRESH_Buffer *buffer
|
REFRESH_Buffer *buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Sends an shader module to be destroyed by the renderer. Note that we call it
|
||||||
|
* "AddDispose" because it may not be immediately destroyed by the renderer if
|
||||||
|
* this is not called from the main thread (for example, if a garbage collector
|
||||||
|
* deletes the resource instead of the programmer).
|
||||||
|
*
|
||||||
|
* shaderModule: The REFRESH_ShaderModule to be destroyed.
|
||||||
|
*/
|
||||||
|
REFRESHAPI void REFRESH_AddDisposeShaderModule(
|
||||||
|
REFRESH_Device *device,
|
||||||
|
REFRESH_ShaderModule *shaderModule
|
||||||
|
);
|
||||||
|
|
||||||
/* Graphics State */
|
/* Graphics State */
|
||||||
|
|
||||||
/* Begins a render pass.
|
/* Begins a render pass.
|
||||||
|
|
Loading…
Reference in New Issue