mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-05 00:58:53 +02:00
fix some lingering warnings
This commit is contained in:
parent
09e2c0987e
commit
471e55c8ce
6 changed files with 48 additions and 52 deletions
|
@ -2739,7 +2739,6 @@ const GLfloat WORLD_DIFFUSE_COLOR[] = { 0.6f, 0.525f, 0.525f };
|
||||||
const GLfloat WORLD_SPECULAR_COLOR[] = { 0.94f, 0.94f, 0.737f, 1.0f };
|
const GLfloat WORLD_SPECULAR_COLOR[] = { 0.94f, 0.94f, 0.737f, 1.0f };
|
||||||
|
|
||||||
const glm::vec3 GLOBAL_LIGHT_COLOR = { 0.6f, 0.525f, 0.525f };
|
const glm::vec3 GLOBAL_LIGHT_COLOR = { 0.6f, 0.525f, 0.525f };
|
||||||
const float GLOBAL_LIGHT_INTENSITY = 1.0f;
|
|
||||||
|
|
||||||
void Application::setupWorldLight() {
|
void Application::setupWorldLight() {
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,6 @@ using namespace std;
|
||||||
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
|
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
|
||||||
const float YAW_SPEED = 500.0f; // degrees/sec
|
const float YAW_SPEED = 500.0f; // degrees/sec
|
||||||
const float PITCH_SPEED = 100.0f; // degrees/sec
|
const float PITCH_SPEED = 100.0f; // degrees/sec
|
||||||
const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions
|
|
||||||
const float COLLISION_RADIUS_SCALE = 0.125f;
|
|
||||||
const float DEFAULT_REAL_WORLD_FIELD_OF_VIEW_DEGREES = 30.0f;
|
const float DEFAULT_REAL_WORLD_FIELD_OF_VIEW_DEGREES = 30.0f;
|
||||||
|
|
||||||
const float MAX_WALKING_SPEED = 2.5f; // human walking speed
|
const float MAX_WALKING_SPEED = 2.5f; // human walking speed
|
||||||
|
|
|
@ -791,8 +791,6 @@ void SkeletonModel::renderBoundingCollisionShapes(float alpha) {
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
const int BALL_SUBDIVISIONS = 10;
|
|
||||||
|
|
||||||
bool SkeletonModel::hasSkeleton() {
|
bool SkeletonModel::hasSkeleton() {
|
||||||
return isActive() ? _geometry->getFBXGeometry().rootJointIndex != -1 : false;
|
return isActive() ? _geometry->getFBXGeometry().rootJointIndex != -1 : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ LightEntityItem::LightEntityItem(const EntityItemID& entityItemID, const EntityI
|
||||||
_type = EntityTypes::Light;
|
_type = EntityTypes::Light;
|
||||||
|
|
||||||
// default property values
|
// default property values
|
||||||
const quint8 MAX_COLOR = 255;
|
|
||||||
_color[RED_INDEX] = _color[GREEN_INDEX] = _color[BLUE_INDEX] = 0;
|
_color[RED_INDEX] = _color[GREEN_INDEX] = _color[BLUE_INDEX] = 0;
|
||||||
_intensity = 1.0f;
|
_intensity = 1.0f;
|
||||||
_exponent = 0.0f;
|
_exponent = 0.0f;
|
||||||
|
|
|
@ -134,55 +134,55 @@ void EarthSunModel::setSunLongitude(float lon) {
|
||||||
_sunLongitude = validateLongitude(lon);
|
_sunLongitude = validateLongitude(lon);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
Atmosphere::Atmosphere() {
|
Atmosphere::Atmosphere() {
|
||||||
// only if created from nothing shall we create the Buffer to store the properties
|
// only if created from nothing shall we create the Buffer to store the properties
|
||||||
Data data;
|
Data data;
|
||||||
_dataBuffer = gpu::BufferView(new gpu::Buffer(sizeof(Data), (const gpu::Buffer::Byte*) &data));
|
_dataBuffer = gpu::BufferView(new gpu::Buffer(sizeof(Data), (const gpu::Buffer::Byte*) &data));
|
||||||
|
|
||||||
setScatteringWavelength(_scatteringWavelength);
|
setScatteringWavelength(_scatteringWavelength);
|
||||||
setRayleighScattering(_rayleighScattering);
|
setRayleighScattering(_rayleighScattering);
|
||||||
setInnerOuterRadiuses(getInnerRadius(), getOuterRadius());
|
setInnerOuterRadiuses(getInnerRadius(), getOuterRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Atmosphere::setScatteringWavelength(Vec3 wavelength) {
|
void Atmosphere::setScatteringWavelength(Vec3 wavelength) {
|
||||||
_scatteringWavelength = wavelength;
|
_scatteringWavelength = wavelength;
|
||||||
Data& data = editData();
|
Data& data = editData();
|
||||||
data._invWaveLength = Vec4(1.0f / powf(wavelength.x, 4.0f), 1.0f / powf(wavelength.y, 4.0f), 1.0f / powf(wavelength.z, 4.0f), 0.0f);
|
data._invWaveLength = Vec4(1.0f / powf(wavelength.x, 4.0f), 1.0f / powf(wavelength.y, 4.0f), 1.0f / powf(wavelength.z, 4.0f), 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Atmosphere::setRayleighScattering(float scattering) {
|
|
||||||
_rayleighScattering = scattering;
|
|
||||||
updateScattering();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Atmosphere::setMieScattering(float scattering) {
|
|
||||||
_mieScattering = scattering;
|
|
||||||
updateScattering();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Atmosphere::setSunBrightness(float brightness) {
|
|
||||||
_sunBrightness = brightness;
|
|
||||||
updateScattering();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Atmosphere::updateScattering() {
|
void Atmosphere::setRayleighScattering(float scattering) {
|
||||||
Data& data = editData();
|
_rayleighScattering = scattering;
|
||||||
|
updateScattering();
|
||||||
data._scatterings.x = getRayleighScattering() * getSunBrightness();
|
}
|
||||||
data._scatterings.y = getMieScattering() * getSunBrightness();
|
|
||||||
|
|
||||||
data._scatterings.z = getRayleighScattering() * 4.0f * glm::pi<float>();
|
|
||||||
data._scatterings.w = getMieScattering() * 4.0f * glm::pi<float>();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Atmosphere::setInnerOuterRadiuses(float inner, float outer) {
|
void Atmosphere::setMieScattering(float scattering) {
|
||||||
Data& data = editData();
|
_mieScattering = scattering;
|
||||||
data._radiuses.x = inner;
|
updateScattering();
|
||||||
data._radiuses.y = outer;
|
}
|
||||||
data._scales.x = 1.0f / (outer - inner);
|
|
||||||
data._scales.z = data._scales.x / data._scales.y;
|
void Atmosphere::setSunBrightness(float brightness) {
|
||||||
}
|
_sunBrightness = brightness;
|
||||||
|
updateScattering();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Atmosphere::updateScattering() {
|
||||||
|
Data& data = editData();
|
||||||
|
|
||||||
|
data._scatterings.x = getRayleighScattering() * getSunBrightness();
|
||||||
|
data._scatterings.y = getMieScattering() * getSunBrightness();
|
||||||
|
|
||||||
|
data._scatterings.z = getRayleighScattering() * 4.0f * glm::pi<float>();
|
||||||
|
data._scatterings.w = getMieScattering() * 4.0f * glm::pi<float>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Atmosphere::setInnerOuterRadiuses(float inner, float outer) {
|
||||||
|
Data& data = editData();
|
||||||
|
data._radiuses.x = inner;
|
||||||
|
data._radiuses.y = outer;
|
||||||
|
data._scales.x = 1.0f / (outer - inner);
|
||||||
|
data._scales.z = data._scales.x / data._scales.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const int NUM_DAYS_PER_YEAR = 365;
|
const int NUM_DAYS_PER_YEAR = 365;
|
||||||
|
@ -267,7 +267,7 @@ void SunSkyStage::updateGraphicsObject() const {
|
||||||
static int firstTime = 0;
|
static int firstTime = 0;
|
||||||
if (firstTime == 0) {
|
if (firstTime == 0) {
|
||||||
firstTime++;
|
firstTime++;
|
||||||
bool result = gpu::Shader::makeProgram(*(_skyPipeline->getProgram()));
|
gpu::Shader::makeProgram(*(_skyPipeline->getProgram()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,11 @@ using namespace meshinfo;
|
||||||
//origin is the default reference point for generating the tetrahedron from each triangle of the mesh.
|
//origin is the default reference point for generating the tetrahedron from each triangle of the mesh.
|
||||||
|
|
||||||
MeshInfo::MeshInfo(vector<Vertex> *vertices, vector<int> *triangles) :\
|
MeshInfo::MeshInfo(vector<Vertex> *vertices, vector<int> *triangles) :\
|
||||||
_vertices(vertices),
|
_vertices(vertices),
|
||||||
_triangles(triangles),
|
_centerOfMass(Vertex(0.0, 0.0, 0.0)),
|
||||||
_centerOfMass(Vertex(0.0, 0.0, 0.0)){
|
_triangles(triangles)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshInfo::~MeshInfo(){
|
MeshInfo::~MeshInfo(){
|
||||||
|
|
Loading…
Reference in a new issue