chore(gx): clean up function declarations in GLDevice

This commit is contained in:
fallenoak 2023-04-17 12:16:38 -05:00 committed by GitHub
parent 01ca76788c
commit 58272f1212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 78 deletions

View File

@ -2200,29 +2200,29 @@ void GLDevice::SetAlphaTestEnable(bool enable) {
} }
} }
void GLDevice::SetClearColor(const GLColor4f& a2) { void GLDevice::SetClearColor(const GLColor4f& clearColor) {
if ( if (
this->m_States.clear.clearColor.r != a2.r this->m_States.clear.clearColor.r != clearColor.r
|| this->m_States.clear.clearColor.g != a2.g || this->m_States.clear.clearColor.g != clearColor.g
|| this->m_States.clear.clearColor.b != a2.b || this->m_States.clear.clearColor.b != clearColor.b
|| this->m_States.clear.clearColor.a != a2.a || this->m_States.clear.clearColor.a != clearColor.a
) { ) {
glClearColor(a2.r, a2.g, a2.b, a2.a); glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a);
this->m_States.clear.clearColor = { a2.r, a2.g, a2.b, a2.a }; this->m_States.clear.clearColor = { clearColor.r, clearColor.g, clearColor.b, clearColor.a };
} }
} }
void GLDevice::SetClearDepth(double depth) { void GLDevice::SetClearDepth(double clearDepth) {
if (this->m_States.clear.clearDepth != depth) { if (this->m_States.clear.clearDepth != clearDepth) {
glClearDepth(depth); glClearDepth(clearDepth);
this->m_States.clear.clearDepth = depth; this->m_States.clear.clearDepth = clearDepth;
} }
} }
void GLDevice::SetClearStencil(int32_t s) { void GLDevice::SetClearStencil(int32_t clearStencil) {
if (this->m_States.clear.clearStencil != s) { if (this->m_States.clear.clearStencil != clearStencil) {
glClearStencil(s); glClearStencil(clearStencil);
this->m_States.clear.clearStencil = s; this->m_States.clear.clearStencil = clearStencil;
} }
} }

View File

