| 6167 | } |
| 6168 | |
| 6169 | void PrepareDrawing() override |
| 6170 | { |
| 6171 | glEnable(GL_BLEND); |
| 6172 | nDecalMode = DecalMode::NORMAL; |
| 6173 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
| 6174 | locUseProgram(m_nQuadShader); |
| 6175 | locBindVertexArray(m_vaQuad); |
| 6176 | float f[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; |
| 6177 | locUniform4fv(m_uniTint, 1, f); |
| 6178 | |
| 6179 | #if defined(OLC_PLATFORM_EMSCRIPTEN) |
| 6180 | locVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(locVertex), 0); locEnableVertexAttribArray(0); |
| 6181 | locVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(locVertex), (void*)(4 * sizeof(float))); locEnableVertexAttribArray(1); |
| 6182 | locVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(locVertex), (void*)(6 * sizeof(float))); locEnableVertexAttribArray(2); |
| 6183 | #endif |
| 6184 | |
| 6185 | locUniform1i(m_uniIs3D, 0); |
| 6186 | locUniformMatrix4fv(m_uniMVP, 1, false, matProjection.data()); |
| 6187 | glDisable(GL_CULL_FACE); |
| 6188 | glDepthFunc(GL_LESS); |
| 6189 | } |
| 6190 | |
| 6191 | void SetDecalMode(const olc::DecalMode& mode) override |
| 6192 | { |
nothing calls this directly
no outgoing calls
no test coverage detected