コード例 #1
0
ファイル: gldebug.go プロジェクト: Miaque/mojo
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]))
}
コード例 #2
0
ファイル: es2.go プロジェクト: nick-fedesna/egles
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))
}
コード例 #3
0
ファイル: gles2.go プロジェクト: remogatto/egles
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))

}
コード例 #4
0
ファイル: gla.go プロジェクト: spate/gla
// 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)
}
コード例 #5
0
ファイル: gl_opengles.go プロジェクト: tanema/amore
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]))
}
コード例 #6
0
ファイル: texture.go プロジェクト: Nvveen/gl
//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))
}