mirror of
https://github.com/lubosz/overte.git
synced 2025-04-15 12:29:06 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into render
This commit is contained in:
commit
26c7d63ee3
7 changed files with 20 additions and 10 deletions
|
@ -556,6 +556,7 @@ void DomainServer::populateDefaultStaticAssignmentsExcludingTypes(const QSet<Ass
|
|||
if (!excludedTypes.contains(defaultedType)
|
||||
&& defaultedType != Assignment::UNUSED_0
|
||||
&& defaultedType != Assignment::UNUSED_1
|
||||
&& defaultedType != Assignment::UNUSED_2
|
||||
&& defaultedType != Assignment::AgentType) {
|
||||
// type has not been set from a command line or config file config, use the default
|
||||
// by clearing whatever exists and writing a single default assignment with no payload
|
||||
|
|
|
@ -253,6 +253,8 @@ inline void EntityItemProperties::setPosition(const glm::vec3& value)
|
|||
|
||||
inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
|
||||
debug << "EntityItemProperties[" << "\n";
|
||||
|
||||
debug << " _type:" << properties.getType() << "\n";
|
||||
|
||||
// TODO: figure out why position and animationSettings don't seem to like the macro approach
|
||||
if (properties.containsPositionChange()) {
|
||||
|
|
|
@ -332,10 +332,12 @@
|
|||
T _##n; \
|
||||
bool _##n##Changed;
|
||||
|
||||
#define DEBUG_PROPERTY(D, P, N, n, x) \
|
||||
D << " " << #n << ":" << P.get##N() << x << "[changed:" << P.n##Changed() << "]\n";
|
||||
|
||||
#define DEBUG_PROPERTY_IF_CHANGED(D, P, N, n, x) \
|
||||
if (P.n##Changed()) { \
|
||||
D << " " << #n << ":" << P.get##N() << x << "\n"; \
|
||||
}
|
||||
|
||||
|
||||
#endif // hifi_EntityItemPropertiesMacros_h
|
||||
|
|
|
@ -201,7 +201,7 @@ EntityItem* EntityTree::addEntity(const EntityItemID& entityID, const EntityItem
|
|||
// construct the instance of the entity
|
||||
EntityTypes::EntityType type = properties.getType();
|
||||
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
||||
|
||||
|
||||
if (result) {
|
||||
if (recordCreationTime) {
|
||||
result->recordCreationTime();
|
||||
|
|
|
@ -77,7 +77,9 @@ EntityItem* EntityTypes::constructEntityItem(EntityType entityType, const Entity
|
|||
factory = _factories[entityType];
|
||||
}
|
||||
if (factory) {
|
||||
newEntityItem = factory(entityID, properties);
|
||||
EntityItemProperties mutableProperties = properties;
|
||||
mutableProperties.markAllChanged();
|
||||
newEntityItem = factory(entityID, mutableProperties);
|
||||
}
|
||||
return newEntityItem;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,8 @@ vec4 transformModelToClipPos(TransformCamera camera, TransformObject object, vec
|
|||
return camera._projectionViewUntranslated * epos;
|
||||
// Equivalent to the following but hoppefully a bit more accurate
|
||||
// return camera._projection * camera._view * object._model * pos;
|
||||
|
||||
<@else@>
|
||||
return gl_ModelViewProjectionMatrix * pos;
|
||||
<@endif@>
|
||||
}
|
||||
|
||||
|
@ -50,6 +51,8 @@ vec3 transformModelToEyeDir(TransformCamera camera, TransformObject object, vec3
|
|||
vec3 result = vec3(dot(mvc0, dir), dot(mvc1, dir), dot(mvc2, dir));
|
||||
|
||||
return result;
|
||||
<@else@>
|
||||
return gl_NormalMatrix * dir;
|
||||
<@endif@>
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
int vertices = slices * (stacks - 1) + 2;
|
||||
int indices = slices * (stacks - 1) * NUM_VERTICES_PER_TRIANGULATED_QUAD;
|
||||
|
||||
if (registered && (!_registeredSphereVertices.contains(id) || _lastRegisteredSphereVertices[id] != radiusKey)
|
||||
|| !registered && !_sphereVertices.contains(radiusKey)) {
|
||||
if ((registered && (!_registeredSphereVertices.contains(id) || _lastRegisteredSphereVertices[id] != radiusKey))
|
||||
|| (!registered && !_sphereVertices.contains(radiusKey))) {
|
||||
|
||||
if (registered && _registeredSphereVertices.contains(id)) {
|
||||
_registeredSphereVertices[id].clear();
|
||||
|
@ -127,8 +127,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
}
|
||||
#endif
|
||||
|
||||
if (registered && (!_registeredSphereIndices.contains(id) || _lastRegisteredSphereIndices[id] != slicesStacksKey)
|
||||
|| !registered && !_sphereIndices.contains(slicesStacksKey)) {
|
||||
if ((registered && (!_registeredSphereIndices.contains(id) || _lastRegisteredSphereIndices[id] != slicesStacksKey))
|
||||
|| (!registered && !_sphereIndices.contains(slicesStacksKey))) {
|
||||
|
||||
if (registered && _registeredSphereIndices.contains(id)) {
|
||||
_registeredSphereIndices[id].clear();
|
||||
|
@ -213,8 +213,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
}
|
||||
#endif
|
||||
|
||||
if (registered && (!_registeredSphereColors.contains(id) || _lastRegisteredSphereColors[id] != colorKey)
|
||||
|| !registered && !_sphereColors.contains(colorKey)) {
|
||||
if ((registered && (!_registeredSphereColors.contains(id) || _lastRegisteredSphereColors[id] != colorKey))
|
||||
|| (!registered && !_sphereColors.contains(colorKey))) {
|
||||
|
||||
if (registered && _registeredSphereColors.contains(id)) {
|
||||
_registeredSphereColors[id].clear();
|
||||
|
|
Loading…
Reference in a new issue