Files
OpenVulkano/openVulkanoCpp/Scene/Prefabs/GridDrawable.cpp
2023-10-03 19:52:23 +02:00

22 lines
668 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "GridDrawable.hpp"
namespace OpenVulkano::Scene
{
GridDrawable::GridDrawable()
: Drawable(DrawEncoder::GetDrawEncoder<GridDrawable>(), DrawPhase::POST)
{
m_shader.cullMode = CullMode::NONE;
m_shader.topology = Topology::TRIANGLE_STRIP;
m_shader.AddShaderProgram(ShaderProgramType::VERTEX, "Shader/grid");
m_shader.AddShaderProgram(ShaderProgramType::FRAGMENT, "Shader/grid");
m_shader.alphaBlend = true;
SetShader(&m_shader);
}
}