Created
October 28, 2018 00:09
-
-
Save carmel4a/e6380b7b10192a19fc1dce4f39d6ce25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gfx::geometrybank_handle geometry_bank; | |
geometry_bank = { GfxRenderer.Create_Bank() }; | |
scene::shape_node shape; | |
shape.get_data().rangesquared_min = 0; | |
shape.get_data().rangesquared_max = 1000'000; | |
shape.get_data().material = GfxRenderer.Fetch_Material( "grass/grass04" ); | |
shape.get_data().translucent = false; | |
auto shape1 = scene::shape_node( shape ); | |
world_vertex v; | |
v.normal.x = 0.0f; | |
v.normal.y = 1.0f; | |
v.normal.z = 0.0f; | |
... | |
v.position.x = ...; | |
v.position.y = ...; | |
v.position.z = ...; | |
v.texture.s = 0.0f; | |
v.texture.t = 0.0f; | |
shape.get_data().vertices.emplace_back( v ); | |
... | |
shape.origin( m_area.center ); | |
shape.compute_radius(); | |
m_shapes.push_back( shape ); | |
m_shapes.back().create_geometry( geometry_bank ); | |
... | |
// rendering | |
case rendermode::...: | |
{ | |
for( auto& v_section : visible_sections ) | |
for( auto& shape : v_section->shapes() ) | |
Render( shape, false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment