| 116 | } |
| 117 | |
| 118 | void DisplayViewSystem::resize_framebuffer() |
| 119 | { |
| 120 | glDeleteTextures(1, &m_fbo_texture); |
| 121 | glGenTextures(1, &m_fbo_texture); |
| 122 | glBindTexture(GL_TEXTURE_2D, m_fbo_texture); |
| 123 | |
| 124 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, m_render_window->get_width(), m_render_window->get_height(), 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); |
| 125 | |
| 126 | // GL_NEAREST because we don't want to linearly interpolate between those beautiful pixels, THAT'S DISGUSTING! |
| 127 | // We want maximum monte carlo noise crispiness! |
| 128 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
| 129 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
| 130 | |
| 131 | glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer); |
| 132 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_fbo_texture, 0); |
| 133 | } |
| 134 | |
| 135 | bool DisplayViewSystem::update_selected_display_view() |
| 136 | { |
nothing calls this directly
no test coverage detected