MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / HW3D_DrawLine

Method HW3D_DrawLine

olcPixelGameEngine.h:3724–3741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3722 }
3723
3724 void PixelGameEngine::HW3D_DrawLine(const std::array<float, 16>& matModelView, const std::array<float, 4>& pos1, const std::array<float, 4>& pos2, const olc::Pixel col)
3725 {
3726 GPUTask task;
3727 task.decal = nullptr;
3728 task.mode = olc::DecalMode::WIREFRAME;
3729 task.structure = olc::DecalStructure::LINE;
3730 task.depth = bHW3DDepthTest;
3731 task.cull = nHW3DCullMode;
3732 task.mvp = matModelView;
3733 task.tint = olc::WHITE;
3734 task.vb =
3735 {
3736 { pos1[0], pos1[1], pos1[2], 1.0f, 0.0f, 0.0f, col.n},
3737 { pos2[0], pos2[1], pos2[2], 1.0f, 0.0f, 0.0f, col.n}
3738 };
3739
3740 vLayers[nTargetLayer].vecGPUTasks.push_back(task);
3741 }
3742
3743 void PixelGameEngine::HW3D_DrawLineBox(const std::array<float, 16>& matModelView, const std::array<float, 4>& pos, const std::array<float, 4>& size, const olc::Pixel col)
3744 {

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected