MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / shaderLoad

Function shaderLoad

Source/Node/EffekNode.cpp:313–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313static bgfx_shader_handle_t shaderLoad(const char* mat, const char* name, const char* type, void* ud) {
314 AssertIf(mat, "Effekseer shader loading with user defined material \"{}\" is unsupported", mat);
315 const char* shaderName = findShaderFile(name, type);
316 bgfx::RendererType::Enum rendererType = bgfx::getRendererType();
317 bgfx::ShaderHandle handle = bgfx::createEmbeddedShader(DoraShaders, rendererType, shaderName);
318 bgfx::setName(handle, shaderName);
319 return bgfx_shader_handle_t{handle.idx};
320}
321
322static bgfx_texture_handle_t textureGet(int texture_type, void* parm, void* ud) {
323 if (auto renderTarget = RenderTarget::getCurrent()) {

Callers

nothing calls this directly

Calls 4

findShaderFileFunction · 0.85
getRendererTypeFunction · 0.85
createEmbeddedShaderFunction · 0.85
setNameFunction · 0.50

Tested by

no test coverage detected