gfx: rename polygon mode state

main
Dominik Madarász 2024-04-15 14:14:50 +02:00
parent 41505bc56f
commit 881a36b759
7 changed files with 13 additions and 13 deletions

View File

@ -1054,7 +1054,7 @@ typedef struct renderstate_t {
bool point_size_enabled;
float point_size;
unsigned polygon_mode_face;
unsigned polygon_mode_mode;
unsigned polygon_mode_draw;
bool scissor_test_enabled;
} renderstate_t;
renderstate_t renderstate();

View File

@ -17073,7 +17073,7 @@ typedef struct renderstate_t {
// Polygon mode
unsigned polygon_mode_face;
unsigned polygon_mode_mode;
unsigned polygon_mode_draw;
// Scissor test
bool scissor_test_enabled;
@ -382733,7 +382733,7 @@ renderstate_t renderstate() {
// Set default polygon mode to fill
state.polygon_mode_face = GL_FRONT_AND_BACK;
state.polygon_mode_mode = GL_FILL;
state.polygon_mode_draw = GL_FILL;
// Disable scissor test by default
state.scissor_test_enabled = GL_FALSE;
@ -382821,7 +382821,7 @@ void renderstate_apply(const renderstate_t *state) {
}
// Apply polygon mode
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
// Apply scissor test
if (state->scissor_test_enabled) {
@ -388656,7 +388656,7 @@ void scene_render(int flags) {
model->billboard = obj->billboard;
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
model->rs[RENDER_PASS_NORMAL].polygon_mode_mode = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model->rs[RENDER_PASS_NORMAL].polygon_mode_draw = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
if( do_retexturing ) {

View File

@ -99,7 +99,7 @@ renderstate_t renderstate() {
// Set default polygon mode to fill
state.polygon_mode_face = GL_FRONT_AND_BACK;
state.polygon_mode_mode = GL_FILL;
state.polygon_mode_draw = GL_FILL;
// Disable scissor test by default
state.scissor_test_enabled = GL_FALSE;
@ -187,7 +187,7 @@ void renderstate_apply(const renderstate_t *state) {
}
// Apply polygon mode
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
// Apply scissor test
if (state->scissor_test_enabled) {

View File

@ -51,7 +51,7 @@ typedef struct renderstate_t {
// Polygon mode
unsigned polygon_mode_face;
unsigned polygon_mode_mode;
unsigned polygon_mode_draw;
// Scissor test
bool scissor_test_enabled;

View File

@ -559,7 +559,7 @@ void scene_render(int flags) {
model->billboard = obj->billboard;
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
model->rs[RENDER_PASS_NORMAL].polygon_mode_mode = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model->rs[RENDER_PASS_NORMAL].polygon_mode_draw = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
if( do_retexturing ) {

View File

@ -17273,7 +17273,7 @@ renderstate_t renderstate() {
// Set default polygon mode to fill
state.polygon_mode_face = GL_FRONT_AND_BACK;
state.polygon_mode_mode = GL_FILL;
state.polygon_mode_draw = GL_FILL;
// Disable scissor test by default
state.scissor_test_enabled = GL_FALSE;
@ -17361,7 +17361,7 @@ void renderstate_apply(const renderstate_t *state) {
}
// Apply polygon mode
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
// Apply scissor test
if (state->scissor_test_enabled) {
@ -23196,7 +23196,7 @@ void scene_render(int flags) {
model->billboard = obj->billboard;
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
model->rs[RENDER_PASS_NORMAL].polygon_mode_mode = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model->rs[RENDER_PASS_NORMAL].polygon_mode_draw = flags&SCENE_WIREFRAME ? GL_LINE : GL_FILL;
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
if( do_retexturing ) {

View File

@ -3140,7 +3140,7 @@ typedef struct renderstate_t {
// Polygon mode
unsigned polygon_mode_face;
unsigned polygon_mode_mode;
unsigned polygon_mode_draw;
// Scissor test
bool scissor_test_enabled;