From f061d66a1664867a586c9520d2fbed7b57ac64ba Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 8 Dec 2024 03:24:58 +0100 Subject: [PATCH] conflict fix --- src/hardware/hw_main.c | 16 +++++++--------- src/hardware/r_opengl/r_opengl.c | 13 +++++-------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9c845d850..eb03f3277 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -21,7 +21,7 @@ #ifdef HWRENDER #include "hw_main.h" #include "hw_glob.h" -#include "hw_gpu.h" +#include "hw_drv.h" #include "hw_batching.h" #include "hw_md2.h" #include "hw_clip.h" @@ -683,8 +683,6 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool if (slope) lightlevel = HWR_CalcSlopeLight(lightlevel, slope, gl_frontsector, (FOFsector != NULL)); - HWR_Lighting(&Surf, lightlevel, planecolormap); - HWR_Lighting(&Surf, lightlevel, planecolormap, P_SectorUsesDirectionalLighting(gl_frontsector)); if (PolyFlags & (PF_Translucent|PF_Fog)) @@ -5480,14 +5478,14 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player) if (HWR_UseShader()) { if (cv_ripplewater.value) - GL_SetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime. + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime. const angle_t light_angle = maplighting.angle - viewangle + ANGLE_90; // I fucking hate OGL's coordinate system - GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT)); - GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0); - GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT)); + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT)); + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0); + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT)); - GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast); - GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight); + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast); + HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight); } if (viewnumber > 3) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 7307fac83..9ac159e7e 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -714,8 +714,8 @@ static INT32 shader_light_contrast = 0; static INT32 shader_light_backlight = 0; // Lactozilla: Shader functions -static boolean GL_Shader_CompileProgram(gl_shader_t *shader, GLint i); -static void GL_Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade); +static boolean Shader_CompileProgram(gl_shader_t *shader, GLint i); +static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade); static GLRGBAFloat shader_defaultcolor = {1.0f, 1.0f, 1.0f, 1.0f}; @@ -862,7 +862,7 @@ EXPORT boolean HWRAPI(CompileShader) (int slot) // Those are given to the uniforms. // -void GL_SetShaderInfo(hwdshaderinfo_t info, INT32 value) +EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value) { switch (info) { @@ -889,11 +889,11 @@ void GL_SetShaderInfo(hwdshaderinfo_t info, INT32 value) } } -void GL_SetShader(int slot) +EXPORT void HWRAPI(SetShader) (int slot) { if (slot == SHADER_NONE) { - GL_UnSetShader(); + UnSetShader(); return; } if (gl_allowshaders) @@ -2035,9 +2035,6 @@ static boolean Shader_CompileProgram(gl_shader_t *shader, GLint i) shader->uniforms[gluniform_scr_resolution] = GETUNI("scr_resolution"); - // supersampling crap - shader->uniforms[gluniform_inv_supersamplefactor] = GETUNI("inv_supersamplefactor"); - // misc. shader->uniforms[gluniform_leveltime] = GETUNI("leveltime"); #undef GETUNI