From 605975bfa0eebbce9e90ce76259dee6627c1c996 Mon Sep 17 00:00:00 2001 From: coulsonwang Date: Tue, 12 Mar 2019 14:18:16 +0800 Subject: [PATCH] [Feature] use references and rename the structure to a more meaningful name --- cocos/renderer/backend/ProgramState.cpp | 12 ++++++------ cocos/renderer/backend/Types.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cocos/renderer/backend/ProgramState.cpp b/cocos/renderer/backend/ProgramState.cpp index cb2d14adc6..7b1897ee30 100644 --- a/cocos/renderer/backend/ProgramState.cpp +++ b/cocos/renderer/backend/ProgramState.cpp @@ -246,12 +246,12 @@ void ProgramState::setUniform(const backend::UniformLocation& uniformLocation, c void ProgramState::convertUniformData(const backend::UniformInfo& uniformInfo, const void* srcData, uint32_t srcSize, std::vector& uniformData) { - auto basicType = static_cast(uniformInfo.type); + auto basicType = static_cast(uniformInfo.type); char* convertedData = new char[uniformInfo.bufferSize]; memset(convertedData, 0, uniformInfo.bufferSize); switch (basicType) { - case BasicType::FLOAT: + case UniformBasicType::FLOAT: { for (int i=0; i