Color points
In the process, find and correct a misunderstanding about vertex attributes. Here's my current understanding. Vertex attributes are program-independent. When you make a draw call, every enabled attribute has to have a vertex buffer object bound to it. A simple way to make sure this happens is to enable only the attributes used by the active program.
This commit is contained in:
parent
1945086586
commit
0fbb071506
5 changed files with 60 additions and 24 deletions
|
@ -138,6 +138,7 @@ fn load_pointed_assemb(assembly: &Assembly) {
|
|||
Point::new(
|
||||
format!("point_front"),
|
||||
format!("Front point"),
|
||||
[0.875_f32, 0.875_f32, 0.875_f32],
|
||||
engine::point(0.0, 0.0, FRAC_1_SQRT_2)
|
||||
)
|
||||
);
|
||||
|
@ -145,6 +146,7 @@ fn load_pointed_assemb(assembly: &Assembly) {
|
|||
Point::new(
|
||||
format!("point_back"),
|
||||
format!("Back point"),
|
||||
[0.875_f32, 0.875_f32, 0.875_f32],
|
||||
engine::point(0.0, 0.0, -FRAC_1_SQRT_2)
|
||||
)
|
||||
);
|
||||
|
@ -166,6 +168,7 @@ fn load_pointed_assemb(assembly: &Assembly) {
|
|||
Point::new(
|
||||
format!("point{index_x}{index_y}"),
|
||||
format!("Point {index_x}{index_y}"),
|
||||
[0.4*(2.0 + x) as f32, 0.4*(2.0 + y) as f32, 0.4*(2.0 - x*y) as f32],
|
||||
engine::point(x, y, 0.0)
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue