Saturday, December 28, 2013

New OpenGL API: Mix pure OpenGL calls with the SDL2 Render API!

Hello fellow programmers!


I'm writing this post to announce the new API that was added in the library only yesterday, namely SDLU_GL_RenderCacheState() and SDLU_GL_RenderRestoreState().

These two functions allow you to mix pure OpenGL, OpenGL ES or OpenGL ES 2 calls with the SDL2 Render API. They dynamically load the required OpenGL symbols that are used, and so all OpenGL libraries (desktop GL, GLES, GLES2) are supported.

Example:

SDL_RenderClear(sdl_renderer);
SDL_RenderDrawPoint(sdl_renderer, 100, 100);

SDLU_GL_RenderCacheState(sdl_renderer);
glColor3f(1,0,0);
glRecti(150, 150, 200, 200);
SDLU_GL_RenderRestoreState(sdl_renderer);

SDL_RenderPresent(sdl_renderer); 
 
For a complete example, you might want to check out testrender2 (link).

-- Aggelos Kolaitis

Wednesday, December 18, 2013

Source code snapshot [18/12/13]

The following new things are included in the source code snapshot:

Build System:
  • Added '--enable-cxx' and '--enable-debug' configure options
  • Initial support for cross-compilation of the Raspberry Pi port from Linux
  • Many bug fixes in the build system
  • Added sdlu-config script 
API Additions:
  • Added ini file handling API
  • Added new math API (for vector manipulation)


I have uploaded the source code snapshots as zip or tar.gz archives in the Downloads section of the repository over at bitbucket. The snapshots contain the latest source code, along with pre-generated documentation by doxygen.

If you have a copy of the git repository, the snapshot is tagged with the name snapshot-181213. (181213 stands for 18/12/13, I just don't like having slashes '/' in the tag name).

As always please test the library, run the test programs and report issues at the issue tracker.

-- Aggelos Kolaitis

Thursday, November 28, 2013

Source code snapshot [28/11/13]

This is the first source code snapshot since the 2.0.1 release. For a list of changes, see the ChangeLog.

I have uploaded the source code snapshots as zip or tar.gz archives in the Downloads section of the repository over at bitbucket. The snapshots contain the latest source code, along with pre-generated documentation by doxygen.

If you have a copy of the git repository, the snapshot is tagged with the name snapshot-281113. (281113 stands for 28/11/13, I just don't like having slashes '/' in the tag name).

As always please test the library, run the test programs and report issues at the issue tracker.

-- Aggelos Kolaitis

Tuesday, November 26, 2013

Development State [26/11/13]

  • Over the past two weeks, almost all of my time working with SDLU was spent at updating the build system. Here's the detailed info:

Build System:
  • Added new autotools build system
  • Added CMake build system for the tests
  • Added ability to link to OpenGL ES on desktop platforms [premake]  
  • Fixed compatibility with premake 4.3
  • Lots of bug fixes
API Changes:
    none

Misc Changes:
  • Increased speed of SDLU_RenderSetPoints()
  • Fixed common test code build errors for Android 
  • Removed old-unused code from the Button API
-- Aggelos Kolaitis