MCPcopy
hub / github.com/go-qml/qml / TexSubImage2D

Method TexSubImage2D

gl/3.2core/gl.go:1225–1235  ·  view source on GitHub ↗

https://www.opengl.org/sdk/docs/man3/xhtml/glTexSubImage2D.xml

(target glbase.Enum, level, xoffset, yoffset, width, height int, format, gltype glbase.Enum, pixels interface{})

Source from the content-addressed store, hash-verified

1223
1224// https://www.opengl.org/sdk/docs/man3/xhtml/glTexSubImage2D.xml
1225func (gl *GL) TexSubImage2D(target glbase.Enum, level, xoffset, yoffset, width, height int, format, gltype glbase.Enum, pixels interface{}) {
1226 var pixels_ptr unsafe.Pointer
1227 var pixels_v = reflect.ValueOf(pixels)
1228 if pixels != nil && pixels_v.Kind() != reflect.Slice {
1229 panic("parameter pixels must be a slice")
1230 }
1231 if pixels != nil {
1232 pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
1233 }
1234 C.gl3_2core_glTexSubImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
1235}
1236
1237// https://www.opengl.org/sdk/docs/man3/xhtml/glTexSubImage1D.xml
1238func (gl *GL) TexSubImage1D(target glbase.Enum, level, xoffset, width int, format, gltype glbase.Enum, pixels interface{}) {

Callers

nothing calls this directly

Calls 1

AddrMethod · 0.65

Tested by

no test coverage detected