Questions tagged [soil]

SOIL or Simple OpenGL Image Library is a lightweight image loading library for for C++ and C that is cross-platform.

SOIL stands for Simple OpenGL Image Library. It was created to be a lightweight image loading library for C++ and C and meant to be a static library.

Useful Links:

159 questions
2
votes
1 answer

Wrong UV mapping applied on object OpenGl

I just want to load a object via Assimp (that works) - vertices, uvs and normals. Then I load a texture via SOIL library - through many tutorials, that work also fine, but when the texture is applied to the object, UVs don't work correctly (as you…
2
votes
1 answer

Broken BMP when save bitmap by SOIL. Screenshot area

This is continuation of my last question about saving screenshot to SOIL .here Now I wonder, how to make screenshot of part of screen and eliminate the reason that strange behaviour. My code: bool saveTexture(string path, glm::vec2 startPos,…
hardCode
  • 39
  • 6
2
votes
0 answers

How to store a Color in an unsigned char?

I use openGL´s SOIL to load images and SOIL_load_image() returns an unsigned char*, which is then used by openGL to color all the width*height pixels. I would like to be able to pass my own unsigned char* to represent one single color. How do I…
stimulate
  • 1,199
  • 1
  • 11
  • 30
2
votes
0 answers

How to build SOIL on Mac

I'm relatively inexperienced with the workings of downloading, making, and linking libraries, and I was hoping to get SOIL (Simple OpenGL Image Library) so that I can use it in Xcode (newest version) on Mac OS X El Capitan with OpenGL 3.3 and GLFW…
2
votes
1 answer

OpenGL rendering full screen image

I am trying to create an application that all it does is display an image full screen and then flash through a sequence of images quickly (144hz) repeatedly. I have just started looking at OpenGL, have done a few tutorials and cannot figure out what…
Joe Jankowiak
  • 295
  • 3
  • 15
2
votes
1 answer

How to separate opaque from transparent objects in OpenGL

I'm trying to implement transparency in OpenGL and from what I've read it's necessary to first render all opaque objects and then render the transparent objects in the correct order. My issue is how do I go about separating opaque from transparent…
jocamar
  • 83
  • 9
2
votes
1 answer

SOIL unresolved external symbols

Ok, before anyone marks this question as a duplicate, I have looked at What is an undefined reference/unresolved external symbol error and how do I fix it? and many other online posts. I've tried every solution I've come acoss but I still can't fix…
Adam Lampman
  • 97
  • 1
  • 8
2
votes
1 answer

Alpha channel being rendered black. How to make it transparent?

I'm loading a png texture with 32bit and some transparent regions. I have setted this code in my initialization function: // OpenGL glEnable(GL_DEPTH_TEST); glShadeModel(GL_SMOOTH); glEnable( GL_ALPHA_TEST ); glEnable( GL_BLEND ); glBlendFunc(…
Yuri A. Brito
  • 231
  • 2
  • 10
2
votes
1 answer

Loading embedded textures with SOIL

I am using this answer to embed my image in the .exe: Embedding resources in executable using GCC Here are the relevant bits of my code: GLuint grass_DTexture; extern char binary_grass_D_bmp_start[]; extern char binary_grass_D_bmp_size[]; short…
CHRIS
  • 957
  • 3
  • 10
  • 27
2
votes
3 answers

Save openGL output using DevIL or SOIL

I have tried using both soil and devil image libraries but the screenshots created are completely black images. For devil I used the function found here Take screenshot with openGL and save it as png but the image is still black screen. Any ideas…
kdarbs
  • 65
  • 4
2
votes
2 answers

switching between textures loaded with SOIL

I'm attempting to load two textures and then switch between the two in my display function. I am using the SOIL library to load the textures as such: tex_2 = SOIL_load_OGL_texture ( "s9.png", SOIL_LOAD_AUTO, …
user926914
  • 193
  • 1
  • 15
2
votes
1 answer

My "camera" is reversed when i get to a certain location in the z direction, what could be causing this?

I am Using c++, OpenGL, SOIL graphics library, and Microsoft Visual c++ 2010 Express. i've added a video to demonstrate the problem http://www.youtube.com/watch?v=7F7YDN0zbc4&feature=youtu.be This is my current problem; Our stage, or environment is…
Pkerkm
  • 65
  • 1
  • 9
2
votes
1 answer

Displaying image using SOIL with OpenGL

I have a have following code which is supposed to display an image but the image never appears. GLuint tex_2d = SOIL_load_OGL_texture ( "ImageName.tga", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y |…
pranphy
  • 1,787
  • 4
  • 16
  • 22
2
votes
1 answer

SOIL: 'Unable to open file' in C++ and OpenGL with Xcode

I'm trying to load a texture file with SOIL. I tried to load an image from the project files and I also tried to load an image from the file system. When I try to load my image from the project SOIL_last_result() gives me the error: Unable to open…
hapablap
  • 379
  • 6
  • 23
2
votes
1 answer

Xcode: Can't build OpenGL project with SOIL

I try to run SOIL under Xcode in a C++ project with OpenGL. When I add the files to my project it automatically adds "libSOIL.a" to target's "Link Binary With Libraries". I added in my main.cpp: #include "lib/soil/src/SOIL.h" When I build the…
hapablap
  • 379
  • 6
  • 23
1 2
3
10 11