func CompressedTexImage2D(target Enum, level int, internalformat Enum, width, height, border int, data []byte) { defer func() { errstr := errDrain() log.Printf("gl.CompressedTexImage2D(%v, %v, %v, %v, %v, %v, len(%d)) %v", target, level, internalformat, width, height, border, len(data), errstr) }() C.glCompressedTexImage2D(target.c(), C.GLint(level), internalformat.c(), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(len(data)), unsafe.Pointer(&data[0])) }
func CompressedTexImage2D(target uint, level int, internalformat uint, width, height, border, imageSize int, data Void) { C.glCompressedTexImage2D( C.GLenum(target), C.GLint(level), C.GLenum(internalformat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(imageSize), unsafe.Pointer(data)) }
func CompressedTexImage2D( target Enum, level int32, internalformat Enum, width Sizei, height Sizei, border int32, imageSize Sizei, data Void) { C.glCompressedTexImage2D( C.GLenum(target), C.GLint(level), C.GLenum(internalformat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(imageSize), unsafe.Pointer(data)) }
// CompressedTexImage2DFromImage loads texture data from an image.Image into the // currently bound GL texture using the glCompressedTexImage2D call. // // Precondition: no buffer object bound to PIXEL_UNPACK_BUFFER func CompressedTexImage2DFromImage(target GLenum, level int, border int, img image.Image) { bounds := img.Bounds() if bounds.Empty() { return } info, err := getCompressedImageInfo(img) if err != nil { return } C.glCompressedTexImage2D(C.GLenum(target), C.GLint(level), C.GLenum(info.Format), C.GLsizei(bounds.Dx()), C.GLsizei(bounds.Dy()), C.GLint(border), C.GLsizei(info.Length), info.Data) }
func CompressedTexImage2D(target Enum, level int, internalformat Enum, width, height, border int, data []byte) { C.glCompressedTexImage2D(target.c(), C.GLint(level), internalformat.c(), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(len(data)), unsafe.Pointer(&data[0])) }
//void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, // GLsizei height, GLint border, GLsizei imagesize, const GLvoid * data ) func CompressedTexImage2D(target GLenum, level int, internalformat GLenum, width int, height int, border int, imagesize int, data interface{}) { C.glCompressedTexImage2D(C.GLenum(target), C.GLint(level), C.GLenum(internalformat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(imagesize), ptr(data)) }