MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / EnsureAlphaMesh

Function EnsureAlphaMesh

engine/PoseidonGL33/EngineGL33_ShadowDepth.cpp:244–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244bool 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
261namespace

Callers 1

RenderCascadeArrayFunction · 0.85

Calls 1

VaoFunction · 0.85

Tested by

no test coverage detected