@ -63,13 +63,13 @@ class GLDevice {
static GLFramebuffer* m_F8330C; static GLFramebuffer* m_F8330C;
// Static functions // Static functions
static GLDevice* Get(void); static GLDevice* Get();
static void Set(GLDevice*); static void Set(GLDevice* device);
static void InitPools(void); static void InitPools();
static RendererInfo GetRendererInfo(void); static RendererInfo GetRendererInfo();
static void InitRendererInfo(void); static void InitRendererInfo();
static void SetOption(GLDeviceOption, bool); static void SetOption(GLDeviceOption option, bool enable);
static void StaticInit(void); static void StaticInit();
// Member variables // Member variables
std::basic_string<char, std::char_traits<char>, std::allocator<char>> m_DebugName; std::basic_string<char, std::char_traits<char>, std::allocator<char>> m_DebugName;
@ -121,72 +121,72 @@ class GLDevice {
// Member functions // Member functions
GLDevice(); GLDevice();
void ApplyGLBindings(const GLStates&, bool); void ApplyGLBindings(const GLStates& states, bool a3);
void ApplyGLStates(const GLStates&, bool); void ApplyGLStates(const GLStates& states, bool force);
void ApplyShaderConstants(void); void ApplyShaderConstants();
void ApplyTransforms(void); void ApplyTransforms();
void BindBuffer(GLBuffer*, GLEnum); void BindBuffer(GLBuffer* buffer, GLEnum target);
void BindFramebuffer(GLFramebuffer*); void BindFramebuffer(GLFramebuffer* framebuffer);
void BindGLSLProgram(GLGLSLProgram*); void BindGLSLProgram(GLGLSLProgram* a2);
void BindShader(GLShader*); void BindShader(GLShader* shader);
void BindTexture(GLEnum, GLTexture*); void BindTexture(GLEnum textureType, GLTexture* texture);
void BindVertexArray(GLVertexArray*); void BindVertexArray(GLVertexArray* a2);
void BlitFramebuffer(GLMipmap*, const GLRect*, GLMipmap*, const GLRect*, GLEnum, GLEnum); void BlitFramebuffer(GLMipmap* src, const GLRect* srcRect, GLMipmap* dst, const GLRect* dstRect, GLEnum mask, GLEnum filter);
void CheckDepthTarget(void); void CheckDepthTarget();
void Clear(uint32_t, const GLColor4f&, double, int32_t); void Clear(uint32_t clearMask, const GLColor4f& clearColor, double clearDepth, int32_t clearStencil);
void CopyTex(uint32_t, uint32_t, GLMipmap*, const GLRect*); void CopyTex(uint32_t a2, uint32_t a3, GLMipmap* dst, const GLRect* framebufferRect);
GLBuffer* CreateBuffer(GLEnum, uint32_t, const void*, GLEnum, GLEnum); GLBuffer* CreateBuffer(GLEnum type, uint32_t a3, const void* a4, GLEnum usage, GLEnum format);
GLShader* CreateShader(GLShader::ShaderType, const void*, int32_t, const char*); GLShader* CreateShader(GLShader::ShaderType type, const void* buf, int32_t codeLen, const char* name);
GLTexture* CreateTexture2D(uint32_t, uint32_t, uint32_t, GLTextureFormat, uint32_t); GLTexture* CreateTexture2D(uint32_t width, uint32_t height, uint32_t numMipMap, GLTextureFormat format, uint32_t flags);
GLTexture* CreateTextureCubeMap(uint32_t, uint32_t, GLTextureFormat, uint32_t); GLTexture* CreateTextureCubeMap(uint32_t size, uint32_t numMipMap, GLTextureFormat format, uint32_t flags);
void Draw(GLEnum, uint32_t, uint32_t); void Draw(GLEnum primitive, uint32_t a3, uint32_t a4);
void DrawIndexed(GLEnum, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); void DrawIndexed(GLEnum primitive, uint32_t a3, uint32_t a4, uint32_t a5, uint32_t a6, uint32_t count);
void DrawRect(void); void DrawRect();
GLFramebuffer* GetCurrentTarget(void); // invented name GLFramebuffer* GetCurrentTarget(); // invented name
uint32_t GetID(void); uint32_t GetID();
GLShader* GetShader(GLShader::ShaderType); GLShader* GetShader(GLShader::ShaderType shaderType);
const GLStates::VertexArrayObject& GetVertexArrayStates(); const GLStates::VertexArrayObject& GetVertexArrayStates();
void GLLDraw(GLEnum, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); void GLLDraw(GLEnum mode, uint32_t start, uint32_t end, uint32_t a5, uint32_t a6, uint32_t count);
void Init(GLAbstractWindow*, const char*, uint32_t, GLTextureFormat); void Init(GLAbstractWindow* a2, const char* a3, uint32_t a4, GLTextureFormat a5);
void LoadDefaultStates(void); void LoadDefaultStates();
void ResetBackbuffer(uint32_t width, uint32_t height, GLTextureFormat colorFormat, GLTextureFormat depthFormat, uint32_t sampleCount); void ResetBackbuffer(uint32_t width, uint32_t height, GLTextureFormat colorFormat, GLTextureFormat depthFormat, uint32_t sampleCount);
void Resize(uint32_t width, uint32_t height); void Resize(uint32_t width, uint32_t height);
void RestoreTextures(void); void RestoreTextures();
void SetActiveTexture(uint32_t); void SetActiveTexture(uint32_t a2);
void SetAlphaBlend(GLEnum, GLEnum, GLEnum); void SetAlphaBlend(GLEnum srcBlend, GLEnum dstBlend, GLEnum blendOp);
void SetAlphaBlendEnable(bool); void SetAlphaBlendEnable(bool enable);
void SetAlphaTest(GLEnum, float); void SetAlphaTest(GLEnum func, float ref);
void SetAlphaTestEnable(bool); void SetAlphaTestEnable(bool enable);
void SetClearColor(const GLColor4f&); void SetClearColor(const GLColor4f& clearColor);
void SetClearDepth(double); void SetClearDepth(double clearDepth);
void SetClearStencil(int32_t); void SetClearStencil(int32_t clearStencil);
void SetColorWriteMask(bool red, bool green, bool blue, bool alpha, uint32_t index); void SetColorWriteMask(bool red, bool green, bool blue, bool alpha, uint32_t index);
void SetCullMode(GLEnum); void SetCullMode(GLEnum cullMode);
void SetDepthBias(float constantBias, float slopeScaledBias); void SetDepthBias(float constantBias, float slopeScaledBias);
void SetDepthTestEnable(bool); void SetDepthTestEnable(bool enable);
void SetDepthTestFunc(GLEnum); void SetDepthTestFunc(GLEnum func);
void SetDepthWriteMask(bool); void SetDepthWriteMask(bool enable);
void SetDisplay(uint32_t, uint32_t, GLTextureFormat, GLTextureFormat, uint32_t, bool, bool, uint32_t); void SetDisplay(uint32_t width, uint32_t height, GLTextureFormat a4, GLTextureFormat a5, uint32_t a6, bool a7, bool a8, uint32_t a9);
void SetFogColor(float r, float g, float b, float a); void SetFogColor(float r, float g, float b, float a);
void SetFogEnable(bool enable); void SetFogEnable(bool enable);
void SetFogParam(GLEnum param, float value); void SetFogParam(GLEnum param, float value);
void SetIndexBuffer(GLBuffer*); void SetIndexBuffer(GLBuffer* buffer);
void SetLightingEnable(bool enable); void SetLightingEnable(bool enable);
void SetModelView(GLEnum view); void SetModelView(GLEnum transform);
void SetScissor(bool, const GLRect&); void SetScissor(bool a2, const GLRect& a3);
void SetShader(GLShader::ShaderType, GLShader*); void SetShader(GLShader::ShaderType shaderType, GLShader* shader);
void SetShaderConstants(GLShader::ShaderType, uint32_t, const float*, uint32_t); void SetShaderConstants(GLShader::ShaderType shaderType, uint32_t index, const float* constants, uint32_t count);
void SetShaderConstantsInternal(GLShader::ShaderType, uint32_t, const float*, uint32_t); void SetShaderConstantsInternal(GLShader::ShaderType shaderType, uint32_t index, const float* constants, uint32_t count);
void SetTexture(uint32_t, GLTexture*); void SetTexture(uint32_t stage, GLTexture* texture);
void SetTransform(GLEnum, const float*); void SetTransform(GLEnum transform, const float* a3);
void SetUnpackClientStorage(bool); void SetUnpackClientStorage(bool enable);
void SetVertexBuffer(uint32_t, GLBuffer*, uint32_t, uint32_t); void SetVertexBuffer(uint32_t index, GLBuffer* buffer, uint32_t offset, uint32_t stride);
void SetVertexFormat(GLVertexFormat*); void SetVertexFormat(GLVertexFormat* format);
void SetViewport(const GLRect&, double, double); void SetViewport(const GLRect& viewport, double zNear, double zFar);
void Sub34BB0(GLEnum a2, GLMipmap* a3, uint32_t index); void Sub34BB0(GLEnum a2, GLMipmap* a3, uint32_t index);
void Sub38460(bool); void Sub38460(bool a2);
void Swap(void); void Swap();
void UpdateFFPTexturing(void); void UpdateFFPTexturing();
}; };
#endif #endif