From 9386b3900b74c842717d03b0532819751bdd88f0 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sat, 22 Mar 2014 17:17:40 +0000 Subject: [PATCH] OpenGL remove HOMs Removes HOMs from OpenGL. This also seems to have made skyboxes not draw ontop of everything else on Intel GPU's. --- src/hardware/hw_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 233745008..16987b88d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4610,6 +4610,15 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player) const boolean skybox = (skyboxmo[0] && cv_skybox.value); // True if there's a skybox object and skyboxes are on + FRGBAFloat ClearColor; + + ClearColor.red = 0.0f; + ClearColor.green = 0.0f; + ClearColor.blue = 0.0f; + ClearColor.alpha = 1.0f; + + HWD.pfnClearBuffer(true, false, &ClearColor); // Clear the Color Buffer, stops HOMs. Also seems to fix the skybox issue on Intel GPUs. + if (skybox && drawsky) // If there's a skybox and we should be drawing the sky, draw the skybox HWR_RenderSkyboxView(viewnumber, player); // This is drawn before everything else so it is placed behind @@ -4685,7 +4694,7 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player) gr_fovlud = (float)(1.0l/tan((double)(fpov*M_PIl/360l))); //------------------------------------------------------------------------ - HWR_ClearView(); + HWR_ClearView(); // Clears the depth buffer and resets the view I believe if (0) { // I don't think this is ever used.