gfx: more state changes

main
Dominik Madarász 2024-04-15 16:00:46 +02:00
parent e59fba6cf2
commit 470e455091
4 changed files with 15 additions and 9 deletions

View File

@ -385283,9 +385283,11 @@ bool postfx_end(postfx *fx) {
do_once { do_once {
postfx_rs = renderstate(); postfx_rs = renderstate();
// disable depth test in 2d rendering // disable depth test in 2d rendering
postfx_rs.depth_test_enabled = 1; postfx_rs.depth_test_enabled = 0;
postfx_rs.cull_face_enabled = 0; postfx_rs.cull_face_enabled = 0;
postfx_rs.front_face = GL_CCW; postfx_rs.blend_enabled = 1;
postfx_rs.blend_src = GL_SRC_ALPHA;
postfx_rs.blend_dst = GL_ONE_MINUS_SRC_ALPHA;
} }
// unbind postfx fbo // unbind postfx fbo
@ -387205,7 +387207,7 @@ void ddraw_flush() {
void ddraw_flush_projview(mat44 proj, mat44 view) { void ddraw_flush_projview(mat44 proj, mat44 view) {
do_once dd_rs = renderstate(); do_once dd_rs = renderstate();
dd_rs.depth_test_enabled = !dd_ontop; dd_rs.depth_test_enabled = dd_ontop;
dd_rs.cull_face_enabled = 0; dd_rs.cull_face_enabled = 0;
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);

View File

@ -2649,9 +2649,11 @@ bool postfx_end(postfx *fx) {
do_once { do_once {
postfx_rs = renderstate(); postfx_rs = renderstate();
// disable depth test in 2d rendering // disable depth test in 2d rendering
postfx_rs.depth_test_enabled = 1; postfx_rs.depth_test_enabled = 0;
postfx_rs.cull_face_enabled = 0; postfx_rs.cull_face_enabled = 0;
postfx_rs.front_face = GL_CCW; postfx_rs.blend_enabled = 1;
postfx_rs.blend_src = GL_SRC_ALPHA;
postfx_rs.blend_dst = GL_ONE_MINUS_SRC_ALPHA;
} }
// unbind postfx fbo // unbind postfx fbo

View File

@ -68,7 +68,7 @@ void ddraw_flush() {
void ddraw_flush_projview(mat44 proj, mat44 view) { void ddraw_flush_projview(mat44 proj, mat44 view) {
do_once dd_rs = renderstate(); do_once dd_rs = renderstate();
dd_rs.depth_test_enabled = !dd_ontop; dd_rs.depth_test_enabled = dd_ontop;
dd_rs.cull_face_enabled = 0; dd_rs.cull_face_enabled = 0;
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);

View File

@ -19823,9 +19823,11 @@ bool postfx_end(postfx *fx) {
do_once { do_once {
postfx_rs = renderstate(); postfx_rs = renderstate();
// disable depth test in 2d rendering // disable depth test in 2d rendering
postfx_rs.depth_test_enabled = 1; postfx_rs.depth_test_enabled = 0;
postfx_rs.cull_face_enabled = 0; postfx_rs.cull_face_enabled = 0;
postfx_rs.front_face = GL_CCW; postfx_rs.blend_enabled = 1;
postfx_rs.blend_src = GL_SRC_ALPHA;
postfx_rs.blend_dst = GL_ONE_MINUS_SRC_ALPHA;
} }
// unbind postfx fbo // unbind postfx fbo
@ -21745,7 +21747,7 @@ void ddraw_flush() {
void ddraw_flush_projview(mat44 proj, mat44 view) { void ddraw_flush_projview(mat44 proj, mat44 view) {
do_once dd_rs = renderstate(); do_once dd_rs = renderstate();
dd_rs.depth_test_enabled = !dd_ontop; dd_rs.depth_test_enabled = dd_ontop;
dd_rs.cull_face_enabled = 0; dd_rs.cull_face_enabled = 0;
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);