mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
opengl: Unexport some functions
This commit is contained in:
parent
2a7caf7755
commit
bc7dd2f050
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user