Hacker News new | past | comments | ask | show | jobs | submit login
Glitter – Dead-simple boilerplate for OpenGL (github.com/polytonic)
68 points by Polytonic on Aug 29, 2015 | hide | past | favorite | 16 comments



FYI one of the lesser known features of cmake is that it can invoke your build tool as well:

    cmake ..
    cmake --build .
This smartly invokes make/ninja/msbuild or whatever directly from the command line; very useful on windows machines or to have 'universal' cmake runners for CI that touches multiple platforms.

(Also, tutorials; `cmake .. && cmake --build .` should smartly determine the correct compiler for the system and build it; you don't need the -G "FOO" stuff unless you're specifically doing something fancy)


TIL! This is awesome! I never knew about this.

What does it do under Windows? Does it run say, devenv.exe/msbuild in the shell, as opposed to in Visual Studio?


Yes, that's exactly what it does, if you're using the VS backend (which is the default).

(So you can actually be in 100% console mode in windows if you want and never launch VS. :)


To help improve my OpenGL/graphics knowledge, I've started going through GPU Gems ( https://a248.e.akamai.net/f/248/10/10/http.developer.nvidia.... ) and building my own examples of the concepts in each chapter. I was very happy to find Glitter recently, as it made the obnoxious hurdle of setting up all the dependencies unnecessary.

Also, setting up Glitter was what led me to finally "getting" what CMake was for and how it fit into a development pipeline.


Yeah, CMake is a bit of a complicated beast to "learn" so to speak. I spent a fair number of hours pulling my hair out trying to get it working.

This is the result! Hope you find it helpful!


Is there a particular reason you choose to explicitly add CXX flags ('-std=c++11') over CMake's compiler feature support? The later is, in principle, more portable and future proof than hardcoding the flags.


This was asked in an issue earlier today. It's a combination of 1) I didn't even know such flags existed! and 2) I had some compatibility issues with older versions of CMake on my test machines.

I'll look into adding it in the future though!


This might be easier on the eyes for people as well: http://polytonic.github.io/Glitter/

Looks a bit prettier than the default GitHub repository page anyway.


Neat, thanks for your work!

Newbie interested in OpenGL here, I followed the instructions but get a segfault, any idea? I pasted my session at http://pastebin.com/hxXauQSQ


Hi, can you open a GitHub issue for this? Would prefer to keep problems centralized to the repository.


Sure, will do, I was just thinking it was some error of mine.


Hey, I noticed you haven't actually opened an issue. Did you work through your problem or ...?


Sorry, got busy just after posting. Here's a GitHub issue: https://github.com/Polytonic/Glitter/issues/8


[deleted]


By "developer" is this from the perspective of say, a company looking to use Glitter as a starting point for something?

Glitter started off as a quickstart for students taking Computer Graphics related classes at my school, not as the foundation for writing commercial game engines.

Was there something in mind that you feel like is missing? I'm happy to add to the readme.


Super cool! How does this compare to the (now mostly defunct) GLUT?


GLUT is a windowing library. GLFW3, SDL, SFML mostly replace everything it does in terms of windowing and input.

:)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: