mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-15 17:46:03 +03:00
chore(gx): clean up function declarations in GLDevice
This commit is contained in:
parent
01ca76788c
commit
58272f1212
@ -2200,29 +2200,29 @@ void GLDevice::SetAlphaTestEnable(bool enable) {
|
||||
}
|
||||
}
|
||||
|
||||
void GLDevice::SetClearColor(const GLColor4f& a2) {
|
||||
void GLDevice::SetClearColor(const GLColor4f& clearColor) {
|
||||
if (
|
||||
this->m_States.clear.clearColor.r != a2.r
|
||||
|| this->m_States.clear.clearColor.g != a2.g
|
||||
|| this->m_States.clear.clearColor.b != a2.b
|
||||
|| this->m_States.clear.clearColor.a != a2.a
|
||||
this->m_States.clear.clearColor.r != clearColor.r
|
||||
|| this->m_States.clear.clearColor.g != clearColor.g
|
||||
|| this->m_States.clear.clearColor.b != clearColor.b
|
||||
|| this->m_States.clear.clearColor.a != clearColor.a
|
||||
) {
|
||||
glClearColor(a2.r, a2.g, a2.b, a2.a);
|
||||
this->m_States.clear.clearColor = { a2.r, a2.g, a2.b, a2.a };
|
||||
glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a);
|
||||
this->m_States.clear.clearColor = { clearColor.r, clearColor.g, clearColor.b, clearColor.a };
|
||||
}
|
||||
}
|
||||
|
||||
void GLDevice::SetClearDepth(double depth) {
|
||||
if (this->m_States.clear.clearDepth != depth) {
|
||||
glClearDepth(depth);
|
||||
this->m_States.clear.clearDepth = depth;
|
||||
void GLDevice::SetClearDepth(double clearDepth) {
|
||||
if (this->m_States.clear.clearDepth != clearDepth) {
|
||||
glClearDepth(clearDepth);
|
||||
this->m_States.clear.clearDepth = clearDepth;
|
||||
}
|
||||
}
|
||||
|
||||
void GLDevice::SetClearStencil(int32_t s) {
|
||||
if (this->m_States.clear.clearStencil != s) {
|
||||
glClearStencil(s);
|
||||
this->m_States.clear.clearStencil = s;
|
||||
void GLDevice::SetClearStencil(int32_t clearStencil) {
|
||||
if (this->m_States.clear.clearStencil != clearStencil) {
|
||||
glClearStencil(clearStencil);
|
||||
this->m_States.clear.clearStencil = clearStencil;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,13 +63,13 @@ class GLDevice {
|
||||
static GLFramebuffer* m_F8330C;
|
||||
|
||||
// Static functions
|
||||
static GLDevice* Get(void);
|
||||
static void Set(GLDevice*);
|
||||
static void InitPools(void);
|
||||
static RendererInfo GetRendererInfo(void);
|
||||
static void InitRendererInfo(void);
|
||||
static void SetOption(GLDeviceOption, bool);
|
||||
static void StaticInit(void);
|
||||
static GLDevice* Get();
|
||||
static void Set(GLDevice* device);
|
||||
static void InitPools();
|
||||
static RendererInfo GetRendererInfo();
|
||||
static void InitRendererInfo();
|
||||
static void SetOption(GLDeviceOption option, bool enable);
|
||||
static void StaticInit();
|
||||
|
||||
// Member variables
|
||||
std::basic_string<char, std::char_traits<char>, std::allocator<char>> m_DebugName;
|
||||
@ -121,72 +121,72 @@ class GLDevice {
|
||||
|
||||
// Member functions
|
||||
GLDevice();
|
||||
void ApplyGLBindings(const GLStates&, bool);
|
||||
void ApplyGLStates(const GLStates&, bool);
|
||||
void ApplyShaderConstants(void);
|
||||
void ApplyTransforms(void);
|
||||
void BindBuffer(GLBuffer*, GLEnum);
|
||||
void BindFramebuffer(GLFramebuffer*);
|
||||
void BindGLSLProgram(GLGLSLProgram*);
|
||||
void BindShader(GLShader*);
|
||||
void BindTexture(GLEnum, GLTexture*);
|
||||
void BindVertexArray(GLVertexArray*);
|
||||
void BlitFramebuffer(GLMipmap*, const GLRect*, GLMipmap*, const GLRect*, GLEnum, GLEnum);
|
||||
void CheckDepthTarget(void);
|
||||
void Clear(uint32_t, const GLColor4f&, double, int32_t);
|
||||
void CopyTex(uint32_t, uint32_t, GLMipmap*, const GLRect*);
|
||||
GLBuffer* CreateBuffer(GLEnum, uint32_t, const void*, GLEnum, GLEnum);
|
||||
GLShader* CreateShader(GLShader::ShaderType, const void*, int32_t, const char*);
|
||||
GLTexture* CreateTexture2D(uint32_t, uint32_t, uint32_t, GLTextureFormat, uint32_t);
|
||||
GLTexture* CreateTextureCubeMap(uint32_t, uint32_t, GLTextureFormat, uint32_t);
|
||||
void Draw(GLEnum, uint32_t, uint32_t);
|
||||
void DrawIndexed(GLEnum, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
void DrawRect(void);
|
||||
GLFramebuffer* GetCurrentTarget(void); // invented name
|
||||
uint32_t GetID(void);
|
||||
GLShader* GetShader(GLShader::ShaderType);
|
||||
void ApplyGLBindings(const GLStates& states, bool a3);
|
||||
void ApplyGLStates(const GLStates& states, bool force);
|
||||
void ApplyShaderConstants();
|
||||
void ApplyTransforms();
|
||||
void BindBuffer(GLBuffer* buffer, GLEnum target);
|
||||
void BindFramebuffer(GLFramebuffer* framebuffer);
|
||||
void BindGLSLProgram(GLGLSLProgram* a2);
|
||||
void BindShader(GLShader* shader);
|
||||
void BindTexture(GLEnum textureType, GLTexture* texture);
|
||||
void BindVertexArray(GLVertexArray* a2);
|
||||
void BlitFramebuffer(GLMipmap* src, const GLRect* srcRect, GLMipmap* dst, const GLRect* dstRect, GLEnum mask, GLEnum filter);
|
||||
void CheckDepthTarget();
|
||||
void Clear(uint32_t clearMask, const GLColor4f& clearColor, double clearDepth, int32_t clearStencil);
|
||||
void CopyTex(uint32_t a2, uint32_t a3, GLMipmap* dst, const GLRect* framebufferRect);
|
||||
GLBuffer* CreateBuffer(GLEnum type, uint32_t a3, const void* a4, GLEnum usage, GLEnum format);
|
||||
GLShader* CreateShader(GLShader::ShaderType type, const void* buf, int32_t codeLen, const char* name);
|
||||
GLTexture* CreateTexture2D(uint32_t width, uint32_t height, uint32_t numMipMap, GLTextureFormat format, uint32_t flags);
|
||||
GLTexture* CreateTextureCubeMap(uint32_t size, uint32_t numMipMap, GLTextureFormat format, uint32_t flags);
|
||||
void Draw(GLEnum primitive, uint32_t a3, uint32_t a4);
|
||||
void DrawIndexed(GLEnum primitive, uint32_t a3, uint32_t a4, uint32_t a5, uint32_t a6, uint32_t count);
|
||||
void DrawRect();
|
||||
GLFramebuffer* GetCurrentTarget(); // invented name
|
||||
uint32_t GetID();
|
||||
GLShader* GetShader(GLShader::ShaderType shaderType);
|
||||
const GLStates::VertexArrayObject& GetVertexArrayStates();
|
||||
void GLLDraw(GLEnum, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
void Init(GLAbstractWindow*, const char*, uint32_t, GLTextureFormat);
|
||||
void LoadDefaultStates(void);
|
||||
void GLLDraw(GLEnum mode, uint32_t start, uint32_t end, uint32_t a5, uint32_t a6, uint32_t count);
|
||||
void Init(GLAbstractWindow* a2, const char* a3, uint32_t a4, GLTextureFormat a5);
|
||||
void LoadDefaultStates();
|
||||
void ResetBackbuffer(uint32_t width, uint32_t height, GLTextureFormat colorFormat, GLTextureFormat depthFormat, uint32_t sampleCount);
|
||||
void Resize(uint32_t width, uint32_t height);
|
||||
void RestoreTextures(void);
|
||||
void SetActiveTexture(uint32_t);
|
||||
void SetAlphaBlend(GLEnum, GLEnum, GLEnum);
|
||||
void SetAlphaBlendEnable(bool);
|
||||
void SetAlphaTest(GLEnum, float);
|
||||
void SetAlphaTestEnable(bool);
|
||||
void SetClearColor(const GLColor4f&);
|
||||
void SetClearDepth(double);
|
||||
void SetClearStencil(int32_t);
|
||||
void RestoreTextures();
|
||||
void SetActiveTexture(uint32_t a2);
|
||||
void SetAlphaBlend(GLEnum srcBlend, GLEnum dstBlend, GLEnum blendOp);
|
||||
void SetAlphaBlendEnable(bool enable);
|
||||
void SetAlphaTest(GLEnum func, float ref);
|
||||
void SetAlphaTestEnable(bool enable);
|
||||
void SetClearColor(const GLColor4f& clearColor);
|
||||
void SetClearDepth(double clearDepth);
|
||||
void SetClearStencil(int32_t clearStencil);
|
||||
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 SetDepthTestEnable(bool);
|
||||
void SetDepthTestFunc(GLEnum);
|
||||
void SetDepthWriteMask(bool);
|
||||
void SetDisplay(uint32_t, uint32_t, GLTextureFormat, GLTextureFormat, uint32_t, bool, bool, uint32_t);
|
||||
void SetDepthTestEnable(bool enable);
|
||||
void SetDepthTestFunc(GLEnum func);
|
||||
void SetDepthWriteMask(bool enable);
|
||||
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 SetFogEnable(bool enable);
|
||||
void SetFogParam(GLEnum param, float value);
|
||||
void SetIndexBuffer(GLBuffer*);
|
||||
void SetIndexBuffer(GLBuffer* buffer);
|
||||
void SetLightingEnable(bool enable);
|
||||
void SetModelView(GLEnum view);
|
||||
void SetScissor(bool, const GLRect&);
|
||||
void SetShader(GLShader::ShaderType, GLShader*);
|
||||
void SetShaderConstants(GLShader::ShaderType, uint32_t, const float*, uint32_t);
|
||||
void SetShaderConstantsInternal(GLShader::ShaderType, uint32_t, const float*, uint32_t);
|
||||
void SetTexture(uint32_t, GLTexture*);
|
||||
void SetTransform(GLEnum, const float*);
|
||||
void SetUnpackClientStorage(bool);
|
||||
void SetVertexBuffer(uint32_t, GLBuffer*, uint32_t, uint32_t);
|
||||
void SetVertexFormat(GLVertexFormat*);
|
||||
void SetViewport(const GLRect&, double, double);
|
||||
void SetModelView(GLEnum transform);
|
||||
void SetScissor(bool a2, const GLRect& a3);
|
||||
void SetShader(GLShader::ShaderType shaderType, GLShader* shader);
|
||||
void SetShaderConstants(GLShader::ShaderType shaderType, uint32_t index, const float* constants, uint32_t count);
|
||||
void SetShaderConstantsInternal(GLShader::ShaderType shaderType, uint32_t index, const float* constants, uint32_t count);
|
||||
void SetTexture(uint32_t stage, GLTexture* texture);
|
||||
void SetTransform(GLEnum transform, const float* a3);
|
||||
void SetUnpackClientStorage(bool enable);
|
||||
void SetVertexBuffer(uint32_t index, GLBuffer* buffer, uint32_t offset, uint32_t stride);
|
||||
void SetVertexFormat(GLVertexFormat* format);
|
||||
void SetViewport(const GLRect& viewport, double zNear, double zFar);
|
||||
void Sub34BB0(GLEnum a2, GLMipmap* a3, uint32_t index);
|
||||
void Sub38460(bool);
|
||||
void Swap(void);
|
||||
void UpdateFFPTexturing(void);
|
||||
void Sub38460(bool a2);
|
||||
void Swap();
|
||||
void UpdateFFPTexturing();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user