mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Chore] (All): Format code.
This commit is contained in:
@@ -114,11 +114,10 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SizeT locNeedle = 0;
|
SizeT locNeedle = 0;
|
||||||
for (auto index: unallocatedUniformIndex) {
|
for (auto index : unallocatedUniformIndex) {
|
||||||
auto& uniform = m_program->getUniform(index);
|
auto& uniform = m_program->getUniform(index);
|
||||||
for (; locNeedle <= m_maxUniformLocation; locNeedle++) {
|
for (; locNeedle <= m_maxUniformLocation; locNeedle++) {
|
||||||
if (m_uniformTypes[locNeedle] != GL_ZERO)
|
if (m_uniformTypes[locNeedle] != GL_ZERO) continue;
|
||||||
continue;
|
|
||||||
// Found a vacant location at locNeedle
|
// Found a vacant location at locNeedle
|
||||||
m_uniformNames[locNeedle] = uniform.name;
|
m_uniformNames[locNeedle] = uniform.name;
|
||||||
m_uniformTypes[locNeedle] = uniform.glDefineType;
|
m_uniformTypes[locNeedle] = uniform.glDefineType;
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ namespace MobileGL {
|
|||||||
Uint GetMaxUniformLocation() const { return m_maxUniformLocation; }
|
Uint GetMaxUniformLocation() const { return m_maxUniformLocation; }
|
||||||
Int GetUniformLocation(const String& name) {
|
Int GetUniformLocation(const String& name) {
|
||||||
const auto it = m_uniformLocations.find(name);
|
const auto it = m_uniformLocations.find(name);
|
||||||
if (it == m_uniformLocations.end())
|
if (it == m_uniformLocations.end()) return -1;
|
||||||
return -1;
|
|
||||||
return (Int)it->second;
|
return (Int)it->second;
|
||||||
}
|
}
|
||||||
GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; }
|
GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; }
|
||||||
|
|||||||
Regular → Executable
Reference in New Issue
Block a user