mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
gg: cleanup in init_pipeline
This commit is contained in:
parent
6fc3a3d088
commit
137cb09426
1 changed files with 4 additions and 12 deletions
|
@ -117,12 +117,9 @@ fn (mut container PipelineContainer) init_pipeline() {
|
||||||
// FIXME(FireRedz): this looks kinda funny, find a better way to initialize pipeline.
|
// FIXME(FireRedz): this looks kinda funny, find a better way to initialize pipeline.
|
||||||
|
|
||||||
// Alpha
|
// Alpha
|
||||||
mut alpha_pipdesc := gfx.PipelineDesc{
|
mut alpha_pipdesc := gfx.PipelineDesc{}
|
||||||
label: c'alpha-pipeline'
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe { vmemset(&alpha_pipdesc, 0, int(sizeof(alpha_pipdesc))) }
|
unsafe { vmemset(&alpha_pipdesc, 0, int(sizeof(alpha_pipdesc))) }
|
||||||
|
alpha_pipdesc.label = c'alpha-pipeline'
|
||||||
alpha_pipdesc.colors[0] = gfx.ColorState{
|
alpha_pipdesc.colors[0] = gfx.ColorState{
|
||||||
blend: gfx.BlendState{
|
blend: gfx.BlendState{
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -130,16 +127,12 @@ fn (mut container PipelineContainer) init_pipeline() {
|
||||||
dst_factor_rgb: .one_minus_src_alpha
|
dst_factor_rgb: .one_minus_src_alpha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container.alpha = sgl.make_pipeline(&alpha_pipdesc)
|
container.alpha = sgl.make_pipeline(&alpha_pipdesc)
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
mut add_pipdesc := gfx.PipelineDesc{
|
mut add_pipdesc := gfx.PipelineDesc{}
|
||||||
label: c'additive-pipeline'
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe { vmemset(&add_pipdesc, 0, int(sizeof(add_pipdesc))) }
|
unsafe { vmemset(&add_pipdesc, 0, int(sizeof(add_pipdesc))) }
|
||||||
|
add_pipdesc.label = c'additive-pipeline'
|
||||||
add_pipdesc.colors[0] = gfx.ColorState{
|
add_pipdesc.colors[0] = gfx.ColorState{
|
||||||
blend: gfx.BlendState{
|
blend: gfx.BlendState{
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -147,7 +140,6 @@ fn (mut container PipelineContainer) init_pipeline() {
|
||||||
dst_factor_rgb: .one
|
dst_factor_rgb: .one
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container.add = sgl.make_pipeline(&add_pipdesc)
|
container.add = sgl.make_pipeline(&add_pipdesc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue