| 121 | } |
| 122 | |
| 123 | void ScreenAlignedQuad::draw() |
| 124 | { |
| 125 | if (m_texture) |
| 126 | { |
| 127 | glActiveTexture(GL_TEXTURE0 + m_samplerIndex); |
| 128 | m_texture->bind(); |
| 129 | } |
| 130 | |
| 131 | m_program->use(); |
| 132 | m_vao->drawArrays(GL_TRIANGLE_STRIP, 0, 4); |
| 133 | m_program->release(); |
| 134 | |
| 135 | if (m_texture) |
| 136 | m_texture->unbind(); |
| 137 | } |
| 138 | |
| 139 | void ScreenAlignedQuad::setTexture(Texture* texture) |
| 140 | { |