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),
|
||||
_isTouchPressed(false),
|
||||
_mousePressed(false),
|
||||
_textureCache(NULL),
|
||||
_audio(),
|
||||
_enableProcessVoxelsThread(true),
|
||||
_octreeProcessor(),
|
||||
|
@ -195,8 +194,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
_isVSyncOn(true),
|
||||
_aboutToQuit(false)
|
||||
{
|
||||
_textureCache = TextureCache::getInstance();
|
||||
|
||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||
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.
|
||||
// Otherwise, it must rebuild the FBOs
|
||||
if (OculusManager::isConnected()) {
|
||||
_textureCache->setFrameBufferSize(OculusManager::getRenderTargetSize());
|
||||
TextureCache::getInstance()->setFrameBufferSize(OculusManager::getRenderTargetSize());
|
||||
} else {
|
||||
QSize fbSize = _glWidget->getDeviceSize() * getRenderResolutionScale();
|
||||
_textureCache->setFrameBufferSize(fbSize);
|
||||
TextureCache::getInstance()->setFrameBufferSize(fbSize);
|
||||
}
|
||||
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
|
@ -2046,7 +2043,7 @@ void Application::init() {
|
|||
connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);
|
||||
|
||||
// make sure our texture cache knows about window size changes
|
||||
_textureCache->associateWithWidget(getGLWidget());
|
||||
TextureCache::getInstance()->associateWithWidget(getGLWidget());
|
||||
}
|
||||
|
||||
void Application::closeMirrorView() {
|
||||
|
@ -2777,7 +2774,7 @@ glm::vec3 Application::getSunDirection() {
|
|||
|
||||
void Application::updateShadowMap() {
|
||||
PerformanceTimer perfTimer("shadowMap");
|
||||
QOpenGLFramebufferObject* fbo = _textureCache->getShadowFramebufferObject();
|
||||
QOpenGLFramebufferObject* fbo = TextureCache::getInstance()->getShadowFramebufferObject();
|
||||
fbo->bind();
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
@ -2942,7 +2939,7 @@ void Application::setupWorldLight() {
|
|||
}
|
||||
|
||||
QImage Application::renderAvatarBillboard() {
|
||||
_textureCache->getPrimaryFramebufferObject()->bind();
|
||||
TextureCache::getInstance()->getPrimaryFramebufferObject()->bind();
|
||||
|
||||
// the "glow" here causes an alpha of one
|
||||
Glower glower;
|
||||
|
@ -2953,7 +2950,7 @@ QImage Application::renderAvatarBillboard() {
|
|||
QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);
|
||||
glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
|
||||
|
||||
_textureCache->getPrimaryFramebufferObject()->release();
|
||||
TextureCache::getInstance()->getPrimaryFramebufferObject()->release();
|
||||
|
||||
return image;
|
||||
}
|
||||
|
|
|
@ -571,7 +571,6 @@ private:
|
|||
|
||||
|
||||
AnimationCache _animationCache;
|
||||
TextureCache* _textureCache;
|
||||
|
||||
DeferredLightingEffect _deferredLightingEffect;
|
||||
GlowEffect _glowEffect;
|
||||
|
|
Loading…
Reference in a new issue