additional improvements

main
Dominik Madarász 2024-04-11 01:23:21 +02:00
parent 7b67f29611
commit 50cc35db90
7 changed files with 13 additions and 35 deletions

View File

@ -1033,10 +1033,6 @@ typedef struct reflect_t {
int ui_reflect(const char *mask);
typedef unsigned handle;
typedef struct renderstate_t {
int viewport_x;
int viewport_y;
int viewport_width;
int viewport_height;
float clear_color[4];
double clear_depth;
bool depth_test_enabled;
@ -1052,7 +1048,7 @@ typedef struct renderstate_t {
int stencil_ref;
unsigned stencil_mask;
unsigned front_face;
bool smooth_line_enabled;
bool line_smooth_enabled;
float line_width;
bool point_size_enabled;
float point_size;

View File

@ -17033,12 +17033,6 @@ typedef unsigned handle; // GLuint
// -----------------------------------------------------------------------------
// renderstate
typedef struct renderstate_t {
// Viewport parameters
int viewport_x;
int viewport_y;
int viewport_width;
int viewport_height;
// Clear color
float clear_color[4];
@ -17069,7 +17063,7 @@ typedef struct renderstate_t {
unsigned front_face; // GL_CW or GL_CCW
// Line width
bool smooth_line_enabled;
bool line_smooth_enabled;
float line_width;
// Point size
@ -370160,7 +370154,7 @@ renderstate_t renderstate() {
state.front_face = GL_CCW;
// Set default line width
state.smooth_line_enabled = GL_FALSE;
state.line_smooth_enabled = GL_FALSE;
state.line_width = 1.0f;
// Set default point size
@ -370229,7 +370223,7 @@ void renderstate_apply(const renderstate_t *state) {
glLineWidth(state->line_width);
// Apply smooth lines
if (state->smooth_line_enabled) {
if (state->line_smooth_enabled) {
glEnable(GL_LINE_SMOOTH);
} else {
glDisable(GL_LINE_SMOOTH);
@ -374389,7 +374383,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
glEnableVertexAttribArray(0);
dd_rs.point_size_enabled = 1;
dd_rs.smooth_line_enabled = 1;
dd_rs.line_smooth_enabled = 1;
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;

View File

@ -89,7 +89,7 @@ renderstate_t renderstate() {
state.front_face = GL_CCW;
// Set default line width
state.smooth_line_enabled = GL_FALSE;
state.line_smooth_enabled = GL_FALSE;
state.line_width = 1.0f;
// Set default point size
@ -158,7 +158,7 @@ void renderstate_apply(const renderstate_t *state) {
glLineWidth(state->line_width);
// Apply smooth lines
if (state->smooth_line_enabled) {
if (state->line_smooth_enabled) {
glEnable(GL_LINE_SMOOTH);
} else {
glDisable(GL_LINE_SMOOTH);

View File

@ -11,12 +11,6 @@ typedef unsigned handle; // GLuint
// -----------------------------------------------------------------------------
// renderstate
typedef struct renderstate_t {
// Viewport parameters
int viewport_x;
int viewport_y;
int viewport_width;
int viewport_height;
// Clear color
float clear_color[4];
@ -47,7 +41,7 @@ typedef struct renderstate_t {
unsigned front_face; // GL_CW or GL_CCW
// Line width
bool smooth_line_enabled;
bool line_smooth_enabled;
float line_width;
// Point size

View File

@ -85,7 +85,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
glEnableVertexAttribArray(0);
dd_rs.point_size_enabled = 1;
dd_rs.smooth_line_enabled = 1;
dd_rs.line_smooth_enabled = 1;
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;

View File

@ -17253,7 +17253,7 @@ renderstate_t renderstate() {
state.front_face = GL_CCW;
// Set default line width
state.smooth_line_enabled = GL_FALSE;
state.line_smooth_enabled = GL_FALSE;
state.line_width = 1.0f;
// Set default point size
@ -17322,7 +17322,7 @@ void renderstate_apply(const renderstate_t *state) {
glLineWidth(state->line_width);
// Apply smooth lines
if (state->smooth_line_enabled) {
if (state->line_smooth_enabled) {
glEnable(GL_LINE_SMOOTH);
} else {
glDisable(GL_LINE_SMOOTH);
@ -21482,7 +21482,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
glEnableVertexAttribArray(0);
dd_rs.point_size_enabled = 1;
dd_rs.smooth_line_enabled = 1;
dd_rs.line_smooth_enabled = 1;
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;

View File

@ -3100,12 +3100,6 @@ typedef unsigned handle; // GLuint
// -----------------------------------------------------------------------------
// renderstate
typedef struct renderstate_t {
// Viewport parameters
int viewport_x;
int viewport_y;
int viewport_width;
int viewport_height;
// Clear color
float clear_color[4];
@ -3136,7 +3130,7 @@ typedef struct renderstate_t {
unsigned front_face; // GL_CW or GL_CCW
// Line width
bool smooth_line_enabled;
bool line_smooth_enabled;
float line_width;
// Point size