Sign in to follow this  
lordmonkey

Simplest way to load an image(jpeg, gif, tga)

Recommended Posts

Hello,
I am looking for a simplest way to load an image - any format because I can change it obviously - into OpenGL and then draw it. Any suggestions ?

Share this post


Link to post
Share on other sites
thanks for reply.
I have already tried this now but as I add this to my project (in visual studio) and add this piece of code into my let's say main.cpp
[code] GLuint tex_2d = SOIL_load_OGL_texture
(
"img.png",
SOIL_LOAD_AUTO,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
);[/code]

i get 2 linker errors :
[quote]Error 2 error LNK2019: unresolved external symbol __alloca referenced in function _stbi_zlib_decode_noheader_buffer ........\soil.lib(stb_image_aug.o)
Error 3 error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2 .........\soil.lib(image_helper.o)
[/quote]

any ideas ?



EDIT:
Ok the problem was with the .lib file . I just have rebuild it and now it compiles

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this