automated snapshot
This commit is contained in:
@@ -70,8 +70,6 @@ func NewSketch(sourceWidth, sourceHeight int32) Sketch {
|
||||
|
||||
func (s *Sketch) CreateLayer(name string, layer Layer) {
|
||||
texture := rl.LoadRenderTexture(s.sourceWidth, s.sourceHeight)
|
||||
rl.GenTextureMipmaps(&texture.Texture)
|
||||
rl.SetTextureFilter(texture.Texture, rl.FilterTrilinear)
|
||||
config := NewLayerConfig()
|
||||
layerTools :=
|
||||
LayerTools {
|
||||
@@ -91,9 +89,11 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
||||
layer.Update(ctx)
|
||||
if instance.layer.IsDirty() {
|
||||
rl.BeginTextureMode(instance.texture)
|
||||
rl.PushMatrix()
|
||||
layer.Draw(ctx)
|
||||
rl.PopMatrix()
|
||||
rl.EndTextureMode()
|
||||
rl.GenTextureMipmaps(&instance.texture.Texture)
|
||||
//rl.GenTextureMipmaps(&instance.texture.Texture)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user