Author Topic: FreeImage plugin (GLSL Hacker 0.6.4.3+)  (Read 411 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member

  • Offline
  • *****

  • 619
    • View Profile
    • Geeks3D.com
FreeImage plugin (GLSL Hacker 0.6.4.3+)
« on: June 23, 2014, 01:59:16 PM »
From the version 0.6.4.3, GLSL Hacker is shipped with a new image loader plugin based on the popular FreeImage library. FreeImage is a powerful library to manage images and supports a lot of formats as well as 128-bit formats (each channel is coded on a float). But GLSL Hacker comes already with a built-in image loader (based on STB). So the question: how to choose the image loader?

This simple question has a simple answer: the set_current_image_codec() function of gh_texture lib:

Code: [Select]
gh_texture.set_current_image_codec(plugin_name)

To use the FreeImage loader, just do:
Code: [Select]
gh_texture.set_current_image_codec("FreeImage")

Now all texture functions that load an image file will use the FreeImage plugin.

To use the default image loader:
Code: [Select]
gh_texture.set_current_image_codec("stb")
« Last Edit: June 23, 2014, 02:07:06 PM by JeGX »