Currently just regenerated the stock headers using flextGL, reducing
line count a bit. No dynamic extension loading or function pointers yet,
trying to make as little changes as possible.
It makes sense, but this ordering also helps to avoid bug in Doxygen
1.8.6+ which merges next non-xrefitem section with the previous one (so
e.g. the TODO list contained the following @see block, which is not
desired).
Each class should now have *everything* needed in its documentation,
nothing is left out. Most of the text was taken from README in
magnum-bootstrap repository.
The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
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.
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.
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.
Better API for handling more than one application screens (context
switching, event propagation etc.). Taken from Push The Box, updated to
current coding style and templated.
In addition to 37e4f9d6f7 which did the
change for Sdl2Application (because Emscripten required it), making sure
that everything (except GLUT, which does it by default) behaves the
same.
Moreover, some applications don't expect viewport size changes at all
(e.g. the app can't change size of immutable texture used for rendering)
and thus the original way to defer the initialization until
viewportEvent() is called would be overly complicated.
Also, since framebuffer classes store viewport size in them, there is no
need to call viewportEvent() on initialization. The current ways to do
the initial call in Sdl2Application, *XApplication and NaClApplication
were nothing more than ugly workarounds for mimicking GLUT behavior,
which is bad.
Lastly, to be sure that nothing breaks in user apps, I did this change
in magnum-bootstrap long ago and all bootstrap application behave the
right way.
Doing it the same way as in Sdl2Application, as this doesn't have any
performance impact (just alias for already present variable).
The other way around, i.e. combining mouse buttons and keyboard
modifiers in Sdl2Application, would have unnecessary performance
penalty, as keyboard modifiers must be queried with separate function,
even if they won't probably be used at all.
Qt employs similar approach.
The old way is preserved for backwards compatibility, but marked as
deprecated and will be removed in future releases.
In 1.8.5 it is now possible to reference directly to enum member.
Hooray! Also added explicit @ref here and there, fixing some referencing
bugs along the way.
As it now isn't passed by pointer, this allows doing things like this:
/* Lost all hope in this hardware */
if(!awesomeFeatureSupported)
createContext({});
The page now displays download progress, last error and also hints to
the user that JS console might contain something useful. NaClApplication
and WindowlessNaClApplication documentation has been updated with brief
"bootstrap guide".