mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
opengl: Unexport TexSubImage2D
This commit is contained in:
parent
531251d4ad
commit
786b349579
@ -307,7 +307,7 @@ func (c *replacePixelsCommand) Exec(indexOffsetInBytes int) error {
|
||||
// glFlush is necessary on Android.
|
||||
// glTexSubImage2D didn't work without this hack at least on Nexus 5x and NuAns NEO [Reloaded] (#211).
|
||||
opengl.GetContext().Flush()
|
||||
opengl.GetContext().TexSubImage2D(c.dst.image.Texture, c.pixels, c.x, c.y, c.width, c.height)
|
||||
c.dst.image.TexSubImage2D(c.pixels, c.x, c.y, c.width, c.height)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ func (c *Context) isTexture(t Texture) bool {
|
||||
return r
|
||||
}
|
||||
|
||||
func (c *Context) TexSubImage2D(t Texture, p []byte, x, y, width, height int) {
|
||||
func (c *Context) texSubImage2D(t Texture, p []byte, x, y, width, height int) {
|
||||
c.bindTexture(t)
|
||||
_ = c.runOnContextThread(func() error {
|
||||
gl.TexSubImage2D(gl.TEXTURE_2D, 0, int32(x), int32(y), int32(width), int32(height), gl.RGBA, gl.UNSIGNED_BYTE, gl.Ptr(p))
|
||||
|
@ -241,7 +241,7 @@ func (c *Context) isTexture(t Texture) bool {
|
||||
return gl.Call("isTexture", js.Value(t)).Bool()
|
||||
}
|
||||
|
||||
func (c *Context) TexSubImage2D(t Texture, pixels []byte, x, y, width, height int) {
|
||||
func (c *Context) texSubImage2D(t Texture, pixels []byte, x, y, width, height int) {
|
||||
c.bindTexture(t)
|
||||
gl := c.gl
|
||||
// void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
||||
|
@ -191,7 +191,7 @@ func (c *Context) isTexture(t Texture) bool {
|
||||
return gl.IsTexture(mgl.Texture(t))
|
||||
}
|
||||
|
||||
func (c *Context) TexSubImage2D(t Texture, p []byte, x, y, width, height int) {
|
||||
func (c *Context) texSubImage2D(t Texture, p []byte, x, y, width, height int) {
|
||||
c.bindTexture(t)
|
||||
gl := c.gl
|
||||
gl.TexSubImage2D(mgl.TEXTURE_2D, 0, x, y, width, height, mgl.RGBA, mgl.UNSIGNED_BYTE, p)
|
||||
|
@ -128,3 +128,7 @@ func (i *Image) ensureFramebuffer() error {
|
||||
i.Framebuffer = f
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *Image) TexSubImage2D(p []byte, x, y, width, height int) {
|
||||
theContext.texSubImage2D(i.Texture, p, x, y, width, height)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user