mirror of https://github.com/mosra/magnum.git
Browse Source
Resolves some linker errors in Windows, removes code bloat from Platform namespace (previously it was copied in _every_ *Application). Originally this was in Platform namespace because I thought that it would be possible to have one version of Magnum library for both desktop and ES and the actual Application would determine which GL edition will be used. Fun idea, but it would remove the static checks (e.g. accidentaly using geometry shaders on ES), which isn't worth it.pull/23/head
8 changed files with 19 additions and 130 deletions
@ -1,48 +0,0 @@
|
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a |
||||
copy of this software and associated documentation files (the "Software"), |
||||
to deal in the Software without restriction, including without limitation |
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||
and/or sell copies of the Software, and to permit persons to whom the |
||||
Software is furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included |
||||
in all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||
DEALINGS IN THE SOFTWARE. |
||||
*/ |
||||
|
||||
#include "ExtensionWrangler.h" |
||||
|
||||
#include <cstdlib> |
||||
#include <Utility/Debug.h> |
||||
|
||||
#include "Magnum.h" |
||||
#include "OpenGL.h" |
||||
|
||||
namespace Magnum { namespace Platform { |
||||
|
||||
void ExtensionWrangler::initialize() { |
||||
#ifndef MAGNUM_TARGET_GLES |
||||
/* Init glLoadGen. Ignore functions that failed to load (described by
|
||||
`ogl_LOAD_SUCCEEDED + n` return code), as we requested the latest OpenGL |
||||
with many vendor extensions and there won't ever be a driver supporting |
||||
everything possible. */ |
||||
if(ogl_LoadFunctions() == ogl_LOAD_FAILED) { |
||||
Error() << "ExtensionWrangler: cannot initialize glLoadGen"; |
||||
std::exit(1); |
||||
} |
||||
#endif |
||||
} |
||||
|
||||
}} |
||||
@ -1,44 +0,0 @@
|
||||
#ifndef Magnum_Platform_ExtensionWrangler_h |
||||
#define Magnum_Platform_ExtensionWrangler_h |
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a |
||||
copy of this software and associated documentation files (the "Software"), |
||||
to deal in the Software without restriction, including without limitation |
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||
and/or sell copies of the Software, and to permit persons to whom the |
||||
Software is furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included |
||||
in all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||
DEALINGS IN THE SOFTWARE. |
||||
*/ |
||||
|
||||
/** @file
|
||||
* @brief Class Magnum::Platform::ExtensionWrangler |
||||
*/ |
||||
|
||||
namespace Magnum { namespace Platform { |
||||
|
||||
/** @brief %Extension wrangler interface */ |
||||
class ExtensionWrangler { |
||||
public: |
||||
ExtensionWrangler() = delete; |
||||
|
||||
/** @brief Initialize extension wrangler */ |
||||
static void initialize(); |
||||
}; |
||||
|
||||
}} |
||||
|
||||
#endif |
||||
Loading…
Reference in new issue