Compare commits
1 Commits
spacecruft
...
optimize-g
Author | SHA1 | Date |
---|---|---|
Hleb Valoshka | 5d5e8783f5 |
|
@ -414,7 +414,7 @@ void Galaxy::renderGalaxyPointSprites(const Vector3f& offset,
|
||||||
GLushort j = 0;
|
GLushort j = 0;
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->mat4Param("MVPMatrix") = (*ms.projection) * mv;
|
prog->MVPMatrix = (*ms.projection) * mv;
|
||||||
prog->samplerParam("galaxyTex") = 0;
|
prog->samplerParam("galaxyTex") = 0;
|
||||||
prog->samplerParam("colorTex") = 1;
|
prog->samplerParam("colorTex") = 1;
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ void Renderer::renderSelectionPointer(const Observer& observer,
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
const Vector3f ¢er = cameraMatrix.col(2);
|
const Vector3f ¢er = cameraMatrix.col(2);
|
||||||
prog->mat4Param("MVPMatrix") = getProjectionMatrix() * getModelViewMatrix() * vecgl::translate(Vector3f(-center));
|
prog->MVPMatrix = getProjectionMatrix() * getModelViewMatrix() * vecgl::translate(Vector3f(-center));
|
||||||
prog->vec4Param("color") = Color(SelectionCursorColor, 0.6f).toVector4();
|
prog->vec4Param("color") = Color(SelectionCursorColor, 0.6f).toVector4();
|
||||||
prog->floatParam("pixelSize") = pixelSize;
|
prog->floatParam("pixelSize") = pixelSize;
|
||||||
prog->floatParam("s") = s;
|
prog->floatParam("s") = s;
|
||||||
|
@ -401,7 +401,7 @@ void Renderer::renderEclipticLine()
|
||||||
initVO(markerVO);
|
initVO(markerVO);
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->mat4Param("MVPMatrix") = getProjectionMatrix() * getModelViewMatrix();
|
prog->MVPMatrix = getProjectionMatrix() * getModelViewMatrix();
|
||||||
prog->vec4Param("color") = EclipticColor.toVector4();
|
prog->vec4Param("color") = EclipticColor.toVector4();
|
||||||
markerVO.draw(GL_LINE_LOOP, EclipticCount, EclipticOffset);
|
markerVO.draw(GL_LINE_LOOP, EclipticCount, EclipticOffset);
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ void Renderer::renderCrosshair(float selectionSizeInPixels,
|
||||||
float cursorGrow = max(1.0f, min(2.5f, (selectionSizeInPixels - 10.0f) / 100.0f));
|
float cursorGrow = max(1.0f, min(2.5f, (selectionSizeInPixels - 10.0f) / 100.0f));
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->mat4Param("MVPMatrix") = (*m.projection) * (*m.modelview);
|
prog->MVPMatrix = (*m.projection) * (*m.modelview);
|
||||||
prog->vec4Param("color") = color.toVector4();
|
prog->vec4Param("color") = color.toVector4();
|
||||||
prog->floatParam("radius") = cursorRadius;
|
prog->floatParam("radius") = cursorRadius;
|
||||||
prog->floatParam("width") = minCursorWidth * cursorGrow;
|
prog->floatParam("width") = minCursorWidth * cursorGrow;
|
||||||
|
|
|
@ -468,7 +468,7 @@ void Globular::renderGlobularPointSprites(
|
||||||
centerTex[ic]->bind();
|
centerTex[ic]->bind();
|
||||||
|
|
||||||
Matrix4f mvp = (*m.projection) * (*m.modelview);
|
Matrix4f mvp = (*m.projection) * (*m.modelview);
|
||||||
tidalProg->mat4Param("MVPMatrix") = mvp;
|
tidalProg->MVPMatrix = mvp;
|
||||||
|
|
||||||
Matrix3f viewMat = viewerOrientation.conjugate().toRotationMatrix();
|
Matrix3f viewMat = viewerOrientation.conjugate().toRotationMatrix();
|
||||||
tidalProg->vec4Param("color") = Vector4f(Rr, Gg, Bb, min(2 * brightness * pixelWeight, 1.0f));
|
tidalProg->vec4Param("color") = Vector4f(Rr, Gg, Bb, min(2 * brightness * pixelWeight, 1.0f));
|
||||||
|
@ -492,8 +492,8 @@ void Globular::renderGlobularPointSprites(
|
||||||
globProg->use();
|
globProg->use();
|
||||||
|
|
||||||
globularTex->bind();
|
globularTex->bind();
|
||||||
globProg->mat4Param("MVPMatrix") = mvp;
|
globProg->MVPMatrix = mvp;
|
||||||
globProg->mat4Param("ModelViewMatrix") = vecgl::translate(*m.modelview, offset);
|
globProg->ModelViewMatrix = vecgl::translate(*m.modelview, offset);
|
||||||
Matrix3f mx = Scaling(form->scale) * getOrientation().toRotationMatrix() * Scaling(tidalSize);
|
Matrix3f mx = Scaling(form->scale) * getOrientation().toRotationMatrix() * Scaling(tidalSize);
|
||||||
globProg->mat3Param("m") = mx;
|
globProg->mat3Param("m") = mx;
|
||||||
globProg->vec3Param("offset") = offset;
|
globProg->vec3Param("offset") = offset;
|
||||||
|
|
|
@ -68,16 +68,6 @@ GLShader::~GLShader()
|
||||||
|
|
||||||
//************* GLxxxProperty **********
|
//************* GLxxxProperty **********
|
||||||
|
|
||||||
FloatShaderParameter::FloatShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
FloatShaderParameter::FloatShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
FloatShaderParameter&
|
FloatShaderParameter&
|
||||||
FloatShaderParameter::operator=(float f)
|
FloatShaderParameter::operator=(float f)
|
||||||
{
|
{
|
||||||
|
@ -86,17 +76,6 @@ FloatShaderParameter::operator=(float f)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Vec3ShaderParameter::Vec3ShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec3ShaderParameter::Vec3ShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec3ShaderParameter&
|
Vec3ShaderParameter&
|
||||||
Vec3ShaderParameter::operator=(const Eigen::Vector3f& v)
|
Vec3ShaderParameter::operator=(const Eigen::Vector3f& v)
|
||||||
{
|
{
|
||||||
|
@ -105,16 +84,6 @@ Vec3ShaderParameter::operator=(const Eigen::Vector3f& v)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec4ShaderParameter::Vec4ShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec4ShaderParameter::Vec4ShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec4ShaderParameter&
|
Vec4ShaderParameter&
|
||||||
Vec4ShaderParameter::operator=(const Eigen::Vector4f& v)
|
Vec4ShaderParameter::operator=(const Eigen::Vector4f& v)
|
||||||
{
|
{
|
||||||
|
@ -123,17 +92,6 @@ Vec4ShaderParameter::operator=(const Eigen::Vector4f& v)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IntegerShaderParameter::IntegerShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
IntegerShaderParameter::IntegerShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
IntegerShaderParameter&
|
IntegerShaderParameter&
|
||||||
IntegerShaderParameter::operator=(int i)
|
IntegerShaderParameter::operator=(int i)
|
||||||
{
|
{
|
||||||
|
@ -142,17 +100,6 @@ IntegerShaderParameter::operator=(int i)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Mat3ShaderParameter::Mat3ShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat3ShaderParameter::Mat3ShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat3ShaderParameter&
|
Mat3ShaderParameter&
|
||||||
Mat3ShaderParameter::operator=(const Eigen::Matrix3f& v)
|
Mat3ShaderParameter::operator=(const Eigen::Matrix3f& v)
|
||||||
{
|
{
|
||||||
|
@ -161,17 +108,6 @@ Mat3ShaderParameter::operator=(const Eigen::Matrix3f& v)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Mat4ShaderParameter::Mat4ShaderParameter() :
|
|
||||||
slot(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat4ShaderParameter::Mat4ShaderParameter(GLuint obj, const char* name)
|
|
||||||
{
|
|
||||||
slot = glGetUniformLocation(obj, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat4ShaderParameter&
|
Mat4ShaderParameter&
|
||||||
Mat4ShaderParameter::operator=(const Eigen::Matrix4f& v)
|
Mat4ShaderParameter::operator=(const Eigen::Matrix4f& v)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,82 +84,79 @@ class GLProgram
|
||||||
friend class GLShaderLoader;
|
friend class GLShaderLoader;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ShaderParameter
|
||||||
class FloatShaderParameter
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FloatShaderParameter();
|
ShaderParameter() = default;
|
||||||
FloatShaderParameter(GLuint obj, const char* name);
|
~ShaderParameter() = default;
|
||||||
|
ShaderParameter(const ShaderParameter&) = default;
|
||||||
|
ShaderParameter(ShaderParameter&&) = default;
|
||||||
|
ShaderParameter& operator=(const ShaderParameter&) = default;
|
||||||
|
ShaderParameter& operator=(ShaderParameter&&) = default;
|
||||||
|
|
||||||
|
ShaderParameter(GLuint obj, const char* name)
|
||||||
|
{
|
||||||
|
slot = glGetUniformLocation(obj, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool valid() const noexcept
|
||||||
|
{
|
||||||
|
return slot != -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
operator bool() const noexcept
|
||||||
|
{
|
||||||
|
return valid();
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
int slot { -1 };
|
||||||
|
};
|
||||||
|
|
||||||
|
class FloatShaderParameter : public ShaderParameter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using ShaderParameter::ShaderParameter;
|
||||||
FloatShaderParameter& operator=(float);
|
FloatShaderParameter& operator=(float);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Vec3ShaderParameter
|
class Vec3ShaderParameter : public ShaderParameter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Vec3ShaderParameter();
|
using ShaderParameter::ShaderParameter;
|
||||||
Vec3ShaderParameter(GLuint obj, const char* name);
|
|
||||||
|
|
||||||
Vec3ShaderParameter& operator=(const Eigen::Vector3f&);
|
Vec3ShaderParameter& operator=(const Eigen::Vector3f&);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Vec4ShaderParameter
|
class Vec4ShaderParameter : public ShaderParameter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Vec4ShaderParameter();
|
using ShaderParameter::ShaderParameter;
|
||||||
Vec4ShaderParameter(GLuint obj, const char* name);
|
|
||||||
|
|
||||||
Vec4ShaderParameter& operator=(const Eigen::Vector4f&);
|
Vec4ShaderParameter& operator=(const Eigen::Vector4f&);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class IntegerShaderParameter
|
class IntegerShaderParameter : public ShaderParameter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IntegerShaderParameter();
|
using ShaderParameter::ShaderParameter;
|
||||||
IntegerShaderParameter(GLuint obj, const char* name);
|
|
||||||
|
|
||||||
IntegerShaderParameter& operator=(int);
|
IntegerShaderParameter& operator=(int);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Mat3ShaderParameter
|
class Mat3ShaderParameter : public ShaderParameter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Mat3ShaderParameter();
|
using ShaderParameter::ShaderParameter;
|
||||||
Mat3ShaderParameter(GLuint obj, const char* name);
|
|
||||||
|
|
||||||
Mat3ShaderParameter& operator=(const Eigen::Matrix3f&);
|
Mat3ShaderParameter& operator=(const Eigen::Matrix3f&);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Mat4ShaderParameter
|
class Mat4ShaderParameter : public ShaderParameter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Mat4ShaderParameter();
|
using ShaderParameter::ShaderParameter;
|
||||||
Mat4ShaderParameter(GLuint obj, const char* name);
|
|
||||||
|
|
||||||
Mat4ShaderParameter& operator=(const Eigen::Matrix4f&);
|
Mat4ShaderParameter& operator=(const Eigen::Matrix4f&);
|
||||||
|
|
||||||
private:
|
|
||||||
int slot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,10 @@ void PointStarVertexBuffer::startSprites()
|
||||||
if (prog == nullptr)
|
if (prog == nullptr)
|
||||||
return;
|
return;
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->mat4Param("MVPMatrix") = renderer.getProjectionMatrix() * renderer.getModelViewMatrix();
|
prog->MVPMatrix = renderer.getProjectionMatrix() * renderer.getModelViewMatrix();
|
||||||
prog->samplerParam("starTex") = 0;
|
if (!starTexParam)
|
||||||
|
starTexParam = prog->samplerParam("starTex");
|
||||||
|
starTexParam = 0;
|
||||||
|
|
||||||
unsigned int stride = sizeof(StarVertex);
|
unsigned int stride = sizeof(StarVertex);
|
||||||
glEnableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
glEnableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
||||||
|
@ -106,7 +108,7 @@ void PointStarVertexBuffer::render()
|
||||||
glPointSize(1.0f);
|
glPointSize(1.0f);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glVertexAttribPointer(CelestiaGLProgram::VertexCoordAttributeIndex,
|
glVertexAttribPointer(CelestiaGLProgram::VertexCoordAttributeIndex,
|
||||||
3, GL_FLOAT, GL_FALSE,
|
3, GL_FLOAT, GL_FALSE,
|
||||||
stride, &vertices[0].position);
|
stride, &vertices[0].position);
|
||||||
glVertexAttribPointer(CelestiaGLProgram::ColorAttributeIndex,
|
glVertexAttribPointer(CelestiaGLProgram::ColorAttributeIndex,
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
#include "glshader.h"
|
||||||
|
|
||||||
class Color;
|
class Color;
|
||||||
class Renderer;
|
class Renderer;
|
||||||
|
@ -53,6 +54,7 @@ private:
|
||||||
StarVertex* vertices { nullptr };
|
StarVertex* vertices { nullptr };
|
||||||
Texture* texture { nullptr };
|
Texture* texture { nullptr };
|
||||||
bool useSprites { false };
|
bool useSprites { false };
|
||||||
|
IntegerShaderParameter starTexParam;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void PointStarVertexBuffer::addStar(const Eigen::Vector3f& pos,
|
inline void PointStarVertexBuffer::addStar(const Eigen::Vector3f& pos,
|
||||||
|
|
|
@ -577,7 +577,9 @@ GLSL_RenderContext::makeCurrent(const Material& m)
|
||||||
shadowBias.diagonal() = Vector4f(0.5f, 0.5f, 0.5f, 1.0f);
|
shadowBias.diagonal() = Vector4f(0.5f, 0.5f, 0.5f, 1.0f);
|
||||||
shadowBias.col(3) = Vector4f(0.5f, 0.5f, 0.5f, 1.0f);
|
shadowBias.col(3) = Vector4f(0.5f, 0.5f, 0.5f, 1.0f);
|
||||||
prog->ShadowMatrix0 = shadowBias * (*lightMatrix);
|
prog->ShadowMatrix0 = shadowBias * (*lightMatrix);
|
||||||
prog->floatParam("shadowMapSize") = static_cast<float>(shadowMapWidth);
|
if (!shadowMapSizeParam)
|
||||||
|
shadowMapSizeParam = prog->floatParam("shadowMapSize");
|
||||||
|
shadowMapSizeParam = static_cast<float>(shadowMapWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
// setLightParameters() expects opacity in the alpha channel of the diffuse color
|
// setLightParameters() expects opacity in the alpha channel of the diffuse color
|
||||||
|
|
|
@ -120,6 +120,7 @@ class GLSL_RenderContext : public RenderContext
|
||||||
const Eigen::Matrix4f *lightMatrix { nullptr };
|
const Eigen::Matrix4f *lightMatrix { nullptr };
|
||||||
GLuint shadowMap { 0 };
|
GLuint shadowMap { 0 };
|
||||||
GLuint shadowMapWidth { 0 };
|
GLuint shadowMapWidth { 0 };
|
||||||
|
FloatShaderParameter shadowMapSizeParam;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1799,7 +1799,7 @@ void renderPoint(const Renderer &renderer,
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->samplerParam("starTex") = 0;
|
prog->samplerParam("starTex") = 0;
|
||||||
prog->mat4Param("MVPMatrix") = (*m.projection) * (*m.modelview);
|
prog->MVPMatrix = (*m.projection) * (*m.modelview);
|
||||||
|
|
||||||
#ifndef GL_ES
|
#ifndef GL_ES
|
||||||
glEnable(GL_POINT_SPRITE);
|
glEnable(GL_POINT_SPRITE);
|
||||||
|
@ -3687,7 +3687,7 @@ void Renderer::renderCometTail(const Body& body,
|
||||||
setBlendingFactors(GL_SRC_ALPHA, GL_ONE);
|
setBlendingFactors(GL_SRC_ALPHA, GL_ONE);
|
||||||
|
|
||||||
prog->use();
|
prog->use();
|
||||||
prog->mat4Param("MVPMatrix") = (*m.projection) * (*m.modelview) * vecgl::translate(pos);
|
prog->MVPMatrix = (*m.projection) * (*m.modelview) * vecgl::translate(pos);
|
||||||
|
|
||||||
glEnableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
glEnableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
||||||
glEnableVertexAttribArray(CelestiaGLProgram::NormalAttributeIndex);
|
glEnableVertexAttribArray(CelestiaGLProgram::NormalAttributeIndex);
|
||||||
|
|
|
@ -943,7 +943,7 @@ void renderGeometryShadow_GLSL(Geometry* geometry,
|
||||||
Matrix4f projMat = Ortho(-1.f, 1.f, -1.f, 1.f, -1.f, 1.f);
|
Matrix4f projMat = Ortho(-1.f, 1.f, -1.f, 1.f, -1.f, 1.f);
|
||||||
Matrix4f modelViewMat = directionalLightMatrix(ls.lights[lightIndex].direction_obj);
|
Matrix4f modelViewMat = directionalLightMatrix(ls.lights[lightIndex].direction_obj);
|
||||||
*lightMatrix = projMat * modelViewMat;
|
*lightMatrix = projMat * modelViewMat;
|
||||||
prog->mat4Param("MVPMatrix") = *lightMatrix;
|
prog->MVPMatrix = *lightMatrix;
|
||||||
|
|
||||||
geometry->render(rc, tsec);
|
geometry->render(rc, tsec);
|
||||||
|
|
||||||
|
|
|
@ -3352,6 +3352,7 @@ CelestiaGLProgram::CelestiaGLProgram(GLProgram& _program,
|
||||||
CelestiaGLProgram::CelestiaGLProgram(GLProgram& _program) :
|
CelestiaGLProgram::CelestiaGLProgram(GLProgram& _program) :
|
||||||
program(&_program)
|
program(&_program)
|
||||||
{
|
{
|
||||||
|
initCommonParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
CelestiaGLProgram::~CelestiaGLProgram()
|
CelestiaGLProgram::~CelestiaGLProgram()
|
||||||
|
@ -3417,10 +3418,17 @@ CelestiaGLProgram::attribIndex(const std::string& paramName) const
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CelestiaGLProgram::initParameters()
|
CelestiaGLProgram::initCommonParameters()
|
||||||
{
|
{
|
||||||
ModelViewMatrix = mat4Param("ModelViewMatrix");
|
ModelViewMatrix = mat4Param("ModelViewMatrix");
|
||||||
MVPMatrix = mat4Param("MVPMatrix");
|
MVPMatrix = mat4Param("MVPMatrix");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
CelestiaGLProgram::initParameters()
|
||||||
|
{
|
||||||
|
initCommonParameters();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < props.nLights; i++)
|
for (unsigned int i = 0; i < props.nLights; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -270,6 +270,7 @@ class CelestiaGLProgram
|
||||||
int attribIndex(const std::string&) const;
|
int attribIndex(const std::string&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void initCommonParameters();
|
||||||
void initParameters();
|
void initParameters();
|
||||||
void initSamplers();
|
void initSamplers();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue