Overv / Open.GL

The source code and content of Open.GL.
http://open.gl/
1.07k stars 259 forks source link

Quickstart Boilerplate #43

Closed Polytonic closed 9 years ago

Polytonic commented 9 years ago

I put together an OpenGL quickstart boilerplate a while back while working through your tutorials and the LearnOpenGL tutorials. I opened an issue to add it to LearnOpenGL see LearnOpenGL#11. I figured this may be of interest to this series of tutorials as well. Basically it bundles all the dependencies as submodules and statically compiles/links to avoid any dll-copying or installation headaches. I've verified that it works across all major platforms.

Is this of any use to you?

Overv commented 9 years ago

Nice work! I've added a link in the sidebar and a reference to it in the context creation chapter.

Polytonic commented 9 years ago

Awesome! One more comment:

You'll just have to install SOIL separately.

I actually bundle stb which includes stb_image. SOIL wraps stb_image, and it looked unmaintained when I last checked it out. I don't know how much of the extra bits of SOIL you are using (e.g. cubemaps). It may be possible to just get by with stb, and then not have to link with SOIL's libfile.

SOIL

unsigned char* image = SOIL_load_image("img.png", &width, &height, 0, SOIL_LOAD_RGB);

STB (see Glitter/Samples/mesh.cpp#L139 for a full example)

unsigned char* image = stbi_load("img.png", &width, &height, &channels, 0);
Overv commented 9 years ago

Fair enough, I'll see if I can change the main tutorial to use STB.