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
0
votes
0 answers

OpengGL - SOIL texture all black

I linked, included, and did everything necessary to use SOIL and it's functions. I load the texture like so in init(): void initRendering() { std::string vertexInputString="exampleVS.txt"; std::string fragmentInputString="exampleFS.txt"; //create…
shawn a
  • 799
  • 3
  • 13
  • 21
0
votes
1 answer

Loading 16-bit heightmaps with SOIL

I am trying to load a height map for terrain using SOIL. I use the following code: unsigned char* image = SOIL_load_image(fname.c_str(), &width, &height, 0, SOIL_LOAD_L); glBindTexture(GL_TEXTURE_2D, name); glTexImage2D(GL_TEXTURE_2D, 0,…
RostakaGmfun
  • 487
  • 6
  • 21
0
votes
1 answer

How to make the background of my texture transparent? (My image is already backgroundless)

I have a backgroundless image of a gun. I am trying to build a first person shooter game with the help of this 2D image of a gun. I have loaded the texture in my program but I am unable to make the background of the gun transparent. Moreover, why…
Harshit Sharma
  • 313
  • 4
  • 19
0
votes
1 answer

using Soil unresolved externals

i'm using Soil in my project,i add soil in my include directories and in my precompiled header i include "Soil.h". and for the library in my precompied header i add this: #pragma comment(lib,"SOIL") but i got this errors: LNK2019: unresolved…
0
votes
1 answer

OpenGL Image loading 64 bit depth

How can i load a PNG file that has 64 bit depth color in openGL? I have tried SOIL and SDL but he texture that it is displaying is white. For 32 bit depth works perfectly (only that if my PNG contains gradient it isn't displayed smoothly and the…
Andrew
  • 1,109
  • 1
  • 15
  • 27
0
votes
1 answer

opengl-soil try to put a texture for first time

i follow this tutorial http://open.gl/textures? i cannot understand these pieces of code and does not run in my visual studio project. Also, what type format is "in vec2" and "out vec3"?? in vec2 texcoord; out vec3 Color; out vec2 Texcoord; void…
maria
  • 467
  • 1
  • 5
  • 19
0
votes
0 answers

SOIL Library Linking Errors

I'm trying to use the SOIL library with freeglut and glew. I'm using Visual Studio 2012 on a Windows 8, 64bit laptop. I'm getting these errors: 1>libSOIL.a(stb_image_aug.o) : error LNK2019: unresolved external symbol __alloca referenced in function…
Numeri
  • 1,027
  • 4
  • 14
  • 32
0
votes
1 answer

Displaying image in openGL with SOIL

I'm trying to display an image in openGL using SDL and SOIL but it isn't working. Globals.h #include #include #include #include "player.h" main.cpp #include "Globals.h" int main(int argc, char** argv){ //Begin…
user2943571
0
votes
1 answer

Loading Picture in Screen using SOIL in C++ does not work

using SOIL library I tried to load an Image below the Grid that I drew; this is the code for this function: void ModelGL:: LoadTexture() { texture[0] =…
GolSa
  • 9
  • 1
  • 7
0
votes
0 answers

opengl generating a white box instead of a texture

I have the following code which I am using to render a texture: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable( GL_BLEND ); glClearColor(0.0,0.0,0.0,0.0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, *tex); …
user2673108
  • 309
  • 1
  • 5
  • 14
0
votes
1 answer

opengl displaying white box instead of texture

I have a texture which I am displaying using the following: glEnable (GL_BLEND); glEnable(GL_TEXTURE_2D); glBlendFunc (GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); glGenTextures(1, tex); glBindTexture (GL_TEXTURE_2D, *tex); …
user2673108
  • 309
  • 1
  • 5
  • 14
0
votes
2 answers

OpenGL SOIL Undefined reference to glBindTexture, glTexImage2d, etc

I'm using C++ and Opengl, and I'm trying to use SOIL, but when I compile, I get undefined reference to glBindTexture, glTexImage2D, etc. However, this is only coming from SOIL.c, not my own source code. This is what the error…
mepmerp
  • 701
  • 1
  • 9
  • 16
0
votes
1 answer

SOIL not displaying the images

I have a problem with SOIL in C++. The problem is when i try to load am image from a path given, it only show white. First i load it into the memory as follows: _t = SOIL_load_OGL_texture(_texture.c_str(), SOIL_LOAD_AUTO, …
Steffen
  • 143
  • 1
  • 5
0
votes
1 answer

OpenGL,SOIL: Can I load a small png file or any size I want?

I'm learning OpenGL and I used SOIL lib to map a texture(PNG file) to a quad (follow NeHe tutorials).NeHe used a image size 256x256. Can I use a smaller picture ?(any size or power of 2 size) ? my load texture function: int LoadGLTextures() …
Kỳ Khoa
  • 3
  • 2
0
votes
2 answers

SOIL Unhandled exception at 0x585727FF

I have an error I don't know how to solve. I created a simple program, using VS2012, in order to test SOIL (sample code from SOIL's website): #include "SOIL.h" #include #include #include int main() { std::cout <<…
Nicolai Lissau
  • 7,298
  • 5
  • 43
  • 57
1 2 3
10
11