Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all
Unified · Split
| @@ -35,7 +35,6 @@ · 34 unmodified lines | ||
| 35 | 35 | #include <QMouseEvent> |
| 36 | 36 | #include <QNetworkReply> |
| 37 | 37 | #include <QNetworkDiskCache> |
| 38 | −#include <QOpenGLFramebufferObject> | |
| 39 | 38 | #include <QObject> |
| 40 | 39 | #include <QWheelEvent> |
| 41 | 40 | #include <QScreen> |
| @@ -798,7 +797,6 @@ void Application::paintGL() { · 756 unmodified lines | ||
| 798 | 797 | DependencyManager::get<GlowEffect>()->prepare(); |
| 799 | 798 | |
| 800 | 799 | // Viewport is assigned to the size of the framebuffer |
| 801 | − // QSize size = DependencyManager::get<TextureCache>()->getPrimaryFramebufferObject()->size(); | |
| 802 | 800 | QSize size = DependencyManager::get<TextureCache>()->getFrameBufferSize(); |
| 803 | 801 | glViewport(0, 0, size.width(), size.height()); |
| 804 | 802 | |
| @@ -2637,11 +2635,8 @@ void Application::updateShadowMap() { · 1832 unmodified lines | ||
| 2637 | 2635 | activeRenderingThread = QThread::currentThread(); |
| 2638 | 2636 | |
| 2639 | 2637 | PerformanceTimer perfTimer("shadowMap"); |
| 2640 | −// QOpenGLFramebufferObject* fbo = DependencyManager::get<TextureCache>()->getShadowFramebufferObject(); | |
| 2641 | −// fbo->bind(); | |
| 2642 | 2638 | auto shadowFramebuffer = DependencyManager::get<TextureCache>()->getShadowFramebuffer(); |
| 2643 | − GLuint shadowFBO = gpu::GLBackend::getFramebufferID(shadowFramebuffer); | |
| 2644 | − glBindFramebuffer(GL_FRAMEBUFFER, shadowFBO); | |
| 2639 | + glBindFramebuffer(GL_FRAMEBUFFER, gpu::GLBackend::getFramebufferID(shadowFramebuffer)); | |
| 2645 | 2640 | |
| 2646 | 2641 | glEnable(GL_DEPTH_TEST); |
| 2647 | 2642 | glClear(GL_DEPTH_BUFFER_BIT); |
| @@ -2838,7 +2833,8 @@ PickRay Application::computePickRay(float x, float y) { · 190 unmodified lines | ||
| 2838 | 2833 | } |
| 2839 | 2834 | |
| 2840 | 2835 | QImage Application::renderAvatarBillboard() { |
| 2841 | − DependencyManager::get<TextureCache>()->getPrimaryFramebufferObject()->bind(); | |
| 2836 | + auto primaryFramebuffer = DependencyManager::get<TextureCache>()->getPrimaryFramebuffer(); | |
| 2837 | + glBindFramebuffer(GL_FRAMEBUFFER, gpu::GLBackend::getFramebufferID(primaryFramebuffer)); | |
| 2842 | 2838 | |
| 2843 | 2839 | // the "glow" here causes an alpha of one |
| 2844 | 2840 | Glower glower; |
| @@ -2851,7 +2847,7 @@ QImage Application::renderAvatarBillboard() { · 6 unmodified lines | ||
| 2851 | 2847 | QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32); |
| 2852 | 2848 | glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits()); |
| 2853 | 2849 | |
| 2854 | − DependencyManager::get<TextureCache>()->getPrimaryFramebufferObject()->release(); | |
| 2850 | + glBindFramebuffer(GL_FRAMEBUFFER, 0); | |
| 2855 | 2851 | |
| 2856 | 2852 | return image; |
| 2857 | 2853 | } |