From 7903fe210831e78020745e037ffa103441069729 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 5 Jul 2016 00:31:02 +0900 Subject: [PATCH] graphics: Remove texture's width/height --- internal/graphics/command.go | 6 +----- internal/graphics/texture.go | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/graphics/command.go b/internal/graphics/command.go index c9876e57e..65913ae31 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -158,7 +158,7 @@ func (c *replacePixelsCommand) Exec(context *opengl.Context) error { return err } context.BindTexture(c.dst.texture.native) - context.TexSubImage2D(c.pixels, c.dst.texture.width, c.dst.texture.height) + context.TexSubImage2D(c.pixels, c.dst.width, c.dst.height) return nil } @@ -220,8 +220,6 @@ func (c *newImageFromImageCommand) Exec(context *opengl.Context) error { } c.result.texture = &texture{ native: native, - width: origSize.X, - height: origSize.Y, } c.result.framebuffer, err = newFramebufferFromTexture(context, c.result.texture) if err != nil { @@ -252,8 +250,6 @@ func (c *newImageCommand) Exec(context *opengl.Context) error { } c.result.texture = &texture{ native: native, - width: c.width, - height: c.height, } c.result.framebuffer, err = newFramebufferFromTexture(context, c.result.texture) if err != nil { diff --git a/internal/graphics/texture.go b/internal/graphics/texture.go index 9e644a421..e55d338a9 100644 --- a/internal/graphics/texture.go +++ b/internal/graphics/texture.go @@ -20,6 +20,4 @@ import ( type texture struct { native opengl.Texture - width int - height int }