mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:16:16 +02:00
remove _textureCache
This commit is contained in:
parent
ca39c79df4
commit
7d1081473e
2 changed files with 6 additions and 10 deletions
|
@ -177,7 +177,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_touchAvgY(0.0f),
|
_touchAvgY(0.0f),
|
||||||
_isTouchPressed(false),
|
_isTouchPressed(false),
|
||||||
_mousePressed(false),
|
_mousePressed(false),
|
||||||
_textureCache(NULL),
|
|
||||||
_audio(),
|
_audio(),
|
||||||
_enableProcessVoxelsThread(true),
|
_enableProcessVoxelsThread(true),
|
||||||
_octreeProcessor(),
|
_octreeProcessor(),
|
||||||
|
@ -195,8 +194,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_isVSyncOn(true),
|
_isVSyncOn(true),
|
||||||
_aboutToQuit(false)
|
_aboutToQuit(false)
|
||||||
{
|
{
|
||||||
_textureCache = TextureCache::getInstance();
|
|
||||||
|
|
||||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||||
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||||
|
|
||||||
|
@ -623,10 +620,10 @@ void Application::paintGL() {
|
||||||
// Set the desired FBO texture size. If it hasn't changed, this does nothing.
|
// Set the desired FBO texture size. If it hasn't changed, this does nothing.
|
||||||
// Otherwise, it must rebuild the FBOs
|
// Otherwise, it must rebuild the FBOs
|
||||||
if (OculusManager::isConnected()) {
|
if (OculusManager::isConnected()) {
|
||||||
_textureCache->setFrameBufferSize(OculusManager::getRenderTargetSize());
|
TextureCache::getInstance()->setFrameBufferSize(OculusManager::getRenderTargetSize());
|
||||||
} else {
|
} else {
|
||||||
QSize fbSize = _glWidget->getDeviceSize() * getRenderResolutionScale();
|
QSize fbSize = _glWidget->getDeviceSize() * getRenderResolutionScale();
|
||||||
_textureCache->setFrameBufferSize(fbSize);
|
TextureCache::getInstance()->setFrameBufferSize(fbSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
glEnable(GL_LINE_SMOOTH);
|
glEnable(GL_LINE_SMOOTH);
|
||||||
|
@ -2046,7 +2043,7 @@ void Application::init() {
|
||||||
connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);
|
connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);
|
||||||
|
|
||||||
// make sure our texture cache knows about window size changes
|
// make sure our texture cache knows about window size changes
|
||||||
_textureCache->associateWithWidget(getGLWidget());
|
TextureCache::getInstance()->associateWithWidget(getGLWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::closeMirrorView() {
|
void Application::closeMirrorView() {
|
||||||
|
@ -2777,7 +2774,7 @@ glm::vec3 Application::getSunDirection() {
|
||||||
|
|
||||||
void Application::updateShadowMap() {
|
void Application::updateShadowMap() {
|
||||||
PerformanceTimer perfTimer("shadowMap");
|
PerformanceTimer perfTimer("shadowMap");
|
||||||
QOpenGLFramebufferObject* fbo = _textureCache->getShadowFramebufferObject();
|
QOpenGLFramebufferObject* fbo = TextureCache::getInstance()->getShadowFramebufferObject();
|
||||||
fbo->bind();
|
fbo->bind();
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
@ -2942,7 +2939,7 @@ void Application::setupWorldLight() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage Application::renderAvatarBillboard() {
|
QImage Application::renderAvatarBillboard() {
|
||||||
_textureCache->getPrimaryFramebufferObject()->bind();
|
TextureCache::getInstance()->getPrimaryFramebufferObject()->bind();
|
||||||
|
|
||||||
// the "glow" here causes an alpha of one
|
// the "glow" here causes an alpha of one
|
||||||
Glower glower;
|
Glower glower;
|
||||||
|
@ -2953,7 +2950,7 @@ QImage Application::renderAvatarBillboard() {
|
||||||
QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);
|
QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);
|
||||||
glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
|
glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
|
||||||
|
|
||||||
_textureCache->getPrimaryFramebufferObject()->release();
|
TextureCache::getInstance()->getPrimaryFramebufferObject()->release();
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
|
@ -571,7 +571,6 @@ private:
|
||||||
|
|
||||||
|
|
||||||
AnimationCache _animationCache;
|
AnimationCache _animationCache;
|
||||||
TextureCache* _textureCache;
|
|
||||||
|
|
||||||
DeferredLightingEffect _deferredLightingEffect;
|
DeferredLightingEffect _deferredLightingEffect;
|
||||||
GlowEffect _glowEffect;
|
GlowEffect _glowEffect;
|
||||||
|
|
Loading…
Reference in a new issue