mirror of
https://github.com/overte-org/overte.git
synced 2025-07-29 04:21:22 +02:00
merge upstream/master into andrew/thermonuclear
This commit is contained in:
commit
9f59addbc2
16 changed files with 81 additions and 204 deletions
|
@ -125,6 +125,6 @@ if (NOT ANDROID)
|
||||||
add_subdirectory(interface)
|
add_subdirectory(interface)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
else ()
|
elseif (ANDROID OR DESKTOP_GVR)
|
||||||
add_subdirectory(gvr-interface)
|
add_subdirectory(gvr-interface)
|
||||||
endif ()
|
endif ()
|
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
"name": "access_token",
|
"name": "access_token",
|
||||||
"label": "Access Token",
|
"label": "Access Token",
|
||||||
"help": "This is an access token generated on the <a href='https://data.highfidelity.io/user/security' target='_blank'>My Security</a> page of your High Fidelity account.<br/>Generate a token with the 'domains' scope and paste it here.<br/>This is required to associate this domain-server with a domain in your account."
|
"help": "This is an access token generated on the <a href='https://metaverse.highfidelity.io/user/security' target='_blank'>My Security</a> page of your High Fidelity account.<br/>Generate a token with the 'domains' scope and paste it here.<br/>This is required to associate this domain-server with a domain in your account."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "disabled",
|
"value": "disabled",
|
||||||
"label": "None: use the network information I have entered for this domain at data.highfidelity.io"
|
"label": "None: use the network information I have entered for this domain at metaverse.highfidelity.io"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -652,7 +652,7 @@ function chooseFromHighFidelityDomains(clickedButton) {
|
||||||
clickedButton.attr('disabled', 'disabled')
|
clickedButton.attr('disabled', 'disabled')
|
||||||
|
|
||||||
// get a list of user domains from data-web
|
// get a list of user domains from data-web
|
||||||
data_web_domains_url = "https://data.highfidelity.io/api/v1/domains?access_token="
|
data_web_domains_url = "https://metaverse.highfidelity.io/api/v1/domains?access_token="
|
||||||
$.getJSON(data_web_domains_url + Settings.initialValues.metaverse.access_token, function(data){
|
$.getJSON(data_web_domains_url + Settings.initialValues.metaverse.access_token, function(data){
|
||||||
|
|
||||||
modal_buttons = {
|
modal_buttons = {
|
||||||
|
@ -682,7 +682,7 @@ function chooseFromHighFidelityDomains(clickedButton) {
|
||||||
modal_buttons["success"] = {
|
modal_buttons["success"] = {
|
||||||
label: 'Create new domain',
|
label: 'Create new domain',
|
||||||
callback: function() {
|
callback: function() {
|
||||||
window.open("https://data.highfidelity.io/user/domains", '_blank');
|
window.open("https://metaverse.highfidelity.io/user/domains", '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modal_body = "<p>You do not have any domains in your High Fidelity account." +
|
modal_body = "<p>You do not have any domains in your High Fidelity account." +
|
||||||
|
|
|
@ -245,7 +245,7 @@ var toolBar = (function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
var RESIZE_INTERVAL = 50;
|
var RESIZE_INTERVAL = 50;
|
||||||
var RESIZE_TIMEOUT = 20000;
|
var RESIZE_TIMEOUT = 120000; // 2 minutes
|
||||||
var RESIZE_MAX_CHECKS = RESIZE_TIMEOUT / RESIZE_INTERVAL;
|
var RESIZE_MAX_CHECKS = RESIZE_TIMEOUT / RESIZE_INTERVAL;
|
||||||
function addModel(url) {
|
function addModel(url) {
|
||||||
var position;
|
var position;
|
||||||
|
|
|
@ -21,7 +21,7 @@ modelUploader = (function () {
|
||||||
//svoBuffer,
|
//svoBuffer,
|
||||||
mapping,
|
mapping,
|
||||||
geometry,
|
geometry,
|
||||||
API_URL = "https://data.highfidelity.io/api/v1/models",
|
API_URL = "https://metaverse.highfidelity.io/api/v1/models",
|
||||||
MODEL_URL = "http://public.highfidelity.io/models/content",
|
MODEL_URL = "http://public.highfidelity.io/models/content",
|
||||||
NAME_FIELD = "name",
|
NAME_FIELD = "name",
|
||||||
SCALE_FIELD = "scale",
|
SCALE_FIELD = "scale",
|
||||||
|
|
|
@ -152,7 +152,7 @@ var places = {};
|
||||||
|
|
||||||
function changeLobbyTextures() {
|
function changeLobbyTextures() {
|
||||||
var req = new XMLHttpRequest();
|
var req = new XMLHttpRequest();
|
||||||
req.open("GET", "https://data.highfidelity.io/api/v1/places?limit=21", false);
|
req.open("GET", "https://metaverse.highfidelity.io/api/v1/places?limit=21", false);
|
||||||
req.send();
|
req.send();
|
||||||
|
|
||||||
places = JSON.parse(req.responseText).data.places;
|
places = JSON.parse(req.responseText).data.places;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "ui_loginDialog.h"
|
#include "ui_loginDialog.h"
|
||||||
#include "LoginDialog.h"
|
#include "LoginDialog.h"
|
||||||
|
|
||||||
const QString FORGOT_PASSWORD_URL = "https://data.highfidelity.io/users/password/new";
|
const QString FORGOT_PASSWORD_URL = "https://metaverse.highfidelity.io/users/password/new";
|
||||||
|
|
||||||
LoginDialog::LoginDialog(QWidget* parent) :
|
LoginDialog::LoginDialog(QWidget* parent) :
|
||||||
FramelessDialog(parent, 0, FramelessDialog::POSITION_TOP),
|
FramelessDialog(parent, 0, FramelessDialog::POSITION_TOP),
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
<string><style type="text/css">
|
<string><style type="text/css">
|
||||||
a { text-decoration: none; color: #267077;}
|
a { text-decoration: none; color: #267077;}
|
||||||
</style>
|
</style>
|
||||||
Invalid username or password. <a href="https://data.highfidelity.io/password/new">Recover?</a></string>
|
Invalid username or password. <a href="https://metaverse.highfidelity.io/password/new">Recover?</a></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
@ -458,7 +458,7 @@ border-radius: 4px; padding-top: 1px;</string>
|
||||||
<string><style type="text/css">
|
<string><style type="text/css">
|
||||||
a { text-decoration: none; color: #267077;}
|
a { text-decoration: none; color: #267077;}
|
||||||
</style>
|
</style>
|
||||||
<a href="https://data.highfidelity.io/password/new">Recover password?</a></string>
|
<a href="https://metaverse.highfidelity.io/password/new">Recover password?</a></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -129,17 +129,7 @@ public:
|
||||||
void _glUniform1f(GLint location, GLfloat v0);
|
void _glUniform1f(GLint location, GLfloat v0);
|
||||||
void _glUniform2f(GLint location, GLfloat v0, GLfloat v1);
|
void _glUniform2f(GLint location, GLfloat v0, GLfloat v1);
|
||||||
void _glUniform4fv(GLint location, GLsizei count, const GLfloat* value);
|
void _glUniform4fv(GLint location, GLsizei count, const GLfloat* value);
|
||||||
void _glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
void _glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||||
|
|
||||||
void _glMatrixMode(GLenum mode);
|
|
||||||
void _glPushMatrix();
|
|
||||||
void _glPopMatrix();
|
|
||||||
void _glMultMatrixf(const GLfloat *m);
|
|
||||||
void _glLoadMatrixf(const GLfloat *m);
|
|
||||||
void _glLoadIdentity(void);
|
|
||||||
void _glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
void _glScalef(GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
void _glTranslatef(GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
|
|
||||||
void _glDrawArrays(GLenum mode, GLint first, GLsizei count);
|
void _glDrawArrays(GLenum mode, GLint first, GLsizei count);
|
||||||
void _glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
|
void _glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
|
||||||
|
@ -201,16 +191,6 @@ public:
|
||||||
COMMAND_glUniform4fv,
|
COMMAND_glUniform4fv,
|
||||||
COMMAND_glUniformMatrix4fv,
|
COMMAND_glUniformMatrix4fv,
|
||||||
|
|
||||||
COMMAND_glMatrixMode,
|
|
||||||
COMMAND_glPushMatrix,
|
|
||||||
COMMAND_glPopMatrix,
|
|
||||||
COMMAND_glMultMatrixf,
|
|
||||||
COMMAND_glLoadMatrixf,
|
|
||||||
COMMAND_glLoadIdentity,
|
|
||||||
COMMAND_glRotatef,
|
|
||||||
COMMAND_glScalef,
|
|
||||||
COMMAND_glTranslatef,
|
|
||||||
|
|
||||||
COMMAND_glDrawArrays,
|
COMMAND_glDrawArrays,
|
||||||
COMMAND_glDrawRangeElements,
|
COMMAND_glDrawRangeElements,
|
||||||
|
|
||||||
|
|
|
@ -54,16 +54,6 @@ GLBackend::CommandCall GLBackend::_commandCalls[Batch::NUM_COMMANDS] =
|
||||||
(&::gpu::GLBackend::do_glUniform4fv),
|
(&::gpu::GLBackend::do_glUniform4fv),
|
||||||
(&::gpu::GLBackend::do_glUniformMatrix4fv),
|
(&::gpu::GLBackend::do_glUniformMatrix4fv),
|
||||||
|
|
||||||
(&::gpu::GLBackend::do_glMatrixMode),
|
|
||||||
(&::gpu::GLBackend::do_glPushMatrix),
|
|
||||||
(&::gpu::GLBackend::do_glPopMatrix),
|
|
||||||
(&::gpu::GLBackend::do_glMultMatrixf),
|
|
||||||
(&::gpu::GLBackend::do_glLoadMatrixf),
|
|
||||||
(&::gpu::GLBackend::do_glLoadIdentity),
|
|
||||||
(&::gpu::GLBackend::do_glRotatef),
|
|
||||||
(&::gpu::GLBackend::do_glScalef),
|
|
||||||
(&::gpu::GLBackend::do_glTranslatef),
|
|
||||||
|
|
||||||
(&::gpu::GLBackend::do_glDrawArrays),
|
(&::gpu::GLBackend::do_glDrawArrays),
|
||||||
(&::gpu::GLBackend::do_glDrawRangeElements),
|
(&::gpu::GLBackend::do_glDrawRangeElements),
|
||||||
|
|
||||||
|
@ -747,127 +737,6 @@ void GLBackend::do_glUniformMatrix4fv(Batch& batch, uint32 paramOffset) {
|
||||||
CHECK_GL_ERROR();
|
CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glMatrixMode(GLenum mode) {
|
|
||||||
ADD_COMMAND_GL(glMatrixMode);
|
|
||||||
|
|
||||||
_params.push_back(mode);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glMatrixMode, 1);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glMatrixMode(Batch& batch, uint32 paramOffset) {
|
|
||||||
glMatrixMode(batch._params[paramOffset]._uint);
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glPushMatrix() {
|
|
||||||
ADD_COMMAND_GL(glPushMatrix);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glPushMatrix, 0);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glPushMatrix(Batch& batch, uint32 paramOffset) {
|
|
||||||
glPushMatrix();
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glPopMatrix() {
|
|
||||||
ADD_COMMAND_GL(glPopMatrix);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glPopMatrix, 0);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glPopMatrix(Batch& batch, uint32 paramOffset) {
|
|
||||||
glPopMatrix();
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glMultMatrixf(const GLfloat *m) {
|
|
||||||
ADD_COMMAND_GL(glMultMatrixf);
|
|
||||||
|
|
||||||
const int MATRIX4_SIZE = 16 * sizeof(float);
|
|
||||||
_params.push_back(cacheData(MATRIX4_SIZE, m));
|
|
||||||
|
|
||||||
DO_IT_NOW(_glMultMatrixf, 1);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glMultMatrixf(Batch& batch, uint32 paramOffset) {
|
|
||||||
glMultMatrixf((const GLfloat*)batch.editData(batch._params[paramOffset]._uint));
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glLoadMatrixf(const GLfloat *m) {
|
|
||||||
ADD_COMMAND_GL(glLoadMatrixf);
|
|
||||||
|
|
||||||
const int MATRIX4_SIZE = 16 * sizeof(float);
|
|
||||||
_params.push_back(cacheData(MATRIX4_SIZE, m));
|
|
||||||
|
|
||||||
DO_IT_NOW(_glLoadMatrixf, 1);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glLoadMatrixf(Batch& batch, uint32 paramOffset) {
|
|
||||||
glLoadMatrixf((const GLfloat*)batch.editData(batch._params[paramOffset]._uint));
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glLoadIdentity(void) {
|
|
||||||
ADD_COMMAND_GL(glLoadIdentity);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glLoadIdentity, 0);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glLoadIdentity(Batch& batch, uint32 paramOffset) {
|
|
||||||
glLoadIdentity();
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
|
|
||||||
ADD_COMMAND_GL(glRotatef);
|
|
||||||
|
|
||||||
_params.push_back(z);
|
|
||||||
_params.push_back(y);
|
|
||||||
_params.push_back(x);
|
|
||||||
_params.push_back(angle);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glRotatef, 4);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glRotatef(Batch& batch, uint32 paramOffset) {
|
|
||||||
glRotatef(
|
|
||||||
batch._params[paramOffset + 3]._float,
|
|
||||||
batch._params[paramOffset + 2]._float,
|
|
||||||
batch._params[paramOffset + 1]._float,
|
|
||||||
batch._params[paramOffset + 0]._float);
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glScalef(GLfloat x, GLfloat y, GLfloat z) {
|
|
||||||
ADD_COMMAND_GL(glScalef);
|
|
||||||
|
|
||||||
_params.push_back(z);
|
|
||||||
_params.push_back(y);
|
|
||||||
_params.push_back(x);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glScalef, 3);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glScalef(Batch& batch, uint32 paramOffset) {
|
|
||||||
glScalef(
|
|
||||||
batch._params[paramOffset + 2]._float,
|
|
||||||
batch._params[paramOffset + 1]._float,
|
|
||||||
batch._params[paramOffset + 0]._float);
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
|
|
||||||
ADD_COMMAND_GL(glTranslatef);
|
|
||||||
|
|
||||||
_params.push_back(z);
|
|
||||||
_params.push_back(y);
|
|
||||||
_params.push_back(x);
|
|
||||||
|
|
||||||
DO_IT_NOW(_glTranslatef, 3);
|
|
||||||
}
|
|
||||||
void GLBackend::do_glTranslatef(Batch& batch, uint32 paramOffset) {
|
|
||||||
glTranslatef(
|
|
||||||
batch._params[paramOffset + 2]._float,
|
|
||||||
batch._params[paramOffset + 1]._float,
|
|
||||||
batch._params[paramOffset + 0]._float);
|
|
||||||
CHECK_GL_ERROR();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Batch::_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
void Batch::_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
||||||
ADD_COMMAND_GL(glDrawArrays);
|
ADD_COMMAND_GL(glDrawArrays);
|
||||||
|
|
||||||
|
|
|
@ -175,17 +175,7 @@ protected:
|
||||||
void do_glUniform1f(Batch& batch, uint32 paramOffset);
|
void do_glUniform1f(Batch& batch, uint32 paramOffset);
|
||||||
void do_glUniform2f(Batch& batch, uint32 paramOffset);
|
void do_glUniform2f(Batch& batch, uint32 paramOffset);
|
||||||
void do_glUniform4fv(Batch& batch, uint32 paramOffset);
|
void do_glUniform4fv(Batch& batch, uint32 paramOffset);
|
||||||
void do_glUniformMatrix4fv(Batch& batch, uint32 paramOffset);
|
void do_glUniformMatrix4fv(Batch& batch, uint32 paramOffset);
|
||||||
|
|
||||||
void do_glMatrixMode(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glPushMatrix(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glPopMatrix(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glMultMatrixf(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glLoadMatrixf(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glLoadIdentity(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glRotatef(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glScalef(Batch& batch, uint32 paramOffset);
|
|
||||||
void do_glTranslatef(Batch& batch, uint32 paramOffset);
|
|
||||||
|
|
||||||
void do_glDrawArrays(Batch& batch, uint32 paramOffset);
|
void do_glDrawArrays(Batch& batch, uint32 paramOffset);
|
||||||
void do_glDrawRangeElements(Batch& batch, uint32 paramOffset);
|
void do_glDrawRangeElements(Batch& batch, uint32 paramOffset);
|
||||||
|
|
|
@ -36,7 +36,7 @@ const char SOLO_NODE_TYPES[2] = {
|
||||||
NodeType::AudioMixer
|
NodeType::AudioMixer
|
||||||
};
|
};
|
||||||
|
|
||||||
const QUrl DEFAULT_NODE_AUTH_URL = QUrl("https://data.highfidelity.io");
|
const QUrl DEFAULT_NODE_AUTH_URL = QUrl("https://metaverse.highfidelity.io");
|
||||||
|
|
||||||
LimitedNodeList::LimitedNodeList(unsigned short socketListenPort, unsigned short dtlsListenPort) :
|
LimitedNodeList::LimitedNodeList(unsigned short socketListenPort, unsigned short dtlsListenPort) :
|
||||||
_sessionUUID(),
|
_sessionUUID(),
|
||||||
|
|
|
@ -999,12 +999,12 @@ void GeometryCache::renderBevelCornersRect(int x, int y, int width, int height,
|
||||||
|
|
||||||
void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxCorner, const glm::vec4& color, int id) {
|
void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxCorner, const glm::vec4& color, int id) {
|
||||||
bool registered = (id != UNKNOWN_ID);
|
bool registered = (id != UNKNOWN_ID);
|
||||||
Vec2Pair key(minCorner, maxCorner);
|
Vec4Pair key(glm::vec4(minCorner.x, minCorner.y, maxCorner.x, maxCorner.y), color);
|
||||||
BatchItemDetails& details = registered ? _registeredQuad2D[id] : _quad2D[key];
|
BatchItemDetails& details = registered ? _registeredQuad2D[id] : _quad2D[key];
|
||||||
|
|
||||||
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
||||||
if (registered && details.isCreated) {
|
if (registered && details.isCreated) {
|
||||||
Vec2Pair& lastKey = _lastRegisteredQuad2D[id];
|
Vec4Pair & lastKey = _lastRegisteredQuad2D[id];
|
||||||
if (lastKey != key) {
|
if (lastKey != key) {
|
||||||
details.clear();
|
details.clear();
|
||||||
_lastRegisteredQuad2D[id] = key;
|
_lastRegisteredQuad2D[id] = key;
|
||||||
|
@ -1082,12 +1082,14 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC
|
||||||
const glm::vec4& color, int id) {
|
const glm::vec4& color, int id) {
|
||||||
|
|
||||||
bool registered = (id != UNKNOWN_ID);
|
bool registered = (id != UNKNOWN_ID);
|
||||||
Vec2PairPair key(Vec2Pair(minCorner, maxCorner), Vec2Pair(texCoordMinCorner, texCoordMaxCorner));
|
Vec4PairVec4 key(Vec4Pair(glm::vec4(minCorner.x, minCorner.y, maxCorner.x, maxCorner.y),
|
||||||
|
glm::vec4(texCoordMinCorner.x, texCoordMinCorner.y, texCoordMaxCorner.x, texCoordMaxCorner.y)),
|
||||||
|
color);
|
||||||
BatchItemDetails& details = registered ? _registeredQuad2DTextures[id] : _quad2DTextures[key];
|
BatchItemDetails& details = registered ? _registeredQuad2DTextures[id] : _quad2DTextures[key];
|
||||||
|
|
||||||
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
||||||
if (registered && details.isCreated) {
|
if (registered && details.isCreated) {
|
||||||
Vec2PairPair& lastKey = _lastRegisteredQuad2DTexture[id];
|
Vec4PairVec4& lastKey = _lastRegisteredQuad2DTexture[id];
|
||||||
if (lastKey != key) {
|
if (lastKey != key) {
|
||||||
details.clear();
|
details.clear();
|
||||||
_lastRegisteredQuad2DTexture[id] = key;
|
_lastRegisteredQuad2DTexture[id] = key;
|
||||||
|
@ -1172,12 +1174,12 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC
|
||||||
|
|
||||||
void GeometryCache::renderQuad(const glm::vec3& minCorner, const glm::vec3& maxCorner, const glm::vec4& color, int id) {
|
void GeometryCache::renderQuad(const glm::vec3& minCorner, const glm::vec3& maxCorner, const glm::vec4& color, int id) {
|
||||||
bool registered = (id != UNKNOWN_ID);
|
bool registered = (id != UNKNOWN_ID);
|
||||||
Vec3Pair key(minCorner, maxCorner);
|
Vec3PairVec4 key(Vec3Pair(minCorner, maxCorner), color);
|
||||||
BatchItemDetails& details = registered ? _registeredQuad3D[id] : _quad3D[key];
|
BatchItemDetails& details = registered ? _registeredQuad3D[id] : _quad3D[key];
|
||||||
|
|
||||||
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
// if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
|
||||||
if (registered && details.isCreated) {
|
if (registered && details.isCreated) {
|
||||||
Vec3Pair& lastKey = _lastRegisteredQuad3D[id];
|
Vec3PairVec4& lastKey = _lastRegisteredQuad3D[id];
|
||||||
if (lastKey != key) {
|
if (lastKey != key) {
|
||||||
details.clear();
|
details.clear();
|
||||||
_lastRegisteredQuad3D[id] = key;
|
_lastRegisteredQuad3D[id] = key;
|
||||||
|
@ -1753,15 +1755,18 @@ bool NetworkGeometry::isLoadedWithTextures() const {
|
||||||
if (!isLoaded()) {
|
if (!isLoaded()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach (const NetworkMesh& mesh, _meshes) {
|
if (!_isLoadedWithTextures) {
|
||||||
foreach (const NetworkMeshPart& part, mesh.parts) {
|
foreach (const NetworkMesh& mesh, _meshes) {
|
||||||
if ((part.diffuseTexture && !part.diffuseTexture->isLoaded()) ||
|
foreach (const NetworkMeshPart& part, mesh.parts) {
|
||||||
(part.normalTexture && !part.normalTexture->isLoaded()) ||
|
if ((part.diffuseTexture && !part.diffuseTexture->isLoaded()) ||
|
||||||
(part.specularTexture && !part.specularTexture->isLoaded()) ||
|
(part.normalTexture && !part.normalTexture->isLoaded()) ||
|
||||||
(part.emissiveTexture && !part.emissiveTexture->isLoaded())) {
|
(part.specularTexture && !part.specularTexture->isLoaded()) ||
|
||||||
return false;
|
(part.emissiveTexture && !part.emissiveTexture->isLoaded())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_isLoadedWithTextures = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1938,6 +1943,7 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u
|
||||||
// we don't have meshes downloaded yet, so hold this texture as pending
|
// we don't have meshes downloaded yet, so hold this texture as pending
|
||||||
_pendingTextureChanges.insert(name, url);
|
_pendingTextureChanges.insert(name, url);
|
||||||
}
|
}
|
||||||
|
_isLoadedWithTextures = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList NetworkGeometry::getTextureNames() const {
|
QStringList NetworkGeometry::getTextureNames() const {
|
||||||
|
|
|
@ -41,7 +41,9 @@ typedef QPair<Vec2Pair, Vec2Pair> Vec2PairPair;
|
||||||
typedef QPair<glm::vec3, glm::vec3> Vec3Pair;
|
typedef QPair<glm::vec3, glm::vec3> Vec3Pair;
|
||||||
typedef QPair<glm::vec4, glm::vec4> Vec4Pair;
|
typedef QPair<glm::vec4, glm::vec4> Vec4Pair;
|
||||||
typedef QPair<Vec3Pair, Vec2Pair> Vec3PairVec2Pair;
|
typedef QPair<Vec3Pair, Vec2Pair> Vec3PairVec2Pair;
|
||||||
|
typedef QPair<Vec3Pair, glm::vec4> Vec3PairVec4;
|
||||||
typedef QPair<Vec3Pair, Vec4Pair> Vec3PairVec4Pair;
|
typedef QPair<Vec3Pair, Vec4Pair> Vec3PairVec4Pair;
|
||||||
|
typedef QPair<Vec4Pair, glm::vec4> Vec4PairVec4;
|
||||||
typedef QPair<Vec4Pair, Vec4Pair> Vec4PairVec4Pair;
|
typedef QPair<Vec4Pair, Vec4Pair> Vec4PairVec4Pair;
|
||||||
|
|
||||||
inline uint qHash(const glm::vec2& v, uint seed) {
|
inline uint qHash(const glm::vec2& v, uint seed) {
|
||||||
|
@ -87,6 +89,14 @@ inline uint qHash(const Vec3PairVec2Pair& v, uint seed) {
|
||||||
5077 * v.second.second.x + 5081 * v.second.second.y, seed);
|
5077 * v.second.second.x + 5081 * v.second.second.y, seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline uint qHash(const Vec3PairVec4& v, uint seed) {
|
||||||
|
// multiply by prime numbers greater than the possible size
|
||||||
|
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z +
|
||||||
|
5021 * v.first.second.x + 5023 * v.first.second.y + 5039 * v.first.second.z +
|
||||||
|
5051 * v.second.x + 5059 * v.second.y + 5077 * v.second.z + 5081 * v.second.w, seed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline uint qHash(const Vec3PairVec4Pair& v, uint seed) {
|
inline uint qHash(const Vec3PairVec4Pair& v, uint seed) {
|
||||||
// multiply by prime numbers greater than the possible size
|
// multiply by prime numbers greater than the possible size
|
||||||
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z
|
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z
|
||||||
|
@ -96,6 +106,14 @@ inline uint qHash(const Vec3PairVec4Pair& v, uint seed) {
|
||||||
seed);
|
seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline uint qHash(const Vec4PairVec4& v, uint seed) {
|
||||||
|
// multiply by prime numbers greater than the possible size
|
||||||
|
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z + 5021 * v.first.first.w
|
||||||
|
+ 5023 * v.first.second.x + 5039 * v.first.second.y + 5051 * v.first.second.z + 5059 * v.first.second.w
|
||||||
|
+ 5077 * v.second.x + 5081 * v.second.y + 5087 * v.second.z + 5099 * v.second.w,
|
||||||
|
seed);
|
||||||
|
}
|
||||||
|
|
||||||
inline uint qHash(const Vec4PairVec4Pair& v, uint seed) {
|
inline uint qHash(const Vec4PairVec4Pair& v, uint seed) {
|
||||||
// multiply by prime numbers greater than the possible size
|
// multiply by prime numbers greater than the possible size
|
||||||
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z + 5021 * v.first.first.w
|
return qHash(v.first.first.x + 5009 * v.first.first.y + 5011 * v.first.first.z + 5021 * v.first.first.w
|
||||||
|
@ -236,16 +254,16 @@ private:
|
||||||
QHash<Vec3PairVec4Pair, BatchItemDetails> _quad3DTextures;
|
QHash<Vec3PairVec4Pair, BatchItemDetails> _quad3DTextures;
|
||||||
QHash<int, BatchItemDetails> _registeredQuad3DTextures;
|
QHash<int, BatchItemDetails> _registeredQuad3DTextures;
|
||||||
|
|
||||||
QHash<int, Vec2PairPair> _lastRegisteredQuad2DTexture;
|
QHash<int, Vec4PairVec4> _lastRegisteredQuad2DTexture;
|
||||||
QHash<Vec2PairPair, BatchItemDetails> _quad2DTextures;
|
QHash<Vec4PairVec4, BatchItemDetails> _quad2DTextures;
|
||||||
QHash<int, BatchItemDetails> _registeredQuad2DTextures;
|
QHash<int, BatchItemDetails> _registeredQuad2DTextures;
|
||||||
|
|
||||||
QHash<int, Vec3Pair> _lastRegisteredQuad3D;
|
QHash<int, Vec3PairVec4> _lastRegisteredQuad3D;
|
||||||
QHash<Vec3Pair, BatchItemDetails> _quad3D;
|
QHash<Vec3PairVec4, BatchItemDetails> _quad3D;
|
||||||
QHash<int, BatchItemDetails> _registeredQuad3D;
|
QHash<int, BatchItemDetails> _registeredQuad3D;
|
||||||
|
|
||||||
QHash<int, Vec2Pair> _lastRegisteredQuad2D;
|
QHash<int, Vec4Pair> _lastRegisteredQuad2D;
|
||||||
QHash<Vec2Pair, BatchItemDetails> _quad2D;
|
QHash<Vec4Pair, BatchItemDetails> _quad2D;
|
||||||
QHash<int, BatchItemDetails> _registeredQuad2D;
|
QHash<int, BatchItemDetails> _registeredQuad2D;
|
||||||
|
|
||||||
QHash<int, Vec3Pair> _lastRegisteredBevelRects;
|
QHash<int, Vec3Pair> _lastRegisteredBevelRects;
|
||||||
|
@ -339,6 +357,8 @@ private:
|
||||||
QHash<QWeakPointer<Animation>, QVector<int> > _jointMappings;
|
QHash<QWeakPointer<Animation>, QVector<int> > _jointMappings;
|
||||||
|
|
||||||
QHash<QString, QUrl> _pendingTextureChanges;
|
QHash<QString, QUrl> _pendingTextureChanges;
|
||||||
|
|
||||||
|
mutable bool _isLoadedWithTextures = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The state associated with a single mesh part.
|
/// The state associated with a single mesh part.
|
||||||
|
|
|
@ -686,7 +686,6 @@ bool Model::renderCore(float alpha, RenderMode mode, RenderArgs* args) {
|
||||||
// Let's introduce a gpu::Batch to capture all the calls to the graphics api
|
// Let's introduce a gpu::Batch to capture all the calls to the graphics api
|
||||||
_renderBatch.clear();
|
_renderBatch.clear();
|
||||||
gpu::Batch& batch = _renderBatch;
|
gpu::Batch& batch = _renderBatch;
|
||||||
GLBATCH(glPushMatrix)();
|
|
||||||
|
|
||||||
// Capture the view matrix once for the rendering of this model
|
// Capture the view matrix once for the rendering of this model
|
||||||
if (_transforms.empty()) {
|
if (_transforms.empty()) {
|
||||||
|
@ -835,12 +834,21 @@ bool Model::renderCore(float alpha, RenderMode mode, RenderArgs* args) {
|
||||||
GLBATCH(glBindBuffer)(GL_ELEMENT_ARRAY_BUFFER, 0);
|
GLBATCH(glBindBuffer)(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||||
GLBATCH(glBindTexture)(GL_TEXTURE_2D, 0);
|
GLBATCH(glBindTexture)(GL_TEXTURE_2D, 0);
|
||||||
|
|
||||||
GLBATCH(glPopMatrix)();
|
|
||||||
|
|
||||||
// Render!
|
// Render!
|
||||||
{
|
{
|
||||||
PROFILE_RANGE("render Batch");
|
PROFILE_RANGE("render Batch");
|
||||||
|
|
||||||
|
#if defined(ANDROID)
|
||||||
|
#else
|
||||||
|
glPushMatrix();
|
||||||
|
#endif
|
||||||
|
|
||||||
::gpu::GLBackend::renderBatch(batch);
|
::gpu::GLBackend::renderBatch(batch);
|
||||||
|
|
||||||
|
#if defined(ANDROID)
|
||||||
|
#else
|
||||||
|
glPopMatrix();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore all the default material settings
|
// restore all the default material settings
|
||||||
|
@ -1638,7 +1646,6 @@ void Model::startScene(RenderArgs::RenderSide renderSide) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::setupBatchTransform(gpu::Batch& batch) {
|
void Model::setupBatchTransform(gpu::Batch& batch) {
|
||||||
GLBATCH(glPushMatrix)();
|
|
||||||
|
|
||||||
// Capture the view matrix once for the rendering of this model
|
// Capture the view matrix once for the rendering of this model
|
||||||
if (_transforms.empty()) {
|
if (_transforms.empty()) {
|
||||||
|
@ -1811,7 +1818,17 @@ void Model::endScene(RenderMode mode, RenderArgs* args) {
|
||||||
// Render!
|
// Render!
|
||||||
{
|
{
|
||||||
PROFILE_RANGE("render Batch");
|
PROFILE_RANGE("render Batch");
|
||||||
|
#if defined(ANDROID)
|
||||||
|
#else
|
||||||
|
glPushMatrix();
|
||||||
|
#endif
|
||||||
|
|
||||||
::gpu::GLBackend::renderBatch(_sceneRenderBatch);
|
::gpu::GLBackend::renderBatch(_sceneRenderBatch);
|
||||||
|
|
||||||
|
#if defined(ANDROID)
|
||||||
|
#else
|
||||||
|
glPopMatrix();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore all the default material settings
|
// restore all the default material settings
|
||||||
|
@ -2271,7 +2288,6 @@ int Model::renderMeshesForModelsInScene(gpu::Batch& batch, RenderMode mode, bool
|
||||||
}
|
}
|
||||||
model->setupBatchTransform(batch);
|
model->setupBatchTransform(batch);
|
||||||
meshPartsRendered += model->renderMeshesFromList(list, batch, mode, translucent, alphaThreshold, args, locations, skinLocations);
|
meshPartsRendered += model->renderMeshesFromList(list, batch, mode, translucent, alphaThreshold, args, locations, skinLocations);
|
||||||
GLBATCH(glPopMatrix)();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2371,8 +2387,6 @@ int Model::renderMeshesFromList(QVector<int>& list, gpu::Batch& batch, RenderMod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLBATCH(glPushMatrix)();
|
|
||||||
|
|
||||||
const MeshState& state = _meshStates.at(i);
|
const MeshState& state = _meshStates.at(i);
|
||||||
if (state.clusterMatrices.size() > 1) {
|
if (state.clusterMatrices.size() > 1) {
|
||||||
GLBATCH(glUniformMatrix4fv)(skinLocations->clusterMatrices, state.clusterMatrices.size(), false,
|
GLBATCH(glUniformMatrix4fv)(skinLocations->clusterMatrices, state.clusterMatrices.size(), false,
|
||||||
|
@ -2437,11 +2451,9 @@ int Model::renderMeshesFromList(QVector<int>& list, gpu::Batch& batch, RenderMod
|
||||||
}
|
}
|
||||||
static bool showDiffuse = true;
|
static bool showDiffuse = true;
|
||||||
if (showDiffuse && diffuseMap) {
|
if (showDiffuse && diffuseMap) {
|
||||||
// GLBATCH(glBindTexture)(GL_TEXTURE_2D, diffuseMap->getID());
|
|
||||||
batch.setUniformTexture(0, diffuseMap->getGPUTexture());
|
batch.setUniformTexture(0, diffuseMap->getGPUTexture());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// GLBATCH(glBindTexture)(GL_TEXTURE_2D, textureCache->getWhiteTextureID());
|
|
||||||
batch.setUniformTexture(0, textureCache->getWhiteTexture());
|
batch.setUniformTexture(0, textureCache->getWhiteTexture());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a
|
||||||
notImplemented();
|
notImplemented();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (url.toLower().left(33) == "https://data.highfidelity.io/api/") {
|
if (url.toLower().left(33) == "https://metaverse.highfidelity.io/api/") {
|
||||||
AccountManager& accountManager = AccountManager::getInstance();
|
AccountManager& accountManager = AccountManager::getInstance();
|
||||||
|
|
||||||
if (accountManager.hasValidAccessToken()) {
|
if (accountManager.hasValidAccessToken()) {
|
||||||
|
|
Loading…
Reference in a new issue