• Advertisement
Sign in to follow this  

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

This topic is 2564 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
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
);


i get 2 linker errors :
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
Sign in to follow this  

  • Advertisement