mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: revamp the Context pipeline for more effects, implement an additive effect (#16394)
This commit is contained in:
@@ -16,7 +16,7 @@ pub fn (mut window Window) init() {
|
||||
pub fn (mut window Window) draw() {
|
||||
angle := f32(window.ctx.frame) / 64 // since window.ctx.frame is increased by 1 on every frame -> the angle will be increasing too
|
||||
window.ctx.begin()
|
||||
sgl.load_pipeline(window.ctx.timage_pip)
|
||||
sgl.load_pipeline(window.ctx.pipeline.alpha)
|
||||
|
||||
sgl.translate(400, 400, 0) // center of the screen
|
||||
sgl.rotate(angle, 0.0, 0.0, 1.0) // rotate around the Z axis pointing towards the camera
|
||||
|
||||
Reference in New Issue
Block a user