Initially planned as alternative, made replacement after discussion with
minggo.
Summary:
GLFW v.3 released in June. New version breaks API without real need:
http://cocos2d-x.org/boards/6/topics/31277
Meanwhile SDL2 is very stable. SDL2 used in Steam Runtime and will be
part of Ubuntu SDK, it's supported by other distributions.
Completed:
- OpenGL initialization and window handling with SDL
- Keyboard, IME emulation, mouse and touches support with SDL
- Window title now contains app name on Linux
- Backspace correctly handled with new backend
Note:
- SDL on X11 have no proper multitouch, but backend handles multitouch
events to support future Linux graphics.
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`
Also, converts the class `DrawPrimitives` into a namespace
and other best pracitces like:
capacity and "index" are ints and not unsigned int (google's recomendation).
It is easier to detect underflow bugs like this
plus other minor improvements
- Adds more `const` in getters
- Overriden methods have the `override` keyword
- Reorganizes the structure of the class:
# creators first, then constructor, destructors, init
# then overridden methods
# variables at the end
- removes Hungarian notation from parts of the code
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.
common files + Mac files + iOS files + tests/samples files were updated.
The old methods are deprecated now.
This is the 1st patch of 3.
1)
Removes the copyWithZone() patterns.
Adds the clone() pattern instead (which is more C++ friendly)
Adds also "const" to getters.
...and add functionality on the Director to override the default values
from the config file.
Supported values:
- cocos2d.x.fps
- cocos2d.x.display_fps
- cocos2d.x.gl.projection
- cocos2d.x.texture.pixel_format_for_png
- cocos2d.x.texture.pvrv2_has_alpha_premultiplied
If the "config.plist" file is not present, or some keys are not present,
the default values are going to be used
IMPORTANT:
The folder "samples/Cpp/TestCpp/Resources/configs" needs to be added
in the Android, Linux, Win32 projects.
Already added in OS X and iOS Xcode projects.