automated snapshot
This commit is contained in:
3
main.go
3
main.go
@@ -62,7 +62,8 @@ func main() {
|
||||
|
||||
imageLayer := NewImageLayer("/home/d/Dropbox/photos/Events/2025/Aurora/Photo Nov 11 2025, 9 52 03 PM.jpg")
|
||||
|
||||
sketch.AddColorLayer("background-black", rl.Black)
|
||||
//sketch.AddColorLayer("background-black", rl.Black)
|
||||
sketch.AddColorLayer("background-magenta", rl.Magenta)
|
||||
sketch.AddLayer("field", &FieldLayer{field: field, dirty: true})
|
||||
contourLayer := NewContourLayer(&sketch, rng, field)
|
||||
sketch.AddLayer("contours", contourLayer)
|
||||
|
||||
@@ -101,13 +101,11 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
||||
layer.Draw(ctx)
|
||||
rl.PopMatrix()
|
||||
rl.EndTextureMode()
|
||||
//rl.GenTextureMipmaps(&instance.texture.Texture)
|
||||
}
|
||||
}
|
||||
|
||||
// composite all layers to screen
|
||||
|
||||
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
||||
|
||||
// copy from full texture for compositing, with vertical flipping
|
||||
src := rl.Rectangle {
|
||||
@@ -124,7 +122,7 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
||||
viewport := s.CalcViewport(ctx)
|
||||
|
||||
rl.BeginTextureMode(s.composite)
|
||||
rl.ClearBackground(rl.Black)
|
||||
//rl.ClearBackground(rl.Black)
|
||||
for _, instance := range s.layerToolsOrdered {
|
||||
config := instance.config
|
||||
if config.visible {
|
||||
@@ -146,6 +144,7 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
||||
}
|
||||
rl.EndTextureMode()
|
||||
|
||||
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
||||
rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)
|
||||
|
||||
outlineRect := outputRect.ToInt32()
|
||||
|
||||
Reference in New Issue
Block a user