| 716 | |
| 717 | |
| 718 | int32_t Shade::DrawQuad(const olc::vf2d& vPos, const olc::vf2d& vSize) |
| 719 | { |
| 720 | locBindBuffer(0x8892, m_nVB); |
| 721 | |
| 722 | pVertexMem[0].pos[0] = vPos.x; |
| 723 | pVertexMem[0].pos[1] = vPos.y; |
| 724 | pVertexMem[0].pos[2] = 1.0f; |
| 725 | pVertexMem[0].tex[0] = { 0.0f, 0.0f }; |
| 726 | pVertexMem[0].col = olc::WHITE; |
| 727 | |
| 728 | pVertexMem[1].pos[0] = vPos.x; |
| 729 | pVertexMem[1].pos[1] = vPos.y + vSize.y; |
| 730 | pVertexMem[1].pos[2] = 1.0f; |
| 731 | pVertexMem[1].tex[0] = { 0.0f, 1.0f }; |
| 732 | pVertexMem[1].col = olc::WHITE; |
| 733 | |
| 734 | pVertexMem[2].pos[0] = vPos.x + vSize.x; |
| 735 | pVertexMem[2].pos[1] = vPos.y + vSize.y; |
| 736 | pVertexMem[2].pos[2] = 1.0f; |
| 737 | pVertexMem[2].tex[0] = { 1.0f, 1.0f }; |
| 738 | pVertexMem[2].col = olc::WHITE; |
| 739 | |
| 740 | pVertexMem[3].pos[0] = vPos.x + vSize.x; |
| 741 | pVertexMem[3].pos[1] = vPos.y; |
| 742 | pVertexMem[3].pos[2] = 1.0f; |
| 743 | pVertexMem[3].tex[0] = { 1.0f, 0.0f }; |
| 744 | pVertexMem[3].col = olc::WHITE; |
| 745 | |
| 746 | |
| 747 | locBufferData(0x8892, sizeof(sOmniVertex) * 4, pVertexMem, 0x88E0); |
| 748 | |
| 749 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
| 750 | |
| 751 | return 0; |
| 752 | } |
| 753 | |
| 754 | |
| 755 | void Shade::Clear(const olc::Pixel& p) |
nothing calls this directly
no outgoing calls
no test coverage detected