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 = uv.x to test my UVs) I looked at the threads OpenGL textures appear just black, and Texture is all black, but it seemed they had different problems. First I load my texture using SOIL image loading library: int w, h; unsigned char* img = SOIL_load