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

Method TexImage2D

gl/3.2core/gl.go:1079–1089  ·  view source on GitHub ↗

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

(target glbase.Enum, level int, internalFormat int32, width, height, border int, format, gltype glbase.Enum, pixels interface{})

Source from the content-addressed store, hash-verified

1077
1078// https://www.opengl.org/sdk/docs/man3/xhtml/glTexImage2D.xml
1079func (gl *GL) TexImage2D(target glbase.Enum, level int, internalFormat int32, width, height, border int, format, gltype glbase.Enum, pixels interface{}) {
1080 var pixels_ptr unsafe.Pointer
1081 var pixels_v = reflect.ValueOf(pixels)
1082 if pixels != nil && pixels_v.Kind() != reflect.Slice {
1083 panic("parameter pixels must be a slice")
1084 }
1085 if pixels != nil {
1086 pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
1087 }
1088 C.gl3_2core_glTexImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
1089}
1090
1091// https://www.opengl.org/sdk/docs/man3/xhtml/glTexImage1D.xml
1092func (gl *GL) TexImage1D(target glbase.Enum, level int, internalFormat int32, width, border int, format, gltype glbase.Enum, pixels interface{}) {

Callers

nothing calls this directly

Calls 1

AddrMethod · 0.65

Tested by

no test coverage detected