automated snapshot
This commit is contained in:
4
main.go
4
main.go
@@ -50,8 +50,8 @@ func main() {
|
|||||||
t0 := time.Now()
|
t0 := time.Now()
|
||||||
|
|
||||||
rng := rand.New(rand.NewSource(0))
|
rng := rand.New(rand.NewSource(0))
|
||||||
//imageField := NewImageField("/home/d/Dropbox/art/passage/data/david.png")
|
imageField := NewImageField("/home/d/Dropbox/art/data/david.png")
|
||||||
imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg")
|
//imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg")
|
||||||
field :=
|
field :=
|
||||||
&TranslateField {
|
&TranslateField {
|
||||||
x: -float32(sourceWidth / 2.0),
|
x: -float32(sourceWidth / 2.0),
|
||||||
|
|||||||
@@ -150,6 +150,9 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
|||||||
}
|
}
|
||||||
rl.EndTextureMode()
|
rl.EndTextureMode()
|
||||||
|
|
||||||
|
rl.GenTextureMipmaps(&s.composite.Texture)
|
||||||
|
rl.SetTextureFilter(s.composite.Texture, rl.FilterTrilinear)
|
||||||
|
|
||||||
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
||||||
rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)
|
rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user