new: MODEL_CULLFACE

main
Dominik Madarász 2024-04-17 22:35:46 +02:00
parent 3f1ab0dacc
commit 23c860ab99
6 changed files with 16 additions and 3 deletions

View File

@ -1356,6 +1356,7 @@ enum MODEL_FLAGS {
MODEL_MATCAPS = 16,
MODEL_RIMLIGHT = 32,
MODEL_PBR = 64,
MODEL_CULLFACE = 128,
};
enum SHADING_MODE {
SHADING_NONE,

View File

@ -17608,6 +17608,7 @@ enum MODEL_FLAGS {
MODEL_MATCAPS = 16,
MODEL_RIMLIGHT = 32,
MODEL_PBR = 64,
MODEL_CULLFACE = 128,
};
enum SHADING_MODE {
@ -386758,7 +386759,10 @@ void model_draw_call(model_t m, int shader) {
handle old_shader = last_shader;
shader_bind(shader);
renderstate_apply(&m.rs[model_getpass()]);
renderstate_t *rs = &m.rs[RENDER_PASS_NORMAL];
rs->cull_face_enabled = m.flags&MODEL_CULLFACE;
renderstate_apply(rs);
glBindVertexArray( q->vao );

View File

@ -4125,7 +4125,10 @@ void model_draw_call(model_t m, int shader) {
handle old_shader = last_shader;
shader_bind(shader);
renderstate_apply(&m.rs[model_getpass()]);
renderstate_t *rs = &m.rs[RENDER_PASS_NORMAL];
rs->cull_face_enabled = m.flags&MODEL_CULLFACE;
renderstate_apply(rs);
glBindVertexArray( q->vao );

View File

@ -586,6 +586,7 @@ enum MODEL_FLAGS {
MODEL_MATCAPS = 16,
MODEL_RIMLIGHT = 32,
MODEL_PBR = 64,
MODEL_CULLFACE = 128,
};
enum SHADING_MODE {

View File

@ -21298,7 +21298,10 @@ void model_draw_call(model_t m, int shader) {
handle old_shader = last_shader;
shader_bind(shader);
renderstate_apply(&m.rs[model_getpass()]);
renderstate_t *rs = &m.rs[RENDER_PASS_NORMAL];
rs->cull_face_enabled = m.flags&MODEL_CULLFACE;
renderstate_apply(rs);
glBindVertexArray( q->vao );

View File

@ -3675,6 +3675,7 @@ enum MODEL_FLAGS {
MODEL_MATCAPS = 16,
MODEL_RIMLIGHT = 32,
MODEL_PBR = 64,
MODEL_CULLFACE = 128,
};
enum SHADING_MODE {