summaryrefslogtreecommitdiff
path: root/src/render/immdraw.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-12 00:15:33 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-12 00:15:33 +1000
commit72b8d26fcfcee36ca67f963b9c6a4b616e2d5d4d (patch)
tree76ab2c18db5a834c6282ab4e2afa2db33f70be27 /src/render/immdraw.c
parenta8f98ddcf5ddeb3588492f4ad8f9a289147ad7ec (diff)
scale is a vec3 now instead of float.
Diffstat (limited to 'src/render/immdraw.c')
-rw-r--r--src/render/immdraw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/immdraw.c b/src/render/immdraw.c
index cb823d3..142087a 100644
--- a/src/render/immdraw.c
+++ b/src/render/immdraw.c
@@ -86,6 +86,16 @@ void Immdraw_Primitive(Transform tf, f32 size, Vec4 colour, bool wireframe, Mesh
// bind pipeline
GPU_EncodeBindPipeline(enc, imm->colour_pipeline);
+ // TODO: implement wireframe in other apis
+#if defined(CEL_REND_BACKEND_OPENGL)
+#include <glad/glad.h>
+ if (wireframe) {
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ } else {
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ }
+#endif
+
// update uniforms
ImmediateUniforms uniforms = {
.model = transform_to_mat(&tf),