diff --git a/graphicscontext.go b/graphicscontext.go index 5c900773c..67d40c554 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -48,8 +48,7 @@ type graphicsContext struct { func (c *graphicsContext) dispose() { // NOTE: Now this method is not used anywhere. glRenderTarget := c.screen.glRenderTarget - texture := c.screen.texture - glTexture := texture.glTexture + glTexture := c.screen.image.glTexture glRenderTarget.Dispose() glTexture.Dispose() @@ -65,11 +64,11 @@ func (c *graphicsContext) postUpdate() error { scale := float64(c.screenScale) geo := ScaleGeometry(scale, scale) clr := ColorMatrixI() - w, h := c.screen.texture.Size() + w, h := c.screen.image.Size() parts := []ImagePart{ {Rect{0, 0, float64(w), float64(h)}, Rect{0, 0, float64(w), float64(h)}}, } - if err := c.defaultR.DrawImage(c.screen.texture, parts, geo, clr); err != nil { + if err := c.defaultR.DrawImage(c.screen.image, parts, geo, clr); err != nil { return err } diff --git a/rendertarget.go b/rendertarget.go index 3bed7b552..197da2727 100644 --- a/rendertarget.go +++ b/rendertarget.go @@ -27,7 +27,7 @@ import ( type innerRenderTarget struct { glRenderTarget *opengl.RenderTarget - texture *Texture + image *Texture } func newInnerRenderTarget(width, height int, filter int) (*innerRenderTarget, error) { @@ -76,8 +76,8 @@ func (r *innerRenderTarget) DrawImage(texture *Texture, parts []ImagePart, geo G w, h := glTexture.Size() quads := textureQuads(parts, w, h) targetNativeTexture := gl.Texture(0) - if r.texture != nil { - targetNativeTexture = r.texture.glTexture.Native() + if r.image != nil { + targetNativeTexture = r.image.glTexture.Native() } w2, h2 := r.size() projectionMatrix := r.glRenderTarget.ProjectionMatrix() @@ -120,7 +120,7 @@ type RenderTarget struct { } func (r *RenderTarget) Image() *Texture { - return r.inner.texture + return r.inner.image } func (r *RenderTarget) Size() (width, height int) {