From 50cc35db90ad68723bfdc277822d2180db9d5dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Thu, 11 Apr 2024 01:23:21 +0200 Subject: [PATCH] additional improvements --- bind/v4k.lua | 6 +----- engine/joint/v4k.h | 14 ++++---------- engine/split/v4k_render.c | 4 ++-- engine/split/v4k_render.h | 8 +------- engine/split/v4k_renderdd.c | 2 +- engine/v4k.c | 6 +++--- engine/v4k.h | 8 +------- 7 files changed, 13 insertions(+), 35 deletions(-) diff --git a/bind/v4k.lua b/bind/v4k.lua index 71e28d1..c69d4dd 100644 --- a/bind/v4k.lua +++ b/bind/v4k.lua @@ -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; diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 9d3f813..6132339 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -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; diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index 1318a28..1d84773 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -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); diff --git a/engine/split/v4k_render.h b/engine/split/v4k_render.h index ab1d645..c0f6ced 100644 --- a/engine/split/v4k_render.h +++ b/engine/split/v4k_render.h @@ -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 diff --git a/engine/split/v4k_renderdd.c b/engine/split/v4k_renderdd.c index 1816c9a..1bb81c6 100644 --- a/engine/split/v4k_renderdd.c +++ b/engine/split/v4k_renderdd.c @@ -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; diff --git a/engine/v4k.c b/engine/v4k.c index 0e6ebbb..12a6394 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -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; diff --git a/engine/v4k.h b/engine/v4k.h index e704aa2..02f64db 100644 --- a/engine/v4k.h +++ b/engine/v4k.h @@ -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