LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: codifies on October 13, 2015, 15:59:52

Title: why org.lwjgl.stb ?
Post by: codifies on October 13, 2015, 15:59:52
First of all this is in no way a criticism of LWJGL, I was just wondering why it was included

from my perspective I've often found that many tasks can be done quicker and certainly more conveniently using "pure" Java code, especially by the time you've taken a few trips back and forth through the JNI barrier...

Especially for tasks like PNG decoding and Perlin noise there are boat (neh ocean liner) loads of even public domain code that can be used.

Given that LWJGL is a group of thin wrapper round specific low level libraries (usually libraries very close to bare metal), does it even "fit" with LWJGL ?

I'm not saying its a world shattering mistake - far from, in the unlikely event it was a severe issue for anyone LWJGL could no doubt be built without it (LWJGL itself doesn't seem to depend on it!)

I'm just genuinely curious why it got gathered in with the other libs that LWJGL supports...     
Title: Re: why org.lwjgl.stb ?
Post by: spasi on October 13, 2015, 16:58:38
Two important reasons:

- LWJGL needs a replacement for ImageIO, because ImageIO depends on AWT. AWT brings in a ton of overhead and is incompatible with GLFW on OSX. stb comes with image reading, resizing and writing capabilities.
- Many LWJGL users needed a text rendering solution and stb offers that.

The other stb bindings is bonus functionality that I thought LWJGL users would find useful.