summaryrefslogtreecommitdiff
path: root/src/render/immdraw.c
diff options
context:
space:
mode:
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),