Working on optimization: GPU skinning and binary animations

This commit is contained in:
Vladislav Khorev committed 2026-04-15 16:39:33 +03:00
1 parent a589765b7e
commit f708843747
24 files changed
+890 -489525

No files matched your search

+20 -1
View File
@@ -774,7 +774,7 @@ namespace ZL {
void Renderer::RenderUniformMatrix4fv(const std::string& uniformName, bool transpose, const float* value)
{
auto shader = shaderManager.GetCurrentShader();
auto uniform = shader->uniformList.find(uniformName);
if (uniform != shader->uniformList.end())
@@ -783,6 +783,18 @@ namespace ZL {
}
}
void Renderer::RenderUniformMatrix4fvArray(const std::string& uniformName, int count, bool transpose, const float* value)
{
auto shader = shaderManager.GetCurrentShader();
auto uniform = shader->uniformList.find(uniformName);
if (uniform != shader->uniformList.end())
{
glUniformMatrix4fv(uniform->second, count, transpose, value);
}
}
void Renderer::RenderUniform3fv(const std::string& uniformName, const float* value)
{
auto shader = shaderManager.GetCurrentShader();
@@ -847,6 +859,13 @@ namespace ZL {
glVertexAttribPointer(shader->attribList[attribName], 3, GL_FLOAT, GL_FALSE, stride, pointer);
}
void Renderer::VertexAttribPointer4fv(const std::string& attribName, int stride, const char* pointer)
{
auto shader = shaderManager.GetCurrentShader();
if (shader->attribList.find(attribName) != shader->attribList.end())
glVertexAttribPointer(shader->attribList[attribName], 4, GL_FLOAT, GL_FALSE, stride, pointer);
}
void Renderer::DisableVertexAttribArray(const std::string& attribName)
{
auto shader = shaderManager.GetCurrentShader();
+3
View File
@@ -129,6 +129,7 @@ namespace ZL {
void RenderUniformMatrix3fv(const std::string& uniformName, bool transpose, const float* value);
void RenderUniformMatrix4fv(const std::string& uniformName, bool transpose, const float* value);
void RenderUniformMatrix4fvArray(const std::string& uniformName, int count, bool transpose, const float* value);
void RenderUniform1i(const std::string& uniformName, const int value);
void RenderUniform3fv(const std::string& uniformName, const float* value);
void RenderUniform4fv(const std::string& uniformName, const float* value);
@@ -138,6 +139,8 @@ namespace ZL {
void VertexAttribPointer3fv(const std::string& attribName, int stride, const char* pointer);
void VertexAttribPointer4fv(const std::string& attribName, int stride, const char* pointer);
void DisableVertexAttribArray(const std::string& attribName);
void DrawVertexRenderStruct(const VertexRenderStruct& VertexRenderStruct);