opengl: Unexport some functions

This commit is contained in:
Hajime Hoshi 2018-11-04 19:08:01 +09:00
parent 2a7caf7755
commit bc7dd2f050
5 changed files with 7 additions and 7 deletions

View File

@ -169,7 +169,7 @@ func (c *Context) bindFramebufferImpl(f framebufferNative) {
})
}
func (c *Context) FramebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
func (c *Context) framebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
var pixels []byte
_ = c.runOnContextThread(func() error {
gl.Flush()

View File

@ -204,7 +204,7 @@ func (c *Context) bindFramebufferImpl(f framebufferNative) {
gl.Call("bindFramebuffer", framebuffer, js.Value(f))
}
func (c *Context) FramebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
func (c *Context) framebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
gl := c.gl
c.bindFramebuffer(f.native)

View File

@ -156,7 +156,7 @@ func (c *Context) bindFramebufferImpl(f framebufferNative) {
gl.BindFramebuffer(mgl.FRAMEBUFFER, mgl.Framebuffer(f))
}
func (c *Context) FramebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
func (c *Context) framebufferPixels(f *Framebuffer, width, height int) ([]byte, error) {
gl := c.gl
gl.Flush()

View File

@ -24,8 +24,8 @@ type Framebuffer struct {
height int
}
// NewFramebufferFromTexture creates a framebuffer from the given texture.
func NewFramebufferFromTexture(texture Texture, width, height int) (*Framebuffer, error) {
// newFramebufferFromTexture creates a framebuffer from the given texture.
func newFramebufferFromTexture(texture Texture, width, height int) (*Framebuffer, error) {
native, err := theContext.newFramebuffer(texture)
if err != nil {
return nil, err

View File

@ -62,7 +62,7 @@ func (i *Image) Pixels() ([]byte, error) {
return nil, err
}
w, h := i.Size()
p, err := theContext.FramebufferPixels(i.Framebuffer, w, h)
p, err := theContext.framebufferPixels(i.Framebuffer, w, h)
if err != nil {
return nil, err
}
@ -81,7 +81,7 @@ func (i *Image) ensureFramebuffer() error {
return nil
}
w, h := i.Size()
f, err := NewFramebufferFromTexture(i.Texture, math.NextPowerOf2Int(w), math.NextPowerOf2Int(h))
f, err := newFramebufferFromTexture(i.Texture, math.NextPowerOf2Int(w), math.NextPowerOf2Int(h))
if err != nil {
return err
}