gfx: rename polygon mode state
parent
41505bc56f
commit
881a36b759
|
@ -1054,7 +1054,7 @@ typedef struct renderstate_t {
|
||||||
bool point_size_enabled;
|
bool point_size_enabled;
|
||||||
float point_size;
|
float point_size;
|
||||||
unsigned polygon_mode_face;
|
unsigned polygon_mode_face;
|
||||||
unsigned polygon_mode_mode;
|
unsigned polygon_mode_draw;
|
||||||
bool scissor_test_enabled;
|
bool scissor_test_enabled;
|
||||||
} renderstate_t;
|
} renderstate_t;
|
||||||
renderstate_t renderstate();
|
renderstate_t renderstate();
|
||||||
|
|
|
@ -17073,7 +17073,7 @@ typedef struct renderstate_t {
|
||||||
|
|
||||||
// Polygon mode
|
// Polygon mode
|
||||||
unsigned polygon_mode_face;
|
unsigned polygon_mode_face;
|
||||||
unsigned polygon_mode_mode;
|
unsigned polygon_mode_draw;
|
||||||
|
|
||||||
// Scissor test
|
// Scissor test
|
||||||
bool scissor_test_enabled;
|
bool scissor_test_enabled;
|
||||||
|
@ -382733,7 +382733,7 @@ renderstate_t renderstate() {
|
||||||
|
|
||||||
// Set default polygon mode to fill
|
// Set default polygon mode to fill
|
||||||
state.polygon_mode_face = GL_FRONT_AND_BACK;
|
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
|
// Disable scissor test by default
|
||||||
state.scissor_test_enabled = GL_FALSE;
|
state.scissor_test_enabled = GL_FALSE;
|
||||||
|
@ -382821,7 +382821,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply polygon mode
|
// Apply polygon mode
|
||||||
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
|
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
|
||||||
|
|
||||||
// Apply scissor test
|
// Apply scissor test
|
||||||
if (state->scissor_test_enabled) {
|
if (state->scissor_test_enabled) {
|
||||||
|
@ -388656,7 +388656,7 @@ void scene_render(int flags) {
|
||||||
|
|
||||||
model->billboard = obj->billboard;
|
model->billboard = obj->billboard;
|
||||||
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
|
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);
|
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
|
||||||
|
|
||||||
if( do_retexturing ) {
|
if( do_retexturing ) {
|
||||||
|
|
|
@ -99,7 +99,7 @@ renderstate_t renderstate() {
|
||||||
|
|
||||||
// Set default polygon mode to fill
|
// Set default polygon mode to fill
|
||||||
state.polygon_mode_face = GL_FRONT_AND_BACK;
|
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
|
// Disable scissor test by default
|
||||||
state.scissor_test_enabled = GL_FALSE;
|
state.scissor_test_enabled = GL_FALSE;
|
||||||
|
@ -187,7 +187,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply polygon mode
|
// Apply polygon mode
|
||||||
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
|
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
|
||||||
|
|
||||||
// Apply scissor test
|
// Apply scissor test
|
||||||
if (state->scissor_test_enabled) {
|
if (state->scissor_test_enabled) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ typedef struct renderstate_t {
|
||||||
|
|
||||||
// Polygon mode
|
// Polygon mode
|
||||||
unsigned polygon_mode_face;
|
unsigned polygon_mode_face;
|
||||||
unsigned polygon_mode_mode;
|
unsigned polygon_mode_draw;
|
||||||
|
|
||||||
// Scissor test
|
// Scissor test
|
||||||
bool scissor_test_enabled;
|
bool scissor_test_enabled;
|
||||||
|
|
|
@ -559,7 +559,7 @@ void scene_render(int flags) {
|
||||||
|
|
||||||
model->billboard = obj->billboard;
|
model->billboard = obj->billboard;
|
||||||
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
|
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);
|
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
|
||||||
|
|
||||||
if( do_retexturing ) {
|
if( do_retexturing ) {
|
||||||
|
|
|
@ -17273,7 +17273,7 @@ renderstate_t renderstate() {
|
||||||
|
|
||||||
// Set default polygon mode to fill
|
// Set default polygon mode to fill
|
||||||
state.polygon_mode_face = GL_FRONT_AND_BACK;
|
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
|
// Disable scissor test by default
|
||||||
state.scissor_test_enabled = GL_FALSE;
|
state.scissor_test_enabled = GL_FALSE;
|
||||||
|
@ -17361,7 +17361,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply polygon mode
|
// Apply polygon mode
|
||||||
glPolygonMode(state->polygon_mode_face, state->polygon_mode_mode);
|
glPolygonMode(state->polygon_mode_face, state->polygon_mode_draw);
|
||||||
|
|
||||||
// Apply scissor test
|
// Apply scissor test
|
||||||
if (state->scissor_test_enabled) {
|
if (state->scissor_test_enabled) {
|
||||||
|
@ -23196,7 +23196,7 @@ void scene_render(int flags) {
|
||||||
|
|
||||||
model->billboard = obj->billboard;
|
model->billboard = obj->billboard;
|
||||||
model->rs[RENDER_PASS_NORMAL].cull_face_enabled = flags&SCENE_CULLFACE ? 1 : 0;
|
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);
|
model_render(*model, cam->proj, cam->view, obj->transform, model->program);
|
||||||
|
|
||||||
if( do_retexturing ) {
|
if( do_retexturing ) {
|
||||||
|
|
|
@ -3140,7 +3140,7 @@ typedef struct renderstate_t {
|
||||||
|
|
||||||
// Polygon mode
|
// Polygon mode
|
||||||
unsigned polygon_mode_face;
|
unsigned polygon_mode_face;
|
||||||
unsigned polygon_mode_mode;
|
unsigned polygon_mode_draw;
|
||||||
|
|
||||||
// Scissor test
|
// Scissor test
|
||||||
bool scissor_test_enabled;
|
bool scissor_test_enabled;
|
||||||
|
|
Loading…
Reference in New Issue