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
3
votes
1 answer

How to crop an SOIL loaded image

I am trying to crop an image loaded thanks to SOIL library, before using it as a texture. So first, how can I load an image, and then convert it to a texture ? And secondly, how to modify (crop, etc..) the image loaded ? This is what I would like…
Rafutk
  • 196
  • 1
  • 1
  • 15
3
votes
0 answers

Compiling SOIL with Clion

I've tried to use SOIL on one of my projects, but it needs to be compiled first, because it is not a header-only library. Unfortunately, attempting such with Clion only delivers lots of compiler errors, as the project wasn't made with CMake. I've…
L. Kue
  • 473
  • 5
  • 19
3
votes
1 answer

Simple OpenGL Image Library (SOIL) Uses deprecated functionality?

This tutorial states the following regarding the SOIL library: Although SOIL includes functions to automatically create a texture from an image, it uses features that aren't available in modern OpenGL. Because of this we'll simply use SOIL as image…
Baggers
  • 3,183
  • 20
  • 31
3
votes
4 answers

undefined reference to `SOIL_load_OGL_texture'?

I am don't know why this keeps saying: undefined reference to "SOIL_load_OGL_texture This is the code: GLuint loadtex( const char* texname ) { GLuint texture = SOIL_load_OGL_texture( texname, …
user2555141
3
votes
5 answers

Loading texture using SOILs OGL function and OpenGL

I have a function to load a texture from a JPEG image using SOIL. So far I have been loading the texture with the SOIL_load_image() function and then supplying the image to OpenGL using glTexImage2D (see code below). However! My textures is upside…
Købmanden
  • 117
  • 1
  • 2
  • 10
3
votes
1 answer

Sampling from a texture in OpenGL is black

I'm trying out my hand at graphics, following a tutorial at http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_06 Problem: When I try to texture my cube, my sample is black. Screenshot: http://puu.sh/2JP1H.jpg (note: I set blue =…
nate
  • 58
  • 1
  • 1
  • 6
2
votes
1 answer

Using SOIL.lib with GCC - Error adding symbols: File format not recognised

I've been recently trying to transfer my Visual Studio OpenGL project to VS Code, using GCC via mingw-x64 on Windows 10. I've been making steady progress working this all out as I am fairly new to c++ programming, and I've been running into an error…
2
votes
2 answers

Including SOIL2 library in a CMake project

I'm trying to include SOIL2 in my C++ OpenGL project. So far I've downloaded the library from https://github.com/SpartanJ/SOIL2 built it by running premake 4 and make. copied the src/SOIL2/ directory to /usr/local/include tried adding…
Dan Quinn
  • 41
  • 4
2
votes
2 answers

Problem with adding texture to triangle using SOIL in OpenGL

This is an error that appears when trying to load the texture: This is my working directory: Down below is the location of my texture images I tried adding a texture to a triangle however something seems to go wrong. When trying to run debug there…
Lola
  • 218
  • 1
  • 11
2
votes
1 answer

Textures appear blur when it's not the last one loaded

I'm trying to load several textures (minecraft ones) and applying them to cubes. I load the textures with SOIL: GLuint loadTex(const char * path) { GLuint image = SOIL_load_OGL_texture // load an image file directly as a new OpenGL texture …
ero.rom
  • 43
  • 5
2
votes
1 answer

OpenGL - SOIL won't load JPG or PNG image

I'm trying to make a context loader in OpenGL and I can't get SOIL to load an image. Here is the code: Texture2D TextureLoader::loadSprite(const char* path) { int width, height; GLuint texture = SOIL_load_OGL_texture(path, SOIL_LOAD_RGBA,…
liaquore
  • 403
  • 8
  • 22
2
votes
1 answer

SOIL image loading library Parameters

I am using this SOIL function to load texture files in OpenGL. However i would like to access: Height and Width of the loaded image. Bpp (pixel value per bytes) of the image (8, 24 etc). The data pointer. The given function does not return any of…
nikos-k
  • 67
  • 7
2
votes
2 answers

OpenGL 4.3 incorrectly mapping 4th texture coordinate to the same poisition as the 3rd texture coordinate

When I run this program, it seems to only be mapping my textures to 3 sides of a right angle triangle (the first 3 points in my vertices array), and completely missing out the fourth, as when I change that bit, nothing changes in the image.…
Sheen
  • 586
  • 10
  • 22
2
votes
1 answer

how to save sensor data output into excel using python

I'm currently working with raspberry pi and using DHT11 to read temperature and humidity values every second. I have to save these values into a database in real time. here's my code that showing sensor data every second, I don't know how to save…
aizack
  • 59
  • 1
  • 6
2
votes
1 answer

Texture not appearing on the screen Opengl

I want to load an image on the background, I have written following code to load the texture as background by texturing the Rectangle. My image is in power of 2 (512x512). I am not getting why it is not showing anything on the screen, please help me…
Pramay
  • 47
  • 4
1
2
3
10 11