| 242 | } |
| 243 | |
| 244 | bool EnsureAlphaMesh() |
| 245 | { |
| 246 | if (s_alphaVao) |
| 247 | return true; |
| 248 | glGenVertexArrays(1, &s_alphaVao); |
| 249 | glGenBuffers(1, &s_alphaVbo); |
| 250 | GL33Bind::Vao(s_alphaVao); |
| 251 | glBindBuffer(GL_ARRAY_BUFFER, s_alphaVbo); |
| 252 | glEnableVertexAttribArray(0); |
| 253 | glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), nullptr); |
| 254 | glEnableVertexAttribArray(1); |
| 255 | glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), reinterpret_cast<void*>(3 * sizeof(float))); |
| 256 | GL33Bind::Vao(0); |
| 257 | return true; |
| 258 | } |
| 259 | } // namespace |
| 260 | |
| 261 | namespace |
no test coverage detected