41 VkCullModeFlags mode = VK_CULL_MODE_NONE;
42 VkFrontFace frontface = VK_FRONT_FACE_CLOCKWISE;
52 GVK_DRAW2D_TRIANGLESTRIP,
53 GVK_DRAW2D_TRIANGLEFAN,
64void gvkDrawColored2D(gVKContext& ctx,
const glm::vec2* points,
int count,
65 const glm::vec4& color,
const glm::mat4& mvp,
int mode = GVK_DRAW2D_TRIANGLES,
66 bool additive =
false);
74void gvkDrawTextured2D(gVKContext& ctx, VkDescriptorSet textureSet, VkDescriptorSet maskSet,
75 const glm::vec4& tint,
const glm::mat4& mvp,
76 const glm::vec2& uvOffset = glm::vec2(0.0f),
const glm::vec2& uvScale = glm::vec2(1.0f),
77 bool additive =
false);
85bool gvkDrawScreenRestore(gVKContext& ctx, VkDescriptorSet textureSet);
89void gvkDrawTexturedTriangles2D(gVKContext& ctx, VkDescriptorSet textureSet,
90 const glm::vec4& tint,
const glm::mat4& mvp,
const float* xyuv,
int vertexCount,
91 bool additive =
false);
103void gvkFlush2DBatch(gVKContext& ctx);
115bool gvkDrawFullscreenQuad(gVKContext& ctx);
119bool gvkDrawDeferredLighting(gVKContext& ctx, VkDescriptorSet gbufferSet,
120 VkDescriptorSet shadowSet);
124void gvkReset2DBatch();
160void gvkDrawMesh3D(gVKContext& ctx, VkBuffer vertexBuffer, VkDeviceSize vertexOffset,
161 VkBuffer indexBuffer,
int count,
162 VkIndexType indexType,
const gVKMeshPush& push,
163 VkDescriptorSet materialSet, VkDescriptorSet shadowSet,
164 VkBuffer instanceBuffer, VkDeviceSize instanceOffset,
int instanceCount,
165 VkPrimitiveTopology topology,
bool depthTest,
bool depthTestAlways,
bool lines,
166 const gVKCullState& culling,
bool blending,
bool cutout);
173void gvkDrawShadowCaster(gVKContext& ctx, VkBuffer vertexBuffer, VkDeviceSize vertexOffset,
174 VkBuffer indexBuffer,
175 int count, VkIndexType indexType,
const gVKShadowPush& push,
176 VkDescriptorSet diffuseSet,
177 VkBuffer instanceBuffer, VkDeviceSize instanceOffset,
int instanceCount, VkPrimitiveTopology topology);
185void gvkDrawMesh3DPbr(gVKContext& ctx, VkBuffer vertexBuffer, VkDeviceSize vertexOffset,
186 VkBuffer indexBuffer,
int count,
187 VkIndexType indexType,
const gVKPbrPush& push, VkDescriptorSet materialSet,
188 VkDescriptorSet shadowSet,
189 VkBuffer instanceBuffer, VkDeviceSize instanceOffset,
int instanceCount,
190 VkPrimitiveTopology topology,
bool depthTest,
bool depthTestAlways,
191 const gVKCullState& culling,
bool blending);
200void gvkDrawSkyboxFace(gVKContext& ctx, VkDescriptorSet faceSet,
const float* xyzuv,
201 int vertexCount,
const glm::mat4& viewProjection, VkCompareOp depthCompare);