additional improvements
parent
7b67f29611
commit
50cc35db90
|
@ -1033,10 +1033,6 @@ typedef struct reflect_t {
|
||||||
int ui_reflect(const char *mask);
|
int ui_reflect(const char *mask);
|
||||||
typedef unsigned handle;
|
typedef unsigned handle;
|
||||||
typedef struct renderstate_t {
|
typedef struct renderstate_t {
|
||||||
int viewport_x;
|
|
||||||
int viewport_y;
|
|
||||||
int viewport_width;
|
|
||||||
int viewport_height;
|
|
||||||
float clear_color[4];
|
float clear_color[4];
|
||||||
double clear_depth;
|
double clear_depth;
|
||||||
bool depth_test_enabled;
|
bool depth_test_enabled;
|
||||||
|
@ -1052,7 +1048,7 @@ typedef struct renderstate_t {
|
||||||
int stencil_ref;
|
int stencil_ref;
|
||||||
unsigned stencil_mask;
|
unsigned stencil_mask;
|
||||||
unsigned front_face;
|
unsigned front_face;
|
||||||
bool smooth_line_enabled;
|
bool line_smooth_enabled;
|
||||||
float line_width;
|
float line_width;
|
||||||
bool point_size_enabled;
|
bool point_size_enabled;
|
||||||
float point_size;
|
float point_size;
|
||||||
|
|
|
@ -17033,12 +17033,6 @@ typedef unsigned handle; // GLuint
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// renderstate
|
// renderstate
|
||||||
typedef struct renderstate_t {
|
typedef struct renderstate_t {
|
||||||
// Viewport parameters
|
|
||||||
int viewport_x;
|
|
||||||
int viewport_y;
|
|
||||||
int viewport_width;
|
|
||||||
int viewport_height;
|
|
||||||
|
|
||||||
// Clear color
|
// Clear color
|
||||||
float clear_color[4];
|
float clear_color[4];
|
||||||
|
|
||||||
|
@ -17069,7 +17063,7 @@ typedef struct renderstate_t {
|
||||||
unsigned front_face; // GL_CW or GL_CCW
|
unsigned front_face; // GL_CW or GL_CCW
|
||||||
|
|
||||||
// Line width
|
// Line width
|
||||||
bool smooth_line_enabled;
|
bool line_smooth_enabled;
|
||||||
float line_width;
|
float line_width;
|
||||||
|
|
||||||
// Point size
|
// Point size
|
||||||
|
@ -370160,7 +370154,7 @@ renderstate_t renderstate() {
|
||||||
state.front_face = GL_CCW;
|
state.front_face = GL_CCW;
|
||||||
|
|
||||||
// Set default line width
|
// Set default line width
|
||||||
state.smooth_line_enabled = GL_FALSE;
|
state.line_smooth_enabled = GL_FALSE;
|
||||||
state.line_width = 1.0f;
|
state.line_width = 1.0f;
|
||||||
|
|
||||||
// Set default point size
|
// Set default point size
|
||||||
|
@ -370229,7 +370223,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
glLineWidth(state->line_width);
|
glLineWidth(state->line_width);
|
||||||
|
|
||||||
// Apply smooth lines
|
// Apply smooth lines
|
||||||
if (state->smooth_line_enabled) {
|
if (state->line_smooth_enabled) {
|
||||||
glEnable(GL_LINE_SMOOTH);
|
glEnable(GL_LINE_SMOOTH);
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_LINE_SMOOTH);
|
glDisable(GL_LINE_SMOOTH);
|
||||||
|
@ -374389,7 +374383,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
|
||||||
glEnableVertexAttribArray(0);
|
glEnableVertexAttribArray(0);
|
||||||
|
|
||||||
dd_rs.point_size_enabled = 1;
|
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
|
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
|
||||||
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
||||||
|
|
|
@ -89,7 +89,7 @@ renderstate_t renderstate() {
|
||||||
state.front_face = GL_CCW;
|
state.front_face = GL_CCW;
|
||||||
|
|
||||||
// Set default line width
|
// Set default line width
|
||||||
state.smooth_line_enabled = GL_FALSE;
|
state.line_smooth_enabled = GL_FALSE;
|
||||||
state.line_width = 1.0f;
|
state.line_width = 1.0f;
|
||||||
|
|
||||||
// Set default point size
|
// Set default point size
|
||||||
|
@ -158,7 +158,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
glLineWidth(state->line_width);
|
glLineWidth(state->line_width);
|
||||||
|
|
||||||
// Apply smooth lines
|
// Apply smooth lines
|
||||||
if (state->smooth_line_enabled) {
|
if (state->line_smooth_enabled) {
|
||||||
glEnable(GL_LINE_SMOOTH);
|
glEnable(GL_LINE_SMOOTH);
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_LINE_SMOOTH);
|
glDisable(GL_LINE_SMOOTH);
|
||||||
|
|
|
@ -11,12 +11,6 @@ typedef unsigned handle; // GLuint
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// renderstate
|
// renderstate
|
||||||
typedef struct renderstate_t {
|
typedef struct renderstate_t {
|
||||||
// Viewport parameters
|
|
||||||
int viewport_x;
|
|
||||||
int viewport_y;
|
|
||||||
int viewport_width;
|
|
||||||
int viewport_height;
|
|
||||||
|
|
||||||
// Clear color
|
// Clear color
|
||||||
float clear_color[4];
|
float clear_color[4];
|
||||||
|
|
||||||
|
@ -47,7 +41,7 @@ typedef struct renderstate_t {
|
||||||
unsigned front_face; // GL_CW or GL_CCW
|
unsigned front_face; // GL_CW or GL_CCW
|
||||||
|
|
||||||
// Line width
|
// Line width
|
||||||
bool smooth_line_enabled;
|
bool line_smooth_enabled;
|
||||||
float line_width;
|
float line_width;
|
||||||
|
|
||||||
// Point size
|
// Point size
|
||||||
|
|
|
@ -85,7 +85,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
|
||||||
glEnableVertexAttribArray(0);
|
glEnableVertexAttribArray(0);
|
||||||
|
|
||||||
dd_rs.point_size_enabled = 1;
|
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
|
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
|
||||||
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
||||||
|
|
|
@ -17253,7 +17253,7 @@ renderstate_t renderstate() {
|
||||||
state.front_face = GL_CCW;
|
state.front_face = GL_CCW;
|
||||||
|
|
||||||
// Set default line width
|
// Set default line width
|
||||||
state.smooth_line_enabled = GL_FALSE;
|
state.line_smooth_enabled = GL_FALSE;
|
||||||
state.line_width = 1.0f;
|
state.line_width = 1.0f;
|
||||||
|
|
||||||
// Set default point size
|
// Set default point size
|
||||||
|
@ -17322,7 +17322,7 @@ void renderstate_apply(const renderstate_t *state) {
|
||||||
glLineWidth(state->line_width);
|
glLineWidth(state->line_width);
|
||||||
|
|
||||||
// Apply smooth lines
|
// Apply smooth lines
|
||||||
if (state->smooth_line_enabled) {
|
if (state->line_smooth_enabled) {
|
||||||
glEnable(GL_LINE_SMOOTH);
|
glEnable(GL_LINE_SMOOTH);
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_LINE_SMOOTH);
|
glDisable(GL_LINE_SMOOTH);
|
||||||
|
@ -21482,7 +21482,7 @@ void ddraw_flush_projview(mat44 proj, mat44 view) {
|
||||||
glEnableVertexAttribArray(0);
|
glEnableVertexAttribArray(0);
|
||||||
|
|
||||||
dd_rs.point_size_enabled = 1;
|
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
|
for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points
|
||||||
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
GLenum mode = i < 2 ? GL_LINES : GL_POINTS;
|
||||||
|
|
|
@ -3100,12 +3100,6 @@ typedef unsigned handle; // GLuint
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// renderstate
|
// renderstate
|
||||||
typedef struct renderstate_t {
|
typedef struct renderstate_t {
|
||||||
// Viewport parameters
|
|
||||||
int viewport_x;
|
|
||||||
int viewport_y;
|
|
||||||
int viewport_width;
|
|
||||||
int viewport_height;
|
|
||||||
|
|
||||||
// Clear color
|
// Clear color
|
||||||
float clear_color[4];
|
float clear_color[4];
|
||||||
|
|
||||||
|
@ -3136,7 +3130,7 @@ typedef struct renderstate_t {
|
||||||
unsigned front_face; // GL_CW or GL_CCW
|
unsigned front_face; // GL_CW or GL_CCW
|
||||||
|
|
||||||
// Line width
|
// Line width
|
||||||
bool smooth_line_enabled;
|
bool line_smooth_enabled;
|
||||||
float line_width;
|
float line_width;
|
||||||
|
|
||||||
// Point size
|
// Point size
|
||||||
|
|
Loading…
Reference in New Issue