This is a rough outline of the procedure necessary to add support for a new SDK or platform to VVGL/VVISF:
- Create a new "VVGL_SDK_****" define for the platform/SDK you want to add. Open VVGL_Defines.hpp, and add your new SDK define to the if/elif/endif statement, being sure to define which GL environments you want your SDK to be compiled against. This just defines which GL environments (like GLES/GL4/etc) VVGL/VVISF will be compiled against- you should make sure that all GL environments that will be available at runtime are specified here (VVGL and VVISF support multiple versions of GL at runtime, but when you compile these libs you need to ensure that they include code for the relevant versions of OpenGL you'll be working with). You should probably add the define you created to "VVGL_HardCodedDefines.hpp", too.
- Add a new implementation for GLContext for the new platform/SDK by creating a new GLContext_XXXX.cpp file and populating it with an implementation of GLContext using the desired platform/SDK. GLContext is a platform-agnostic representation of a GL context- typically, this means that the GLContext implementation you're writing needs a strong reference to your SDK-specific GL context object, and you should also fill in a couple other basic methods that make the context current if it's not current, make a context in the same sharegroup, etc. Five implementations of GLContext are provided for various SDKs/platforms, and can be used as templates for adding more.
- The texture types available differ from platform to platform- for convenience, you'll want to create a header file that lists the enums for the OpenGL texture targets/internal formats/pixel formats/pixel types available in your SDK. You should pattern this header file after one of the existing header files (GLBuffer_XXXX_Enums.h), and ensure that it's included in GLBuffer.hpp using the VVGL_SDK define you created.
- GLBufferPool.hpp declares a variety of functions that create GL textures, returned as GLBufferRef instances. These functions are defined in GLBufferPool.cpp, and you should check their implementations briefly to ensure that the resources they're creating are available on your platform (it's likely that you'll get a compiler error if they aren't, but it can't hurt to check).
- Send me a pull request!