removed extra argument

This commit is contained in:
SamGondelman 2016-06-10 14:04:33 -07:00
parent f32e29ac2d
commit 53435fc730
4 changed files with 4 additions and 6 deletions
libraries

View file

@ -98,7 +98,7 @@ void RenderableShapeEntityItem::render(RenderArgs* args) {
}
batch.setModelTransform(modelTransform); // use a transform with scale, rotation, registration point and translation
if (_procedural->ready()) {
_procedural->prepare(batch, getPosition(), getDimensions(), getOrientation(), args->getViewFrustum().getPosition());
_procedural->prepare(batch, getPosition(), getDimensions(), getOrientation());
auto outColor = _procedural->getColor(color);
batch._glColor4f(outColor.r, outColor.g, outColor.b, outColor.a);
DependencyManager::get<GeometryCache>()->renderShape(batch, MAPPING[_shape]);

View file

@ -203,11 +203,10 @@ bool Procedural::ready() {
return true;
}
void Procedural::prepare(gpu::Batch& batch, const glm::vec3& position, const glm::vec3& size, const glm::quat& orientation, const glm::vec3& eyePos) {
void Procedural::prepare(gpu::Batch& batch, const glm::vec3& position, const glm::vec3& size, const glm::quat& orientation) {
_entityDimensions = size;
_entityPosition = position;
_entityOrientation = glm::mat3_cast(orientation);
_eyePos = eyePos;
if (_shaderUrl.isLocalFile()) {
auto lastModified = (quint64)QFileInfo(_shaderPath).lastModified().toMSecsSinceEpoch();
if (lastModified > _shaderModified) {

View file

@ -38,7 +38,7 @@ public:
void parse(const QString& userDataJson);
bool ready();
void prepare(gpu::Batch& batch, const glm::vec3& position, const glm::vec3& size, const glm::quat& orientation, const glm::vec3& eyePos);
void prepare(gpu::Batch& batch, const glm::vec3& position, const glm::vec3& size, const glm::quat& orientation);
const gpu::ShaderPointer& getShader() const { return _shader; }
glm::vec4 getColor(const glm::vec4& entityColor);
@ -95,7 +95,6 @@ protected:
glm::vec3 _entityDimensions;
glm::vec3 _entityPosition;
glm::mat3 _entityOrientation;
glm::vec3 _eyePos;
private:
// This should only be called from the render thread, as it shares data with Procedural::prepare

View file

@ -52,7 +52,7 @@ void ProceduralSkybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum,
batch.setModelTransform(Transform()); // only for Mac
auto& procedural = skybox._procedural;
procedural.prepare(batch, glm::vec3(0), glm::vec3(1), glm::quat(), glm::vec3(0));
procedural.prepare(batch, glm::vec3(0), glm::vec3(1), glm::quat());
auto textureSlot = procedural.getShader()->getTextures().findLocation("cubeMap");
auto bufferSlot = procedural.getShader()->getBuffers().findLocation("skyboxBuffer");
skybox.prepare(batch, textureSlot, bufferSlot);