image.go 650 B

1234567891011121314151617181920212223242526272829
  1. // Image extension
  2. package al
  3. /*
  4. #cgo pkg-config: allegro_image-5
  5. #cgo CFLAGS: -I/usr/local/include
  6. #cgo linux LDFLAGS: -lc_nonshared
  7. #include <stdlib.h>
  8. #include <allegro5/allegro.h>
  9. #include <allegro5/allegro_image.h>
  10. #include "helpers.h"
  11. */
  12. import "C"
  13. // Initializes the image format addon
  14. func InitImageAddon() bool {
  15. return cb2b(C.al_init_image_addon())
  16. }
  17. // Shuts down the image format addon
  18. func ShutdownImageAddon() {
  19. C.al_shutdown_image_addon()
  20. }
  21. // Returns the version of the image loading addon.
  22. // Gets the allegro font addon version
  23. func AllegroImageVersion() uint32 {
  24. return (uint32)(C.al_get_allegro_image_version())
  25. }