In NaCl the wheel event is something completely different than mouse
event and in my opinion overly complicated (the scrolled distance is
measured in pixel precision!).
To preserve at least some compatibility with other toolkits, the events
are shoved into normal MouseEvent. Sadly the event doesn't contain any
position information.
Take text size into account when advancing lines. I would probably not
run into this issue if I would visually test this on anything else than
unscaled pixel art font.
Because we can't forward-declare class members we would need to include
whole Mesh (along with all OpenGL headers and other stuff) just to use
Primitive enum. The old Mesh::Primitive is now alias to new one, is
marked as deprecated and will be removed in future release.
Don't do anything to respond to viewport size by default, as the window
has fixed size in most cases anyway (always fullscreen, canvas of fixed
size in browser etc.). Makes the initial implementation requirements
much simpler and shorter.
* The default (empty) implementation of virtuals shouldn't be called,
thus this effectively protects the user from doing it.
* Only the application itself knows best when and how to call
rendering-related functions such as swapBuffers() and redraw(), thus
they are protected.
* Functions for setting up fullscreen or hiding the mouse may be called
from user code outside the application, thus they are kept public.
We need to create one instance, send it to subclasses and then check its
state, thus we expect that the user always operatres with the original
instance.
They are something like singletons (or they expect that behavior
internally), moreover some code might hold pointer to them, thus
movement is not desired.
Somebody would just want to defer context creation after parsing
arguments or doing some validations without any particular setup, thus
having to write even the {} is annoying.
Added missing tryCreateContext() implementations. Error messages are
printed only by tryCreateContext(), createContext() is only a thin
wrapper which exits the application if tryCreateContext() fails and
doesn't print any additional information on the output.
Hopefully I didn't break anything :-)
Sdl2Application is now taken as base implementation (it was GLUT
previously) and all others are copying/referencing the documentation
from it. When SDL2 is included in all major distributions (Ubuntu, I'm
looking at you), it will replace GLUT as the default application.