check that GL renderer defines make sense
This commit is contained in:
parent
3ccd635824
commit
334334a366
@ -10,6 +10,14 @@
|
||||
|
||||
#if defined(TB_RENDERER_GL)
|
||||
|
||||
#if defined(TB_RENDERER_GLES_1) && defined(TB_RENDERER_GLES_2)
|
||||
#error "Both GLES_1 and GLES_2 defined"
|
||||
#elif defined(TB_RENDERER_GLES_1) && defined(TB_RENDERER_GL3)
|
||||
#error "Both GLES_1 and GL3 defined"
|
||||
#elif defined(TB_RENDERER_GLES_2) && defined(TB_RENDERER_GL3)
|
||||
#error "Both GLES_2 and GL3 defined"
|
||||
#endif
|
||||
|
||||
#ifdef TB_RENDERER_GLES_1
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
|
43
src/tb/tb_clipboard_sdl2.cpp
Normal file
43
src/tb/tb_clipboard_sdl2.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
// ================================================================================
|
||||
// == This file is a part of Turbo Badger. (C) 2011-2014, Emil Segerås ==
|
||||
// == See tb_core.h for more information. ==
|
||||
// ================================================================================
|
||||
|
||||
#include "tb_system.h"
|
||||
|
||||
#ifdef TB_CLIPBOARD_SDL2
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include "SDL/SDL.h"
|
||||
#else
|
||||
#include "SDL2/SDL.h"
|
||||
#endif
|
||||
|
||||
namespace tb {
|
||||
|
||||
// == TBClipboard =====================================
|
||||
|
||||
void TBClipboard::Empty()
|
||||
{
|
||||
SetText("");
|
||||
}
|
||||
|
||||
bool TBClipboard::HasText()
|
||||
{
|
||||
return SDL_HasClipboardText();
|
||||
}
|
||||
|
||||
bool TBClipboard::SetText(const char *text)
|
||||
{
|
||||
return (0 == SDL_SetClipboardText(text));
|
||||
}
|
||||
|
||||
bool TBClipboard::GetText(TBStr &text)
|
||||
{
|
||||
if (const char *str = GetClipboardText())
|
||||
return text.Set(str);
|
||||
}
|
||||
|
||||
} // namespace tb
|
||||
|
||||
#endif // TB_CLIPBOARD_SDL2
|
@ -68,7 +68,7 @@
|
||||
|
||||
/** Enable renderer using OpenGL ES. This renderer depends on TB_RENDERER_GL.
|
||||
It is using GL ES version 2. */
|
||||
#define TB_RENDERER_GLES_2
|
||||
//#define TB_RENDERER_GLES_2
|
||||
|
||||
/** The width of the font glyph cache. Must be a power of two. */
|
||||
#define TB_GLYPH_CACHE_WIDTH 512
|
||||
|
Loading…
Reference in New Issue
Block a user