From a077eb38b01292611f4f6031b75e3e2c1c20f06e Mon Sep 17 00:00:00 2001
From: chai <chaifix@163.com>
Date: Fri, 16 Aug 2019 08:54:08 +0800
Subject: *misc

---
 Source/modules/asura-core/Graphics/Shader.cpp | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

(limited to 'Source/modules/asura-core/Graphics/Shader.cpp')

diff --git a/Source/modules/asura-core/Graphics/Shader.cpp b/Source/modules/asura-core/Graphics/Shader.cpp
index 329b3f1..56d638d 100644
--- a/Source/modules/asura-core/Graphics/Shader.cpp
+++ b/Source/modules/asura-core/Graphics/Shader.cpp
@@ -24,12 +24,12 @@ Shader::~Shader()
 
 void Shader::SetActive(Shader* shader)
 {
-	g_Device.SetActiveShader(shader); 
+	g_GfxDevice.SetActiveShader(shader); 
 }
 
 Shader* Shader::GetActive()
 {
-	return g_Device.GetActiveShader();
+	return g_GfxDevice.GetActiveShader();
 }
 
 bool Shader::Load(const string& vert, const string& frag)
@@ -157,56 +157,56 @@ GLuint Shader::GetGLProgram()
 
 void Shader::SetUniformFloat(uint loc, float value)
 {
-	if(g_Device.GetActiveShader() == this)
+	if(g_GfxDevice.GetActiveShader() == this)
 		glUniform1f(loc, value);
 }
 
 bool Shader::SetUniformTexture(uint loc, const Texture& texture)
 {
-	if (g_Device.GetActiveShader() != this)
+	if (g_GfxDevice.GetActiveShader() != this)
 		return false;
 
-	g_Device.WipeError();
+	g_GfxDevice.WipeError();
 	glActiveTexture(GL_TEXTURE0 + texUnit);
-	if (g_Device.HasError())
+	if (g_GfxDevice.HasError())
 		return false;
 	GLint tex = texture.GetGLTexture();
 	glBindTexture(GL_TEXTURE_2D, tex);
-	if (g_Device.HasError())
+	if (g_GfxDevice.HasError())
 		return false;
 	glUniform1i(loc, texUnit);
-	if (g_Device.HasError())
+	if (g_GfxDevice.HasError())
 		return false;
 	++texUnit;
 }
 
 void Shader::SetUniformVector2(uint loc, const Math::Vector2f& vec2)
 {
-	if (g_Device.GetActiveShader() == this)
+	if (g_GfxDevice.GetActiveShader() == this)
 		glUniform2f(loc, vec2.x, vec2.y);
 }
 
 void Shader::SetUniformVector3(uint loc, const Math::Vector3f& vec3)
 {
-	if (g_Device.GetActiveShader() == this)
+	if (g_GfxDevice.GetActiveShader() == this)
 		glUniform3f(loc, vec3.x, vec3.y, vec3.z);
 }
 
 void Shader::SetUniformVector4(uint loc, const Math::Vector4f& vec4)
 {
-	if (g_Device.GetActiveShader() == this)
+	if (g_GfxDevice.GetActiveShader() == this)
 		glUniform4f(loc, vec4.x, vec4.y, vec4.z, vec4.w);
 }
 
 void Shader::SetUniformMatrix44(uint loc, const Math::Matrix44& mat)
 {
-	if (g_Device.GetActiveShader() == this)
+	if (g_GfxDevice.GetActiveShader() == this)
 		glUniformMatrix4fv(loc, 1, GL_FALSE, mat.GetElements());
 }
 
 void Shader::SetUniformColor(uint loc, const Color& color)
 {
-	if (g_Device.GetActiveShader() == this)
+	if (g_GfxDevice.GetActiveShader() == this)
 		glUniform4f(loc, color.r, color.g, color.b, color.a);
 }
 
-- 
cgit v1.1-26-g67d0