| 3729 | } |
| 3730 | |
| 3731 | void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override |
| 3732 | { |
| 3733 | const uint32_t numVertices = _numIndices*4/6; |
| 3734 | if (0 < numVertices) |
| 3735 | { |
| 3736 | m_indexBuffers[_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data); |
| 3737 | m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_layout.m_stride, _blitter.m_vb->data); |
| 3738 | |
| 3739 | VertexBufferGL& vb = m_vertexBuffers[_blitter.m_vb->handle.idx]; |
| 3740 | GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, vb.m_id) ); |
| 3741 | |
| 3742 | IndexBufferGL& ib = m_indexBuffers[_blitter.m_ib->handle.idx]; |
| 3743 | GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib.m_id) ); |
| 3744 | |
| 3745 | ProgramGL& program = m_program[_blitter.m_program.idx]; |
| 3746 | program.bindAttributesBegin(); |
| 3747 | program.bindAttributes(_blitter.m_layout, 0); |
| 3748 | program.bindAttributesEnd(); |
| 3749 | |
| 3750 | GL_CHECK(glDrawElements(GL_TRIANGLES |
| 3751 | , _numIndices |
| 3752 | , GL_UNSIGNED_SHORT |
| 3753 | , (void*)0 |
| 3754 | ) ); |
| 3755 | } |
| 3756 | } |
| 3757 | |
| 3758 | void updateResolution(const Resolution& _resolution) |
| 3759 | { |
no test coverage detected