mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
examples: cleanup unsafe{} blocks that are not needed anymore in examples/sokol/08_sdf/sdf.v
This commit is contained in:
parent
47f8f347b1
commit
ed84fb9ce8
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ fn init(mut state State) {
|
||||||
fsq_verts := [f32(-1.0), -3.0, 3.0, 1.0, -1.0, 1.0]!
|
fsq_verts := [f32(-1.0), -3.0, 3.0, 1.0, -1.0, 1.0]!
|
||||||
state.bind.vertex_buffers[0] = gfx.make_buffer(gfx.BufferDesc{
|
state.bind.vertex_buffers[0] = gfx.make_buffer(gfx.BufferDesc{
|
||||||
label: c'fsq vertices'
|
label: c'fsq vertices'
|
||||||
data: unsafe { gfx.Range{&fsq_verts[0], sizeof(fsq_verts)} }
|
data: gfx.Range{&fsq_verts[0], sizeof(fsq_verts)}
|
||||||
})
|
})
|
||||||
|
|
||||||
mut pipeline := gfx.PipelineDesc{}
|
mut pipeline := gfx.PipelineDesc{}
|
||||||
|
@ -48,7 +48,7 @@ fn frame(mut state State) {
|
||||||
gfx.begin_pass(sapp.create_default_pass(state.paction))
|
gfx.begin_pass(sapp.create_default_pass(state.paction))
|
||||||
gfx.apply_pipeline(state.pip)
|
gfx.apply_pipeline(state.pip)
|
||||||
gfx.apply_bindings(state.bind)
|
gfx.apply_bindings(state.bind)
|
||||||
gfx.apply_uniforms(.vs, C.SLOT_vs_params, unsafe { gfx.Range{&state.params, sizeof(state.params)} })
|
gfx.apply_uniforms(.vs, C.SLOT_vs_params, gfx.Range{&state.params, sizeof(state.params)})
|
||||||
gfx.draw(0, 3, 1)
|
gfx.draw(0, 3, 1)
|
||||||
gfx.end_pass()
|
gfx.end_pass()
|
||||||
gfx.commit()
|
gfx.commit()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue