source: trunk/src/lib/sdl.cc @ 355

Last change on this file since 355 was 326, checked in by epyon, 11 years ago
  • window_manager interface added
  • input interface added
  • sdl::window_manager and sdl::input added
  • gl_device/gl_window/gl_context made oblivious to sdl
  • currently some setup is required, application class needed
File size: 783 bytes
RevLine 
[319]1// Copyright (C) 2012-2014 ChaosForge Ltd
[5]2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6
[170]7#include "nv/lib/sdl.hh"
[5]8
9#if defined( NV_SDL_DYNAMIC )
10
[319]11#include "nv/core/library.hh"
[5]12
[170]13#define NV_SDL_FUN( rtype, fname, fparams ) rtype (NV_SDL_APIENTRY *fname) fparams = nullptr;
14#include <nv/lib/detail/sdl_functions.inc>
[168]15#undef NV_SDL_FUN
[5]16
17bool nv::load_sdl_library( const char* path )
18{
[109]19        static nv::library sdl_library;
20        if ( sdl_library.is_open() ) return true;
21        sdl_library.open( path );
[170]22#       define NV_SDL_FUN( rtype, fname, fparams ) *(void **) (&fname) = sdl_library.get(#fname);
23#       include <nv/lib/detail/sdl_functions.inc>
[168]24#       undef NV_SDL_FUN
[5]25        return true;
26}
27#endif
Note: See TracBrowser for help on using the repository browser.