MCPcopy Create free account
hub / github.com/arrayfire/forge / render

Method render

src/backend/opengl/surface_impl.cpp:232–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void surface_impl::render(const int pWindowId,
233 const int pX, const int pY, const int pVPW, const int pVPH,
234 const glm::mat4& pView, const glm::mat4& pOrient)
235{
236 CheckGL("Begin surface_impl::render");
237 // FIXME: even when per vertex alpha is enabled
238 // primitives of transparent object should be sorted
239 // from the furthest to closest primitive
240 if (mIsPVAOn) {
241 glDepthMask(GL_FALSE);
242 glEnable(GL_BLEND);
243 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
244 }
245
246 renderGraph(pWindowId, computeTransformMat(pView, pOrient));
247
248 if (mIsPVAOn) {
249 glDisable(GL_BLEND);
250 glDepthMask(GL_TRUE);
251 }
252 CheckGL("End surface_impl::render");
253}
254
255void scatter3_impl::renderGraph(const int pWindowId, const glm::mat4& transform)
256{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected