From 2ebaa545c0d6c5f12bb21c2fe5a58e84fe5f6c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 15 Apr 2024 14:38:28 +0200 Subject: [PATCH] gfx: ddraw push rs --- engine/joint/v4k.h | 4 ++-- engine/split/v4k_renderdd.c | 4 ++-- engine/v4k.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index ddf15bd..9db2adc 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -387206,7 +387206,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); dd_rs.cull_face_enabled = 0; - + glActiveTexture(GL_TEXTURE0); mat44 mvp; @@ -387227,10 +387227,10 @@ void ddraw_flush_projview(mat44 proj, mat44 view) { for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points GLenum mode = i < 2 ? GL_LINES : GL_POINTS; dd_rs.line_width = (i == 1 ? 1 : 0.3); // 0.625); + renderstate_apply(&dd_rs); for each_map(dd_lists[dd_ontop][i], unsigned, rgb, array(vec3), list) { int count = array_count(list); if(!count) continue; - renderstate_apply(&dd_rs); // color vec3 rgbf = {((rgb>>0)&255)/255.f,((rgb>>8)&255)/255.f,((rgb>>16)&255)/255.f}; glUniform3fv(dd_u_color, GL_TRUE, &rgbf.x); diff --git a/engine/split/v4k_renderdd.c b/engine/split/v4k_renderdd.c index 258dd62..63b7de3 100644 --- a/engine/split/v4k_renderdd.c +++ b/engine/split/v4k_renderdd.c @@ -69,7 +69,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); dd_rs.cull_face_enabled = 0; - + glActiveTexture(GL_TEXTURE0); mat44 mvp; @@ -90,10 +90,10 @@ void ddraw_flush_projview(mat44 proj, mat44 view) { for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points GLenum mode = i < 2 ? GL_LINES : GL_POINTS; dd_rs.line_width = (i == 1 ? 1 : 0.3); // 0.625); + renderstate_apply(&dd_rs); for each_map(dd_lists[dd_ontop][i], unsigned, rgb, array(vec3), list) { int count = array_count(list); if(!count) continue; - renderstate_apply(&dd_rs); // color vec3 rgbf = {((rgb>>0)&255)/255.f,((rgb>>8)&255)/255.f,((rgb>>16)&255)/255.f}; glUniform3fv(dd_u_color, GL_TRUE, &rgbf.x); diff --git a/engine/v4k.c b/engine/v4k.c index 0c7f162..5a9e82c 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -21746,7 +21746,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); dd_rs.cull_face_enabled = 0; - + glActiveTexture(GL_TEXTURE0); mat44 mvp; @@ -21767,10 +21767,10 @@ void ddraw_flush_projview(mat44 proj, mat44 view) { for( int i = 0; i < 3; ++i ) { // [0] thin, [1] thick, [2] points GLenum mode = i < 2 ? GL_LINES : GL_POINTS; dd_rs.line_width = (i == 1 ? 1 : 0.3); // 0.625); + renderstate_apply(&dd_rs); for each_map(dd_lists[dd_ontop][i], unsigned, rgb, array(vec3), list) { int count = array_count(list); if(!count) continue; - renderstate_apply(&dd_rs); // color vec3 rgbf = {((rgb>>0)&255)/255.f,((rgb>>8)&255)/255.f,((rgb>>16)&255)/255.f}; glUniform3fv(dd_u_color, GL_TRUE, &rgbf.x);