MCPcopy Create free account
hub / github.com/axmolengine/axmol / init

Method init

core/3d/Skybox.cpp:59–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool Skybox::init()
60{
61 _customCommand.setTransparent(false);
62 _customCommand.set3D(true);
63
64 _customCommand.setBeforeCallback(AX_CALLBACK_0(Skybox::onBeforeDraw, this));
65 _customCommand.setAfterCallback(AX_CALLBACK_0(Skybox::onAfterDraw, this));
66
67 // create and set our custom shader
68 setProgramStateByProgramId(backend::ProgramType::SKYBOX_3D);
69
70 auto& pipelineDescriptor = _customCommand.getPipelineDescriptor();
71
72 pipelineDescriptor.programState = _programState;
73 // disable blend
74 pipelineDescriptor.blendDescriptor.blendEnabled = false;
75
76 _uniformColorLoc = _programState->getUniformLocation("u_color");
77 _uniformCameraRotLoc = _programState->getUniformLocation("u_cameraRot");
78 _uniformEnvLoc = _programState->getUniformLocation("u_Env");
79
80 initBuffers();
81 return true;
82}
83
84bool Skybox::init(std::string_view positive_x,
85 std::string_view negative_x,

Callers 8

ChunkMethod · 0.45
drawMethod · 0.45
loadBinaryMethod · 0.45
drawMethod · 0.45
createMethod · 0.45
drawMethod · 0.45
createMethod · 0.45
drawMethod · 0.45

Calls 5

createFunction · 0.85
setTransparentMethod · 0.80
initFunction · 0.50
getUniformLocationMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected