10 #ifndef SDK_OS_SPECIFIC_TYPES_H_
11 #define SDK_OS_SPECIFIC_TYPES_H_
16 #include <base/inc/sdk_pshpack1.h>
21 #if defined(SDK_OS_WIN) // Windows
24 # if defined(SDK_GRAPHICS_USE_DIRECTX_10_1)
28 # undef ERROR // ERROR macros definition intersects with google ERROR definition
30 # endif // SDK_GRAPHICS_USE_DIRECTX_10_1
31 #elif defined(SDK_OS_LINUX) // Linux
32 # if defined(SDK_DONT_USE_X11)
34 # elif !defined(SDK_USE_X11)
36 # endif // SDK_DONT_USE_X11
38 # include <X11/Xlib.h>
43 # include <GLES2/gl2.h>
45 # endif // SDK_USE_X11
46 #elif defined(SDK_OS_ANDROID) // Android
50 # error Specific includes for given platform should be defined
53 #include <base/inc/sdk_pshpack1.h>
60 #if defined(SDK_OS_WIN)
62 SDK_PACK(
struct OSWindow
66 #elif defined(SDK_OS_LINUX)
70 SDK_PACK(
struct OSWindow
74 XVisualInfo* visual_info;
80 DummyWindow(
int x,
int y,
int width,
int height) {}
81 virtual ~DummyWindow() {}
82 virtual int PutBitmapToWindow(
int x,
int y,
const void* bits,
int width,
83 int height,
int stride,
int format) {
return 0; }
84 virtual int getSize(
unsigned long int* width,
85 unsigned long int* height) {
return 0; }
87 typedef DummyWindow* OSWindow;
88 # endif // SDK_USE_X11
90 #elif defined(SDK_OS_ANDROID)
93 SDK_PACK(
struct OSWindow
95 int not_implemented_for_android;
99 # error Definition of OSWindow required
107 #if defined(SDK_OS_WIN)
109 SDK_PACK(
struct OpenGLGraphicsDeviceContext
112 HGLRC opengl_context;
114 #elif defined(SDK_OS_LINUX)
118 SDK_PACK(
struct OpenGLGraphicsDeviceContext
121 GLXContext opengl_context;
124 class DummyGraphicsDeviceContext
127 DummyGraphicsDeviceContext(DummyWindow* window = NULL);
128 DummyGraphicsDeviceContext(
const DummyGraphicsDeviceContext& other);
129 DummyGraphicsDeviceContext& operator=(
const DummyGraphicsDeviceContext& rhs);
130 ~DummyGraphicsDeviceContext();
131 static bool isNoneCurrent();
141 typedef DummyGraphicsDeviceContext* OpenGLGraphicsDeviceContext;
142 # endif // SDK_USE_X11
144 #elif defined(SDK_OS_ANDROID)
147 SDK_PACK(
struct OpenGLGraphicsDeviceContext
149 int not_implemented_for_android;
153 # error Definition of OpenGLGraphicsDeviceContext required
159 #include <base/inc/sdk_poppack.h>
161 #endif // SDK_OS_SPECIFIC_TYPES_H_