cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.32k stars 939 forks source link

should update the thirdlib of stb #1743

Open fndisme opened 7 years ago

fndisme commented 7 years ago

in stb/stb_image.h this function // read 16bit value and convert to 24bit RGB void stbitga_read_rgb16(stbicontext s, stbi_uc out) should be static void stbitga_read_rgb16(stbicontext s, stbi_uc out) new version has fix this bug.

when compile with other lib use stb will have same problem

cinder.lib(ImageSourceFileStbImage.obj) : warning LNK4006: "void cdecl stbitga_read_rgb16(struct stbicontext ,unsigned char )" (?stbitga_read_rgb16@@YAXPAUstbi__context@@PAE@Z) already defined in TurboBadgerLib.lib(tb_image_loader_stb.obj); second definition ignored 1>C:\study\TankClient\vs2015\build\Win32\Debug\TankClient.exe : warning LNK4088: image being generated due to /FORCE option; image may not run

richardeakin commented 7 years ago

A PR updating stb image to latest would be most welcome, however keep in mind that there are some modifications. At least this one (scroll down to changes in stb_image.h), allowing it to work with Android's filesystem. If you update, might be best to first diff the current version (I believe v2.12) against the STB original, so you know what mods need to be kept intact.

fndisme commented 7 years ago

It's right. now I just add "static" before void stbitga_read_rgb16(stbicontext s, stbi_uc out). It's will work and no compile warning. By the way. Waiting for the new RELEASE version of Cinder.