Exemplo n.º 1
0
func (texture *Texture) GL_BindTexture(texw, texh *float32) error {
	_texw := (*C.float)(unsafe.Pointer(texw))
	_texh := (*C.float)(unsafe.Pointer(texh))
	_ret := C.SDL_GL_BindTexture(texture.cptr(), _texw, _texh)
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Exemplo n.º 2
0
func (texture *Texture) GL_BindTexture(texw, texh *float32) int {
	_texture := (*C.SDL_Texture)(unsafe.Pointer(texture))
	_texw := (*C.float)(unsafe.Pointer(texw))
	_texh := (*C.float)(unsafe.Pointer(texh))
	return (int)(C.SDL_GL_BindTexture(_texture, _texw, _texh))
}
Exemplo n.º 3
0
// Returns (ok, texture width, texture height)
func (t *Texture) Bind() (float32, float32, bool) {
	texw := C.float(0.0)
	texh := C.float(0.0)
	ret := C.SDL_GL_BindTexture(t.cTexture, &texw, &texh)
	return float32(texw), float32(texh), int(ret) == 0
}
Exemplo n.º 4
0
func (texture *Texture) GL_BindTexture(texw, texh *float32) int {
	_texw := (*C.float)(unsafe.Pointer(texw))
	_texh := (*C.float)(unsafe.Pointer(texh))
	return int(C.SDL_GL_BindTexture(texture.cptr(), _texw, _texh))
}