mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
commit
b84302a44a
4 changed files with 11 additions and 10 deletions
|
@ -155,9 +155,9 @@ void ParticleEffectEntityItem::computeAndUpdateDimensions() {
|
||||||
float yMin = std::min(yApex, yEnd);
|
float yMin = std::min(yApex, yEnd);
|
||||||
|
|
||||||
// times 2 because dimensions are diameters not radii.
|
// times 2 because dimensions are diameters not radii.
|
||||||
glm::vec3 dims(2.0f * std::max(fabs(xMin), fabs(xMax)),
|
glm::vec3 dims(2.0f * std::max(fabsf(xMin), fabsf(xMax)),
|
||||||
2.0f * std::max(fabs(yMin), fabs(yMax)),
|
2.0f * std::max(fabsf(yMin), fabsf(yMax)),
|
||||||
2.0f * std::max(fabs(zMin), fabs(zMax)));
|
2.0f * std::max(fabsf(zMin), fabsf(zMax)));
|
||||||
|
|
||||||
EntityItem::setDimensions(dims);
|
EntityItem::setDimensions(dims);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "Batch.h"
|
#include "Batch.h"
|
||||||
|
|
||||||
#if defined(NSIGHT_FOUND)
|
#if defined(NSIGHT_FOUND)
|
||||||
|
|
|
@ -639,14 +639,13 @@ int makeUniformBlockSlots(GLuint glprogram, const Shader::BindingSet& slotBindin
|
||||||
GLchar name[NAME_LENGTH];
|
GLchar name[NAME_LENGTH];
|
||||||
GLint length = 0;
|
GLint length = 0;
|
||||||
GLint size = 0;
|
GLint size = 0;
|
||||||
GLenum type = 0;
|
|
||||||
GLint binding = -1;
|
GLint binding = -1;
|
||||||
|
|
||||||
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_NAME_LENGTH, &length);
|
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_NAME_LENGTH, &length);
|
||||||
glGetActiveUniformBlockName(glprogram, i, NAME_LENGTH, &length, name);
|
glGetActiveUniformBlockName(glprogram, i, NAME_LENGTH, &length, name);
|
||||||
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_BINDING, &binding);
|
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_BINDING, &binding);
|
||||||
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_DATA_SIZE, &size);
|
glGetActiveUniformBlockiv(glprogram, i, GL_UNIFORM_BLOCK_DATA_SIZE, &size);
|
||||||
|
|
||||||
GLuint blockIndex = glGetUniformBlockIndex(glprogram, name);
|
GLuint blockIndex = glGetUniformBlockIndex(glprogram, name);
|
||||||
|
|
||||||
// CHeck if there is a requested binding for this block
|
// CHeck if there is a requested binding for this block
|
||||||
|
|
|
@ -482,15 +482,15 @@ void GLBackend::syncPipelineStateCache() {
|
||||||
State::Data state;
|
State::Data state;
|
||||||
|
|
||||||
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
||||||
|
|
||||||
// Point size is always on
|
// Point size is always on
|
||||||
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
|
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
|
||||||
glEnable(GL_PROGRAM_POINT_SIZE_EXT);
|
glEnable(GL_PROGRAM_POINT_SIZE_EXT);
|
||||||
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||||
|
|
||||||
getCurrentGLState(state);
|
getCurrentGLState(state);
|
||||||
State::Signature signature = State::evalSignature(state);
|
State::Signature signature = State::evalSignature(state);
|
||||||
|
|
||||||
_pipeline._stateCache = state;
|
_pipeline._stateCache = state;
|
||||||
_pipeline._stateSignatureCache = signature;
|
_pipeline._stateSignatureCache = signature;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue