From cd9ee7d1394c0a47df49f6037436416a072167b7 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 8 Dec 2024 15:31:28 +0100 Subject: [PATCH] smol cleanup --- src/hardware/hw_gpu.h | 73 +++++++++++++++++--------------- src/hardware/r_opengl/r_opengl.h | 2 - 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/src/hardware/hw_gpu.h b/src/hardware/hw_gpu.h index 384587b37..0d63296c6 100644 --- a/src/hardware/hw_gpu.h +++ b/src/hardware/hw_gpu.h @@ -13,64 +13,67 @@ #define __HWR_GPU_H__ #include "../screen.h" + #include "hw_data.h" #include "hw_defs.h" #include "hw_md2.h" #define SCREENVERTS 10 -boolean GL_Init (void); -void GL_FinishUpdate (INT32 waitvbl); -void SetupGLInfo (void); +boolean GL_Init(void); +void GL_FinishUpdate(INT32 waitvbl); +void SetupGLInfo(void); -void GL_SetSpecialState (hwdspecialstate_t IdState, INT32 Value); -void GL_SetTransform (FTransform *stransform); -void GL_SetBlend (FBITFIELD PolyFlags); -void GL_SetPalette (RGBA_t *palette); -void GL_ClearBuffer (FBOOLEAN ColorMask, FBOOLEAN DepthMask, FBOOLEAN StencilMask, FRGBAFloat * ClearColor); +void GL_SetSpecialState(hwdspecialstate_t IdState, INT32 Value); +void GL_SetTransform(FTransform *stransform); +void GL_SetBlend(FBITFIELD PolyFlags); +void GL_SetPalette(RGBA_t *palette); +void GL_ClearBuffer(FBOOLEAN ColorMask, FBOOLEAN DepthMask, FBOOLEAN StencilMask, FRGBAFloat * ClearColor); + +void GL_DrawPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags); +void GL_DrawIndexedTriangles(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray); +void GL_Draw2DLine(F2DCoord *v1, F2DCoord *v2, RGBA_t Color); -void GL_DrawPolygon (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags); -void GL_DrawIndexedTriangles (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray); -void GL_Draw2DLine (F2DCoord *v1, F2DCoord *v2, RGBA_t Color); void GL_DrawModelEx(model_t *model, INT32 frameIndex, float duration, float tics, INT32 nextFrameIndex, FTransform *pos, float hscale, float vscale, UINT8 flipped, UINT8 hflipped, FSurfaceInfo *Surface); #define GL_DrawModel(model, frameIndex, duration, tics, nextFrameIndex, pos, hscale, vscale, flipped, hflipped, Surface) GL_DrawModelEx(model, frameIndex, duration, tics, nextFrameIndex, pos, hscale, vscale, flipped, hflipped, Surface) -void GL_RenderSkyDome (gl_sky_t *sky); -void GL_SetTexture (GLMipmap_t *pTexInfo); -void GL_UpdateTexture (GLMipmap_t *pTexInfo); -void GL_DeleteTexture (GLMipmap_t *pTexInfo); +void GL_RenderSkyDome(gl_sky_t *sky); + +void GL_SetTexture(GLMipmap_t *pTexInfo); +void GL_UpdateTexture(GLMipmap_t *pTexInfo); +void GL_DeleteTexture(GLMipmap_t *pTexInfo); void GL_Flush(void); #define GL_ClearMipMapCache GL_Flush -INT32 GL_GetTextureUsed (void); +INT32 GL_GetTextureUsed(void); -void GL_CreateModelVBOs (model_t *model); +void GL_CreateModelVBOs(model_t *model); -void GL_ReadScreenTexture (int tex, UINT16 *dst_data); -void GL_GClipRect (INT32 minx, INT32 miny, INT32 maxx, INT32 maxy, float nearclip, float farclip); +void GL_ReadScreenTexture(int tex, UINT16 *dst_data); +void GL_GClipRect(INT32 minx, INT32 miny, INT32 maxx, INT32 maxy, float nearclip, float farclip); -void GL_MakeScreenTexture (int tex); -void GL_FlushScreenTextures (void); +void GL_MakeScreenTexture(int tex); +void GL_FlushScreenTextures(void); void GL_DrawScreenTexture(int tex, FSurfaceInfo *surf, FBITFIELD polyflags); -void GL_DoScreenWipe (int wipeStart, int wipeEnd); -void GL_RenderVhsEffect (fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT8 downdistort, UINT8 barsize); -void GL_DrawScreenFinalTexture (int tex, INT32 width, INT32 height, boolean useshader); +void GL_DoScreenWipe(int wipeStart, int wipeEnd); +void GL_RenderVhsEffect(fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT8 downdistort, UINT8 barsize); +void GL_DrawScreenFinalTexture(int tex, INT32 width, INT32 height, boolean useshader); -void GL_PostImgRedraw (float points[SCREENVERTS][SCREENVERTS][2]); +void GL_PostImgRedraw(float points[SCREENVERTS][SCREENVERTS][2]); -boolean GL_InitShaders (void); -void GL_LoadShader (int slot, char *code, hwdshaderstage_t stage); -boolean GL_CompileShader (int slot); -void GL_SetShader (int slot); -void GL_UnSetShader (void); +boolean GL_InitShaders(void); +void GL_LoadShader(int slot, char *code, hwdshaderstage_t stage); +boolean GL_CompileShader(int slot); +void GL_SetShader(int slot); +void GL_UnSetShader(void); -void GL_SetShaderInfo (hwdshaderinfo_t info, INT32 value); +void GL_SetShaderInfo(hwdshaderinfo_t info, INT32 value); -void GL_SetPaletteLookup (UINT8 *lut); -UINT32 GL_CreateLightTable (RGBA_t *hw_lighttable); -void GL_ClearLightTables (void); -void GL_SetScreenPalette (RGBA_t *palette); +void GL_SetPaletteLookup(UINT8 *lut); +UINT32 GL_CreateLightTable(RGBA_t *hw_lighttable); +void GL_ClearLightTables(void); +void GL_SetScreenPalette(RGBA_t *palette); #endif // __HWR_GPU_H__ diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h index a03febd3c..c453e4ebf 100644 --- a/src/hardware/r_opengl/r_opengl.h +++ b/src/hardware/r_opengl/r_opengl.h @@ -130,8 +130,6 @@ extern GLbyte screen_depth; extern GLint maximumAnisotropy; extern boolean supportMipMap; -extern struct GPURenderingAPI GLInterfaceAPI; - /** \brief OpenGL flags for video driver */ extern INT32 oglflags;