2013-01-13 18:35:06 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2011-2013 Branimir Karadzic. All rights reserved.
|
|
|
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __BGFXPLATFORM_H__
|
|
|
|
#define __BGFXPLATFORM_H__
|
|
|
|
|
2013-01-14 01:44:04 -05:00
|
|
|
// NOTICE:
|
|
|
|
// This header file contains platform specific interfaces. It is only
|
|
|
|
// necessary to use this header in conjunction with creating windows.
|
|
|
|
|
2013-01-13 18:35:06 -05:00
|
|
|
#include <bx/bx.h>
|
|
|
|
|
2013-04-16 02:10:32 -04:00
|
|
|
#if BX_PLATFORM_ANDROID
|
|
|
|
struct android_app;
|
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
|
|
|
androidSetAndroidApp(struct android_app* _app);
|
|
|
|
} // namespace bgfx
|
|
|
|
|
|
|
|
#elif BX_PLATFORM_LINUX
|
2013-01-13 18:35:06 -05:00
|
|
|
# include <X11/Xlib.h>
|
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
|
|
|
void x11SetDisplayWindow(::Display* _display, ::Window _window);
|
|
|
|
} // namespace bgfx
|
|
|
|
|
|
|
|
#elif BX_PLATFORM_NACL
|
|
|
|
# include <ppapi/c/ppb_graphics_3d.h>
|
|
|
|
# include <ppapi/c/ppb_instance.h>
|
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
|
|
|
typedef void (*PostSwapBuffersFn)(uint32_t _width, uint32_t _height);
|
|
|
|
void naclSetIntefraces(::PP_Instance, const ::PPB_Instance*, const ::PPB_Graphics3D*, PostSwapBuffersFn);
|
|
|
|
} // namespace bgfx
|
|
|
|
|
|
|
|
#elif BX_PLATFORM_WINDOWS
|
|
|
|
# include <windows.h>
|
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
2013-01-13 21:39:25 -05:00
|
|
|
void winSetHwnd(::HWND _hwnd);
|
2013-01-13 18:35:06 -05:00
|
|
|
} // namespace bgfx
|
|
|
|
|
2013-01-15 23:37:07 -05:00
|
|
|
#elif BX_PLATFORM_OSX
|
|
|
|
# include <Cocoa/Cocoa.h>
|
|
|
|
# include <stdlib.h>
|
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
|
|
|
void osxSetNSWindow(void* _nsWindow);
|
|
|
|
} // namespace bgfx
|
|
|
|
|
2013-01-13 18:35:06 -05:00
|
|
|
#endif // BX_PLATFORM_
|
|
|
|
|
|
|
|
#endif // __BGFXPLATFORM_H__
|