bgfxplatform.c99.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2011-2015 Branimir Karadzic. All rights reserved.
  3. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
  4. *
  5. * vim: set tabstop=4 expandtab:
  6. */
  7. #ifndef BGFX_PLATFORM_C99_H_HEADER_GUARD
  8. #define BGFX_PLATFORM_C99_H_HEADER_GUARD
  9. // NOTICE:
  10. // This header file contains platform specific interfaces. It is only
  11. // necessary to use this header in conjunction with creating windows.
  12. #include <bx/platform.h>
  13. typedef enum bgfx_render_frame
  14. {
  15. BGFX_RENDER_FRAME_NO_CONTEXT,
  16. BGFX_RENDER_FRAME_RENDER,
  17. BGFX_RENDER_FRAME_EXITING,
  18. BGFX_RENDER_FRAME_COUNT
  19. } bgfx_render_frame_t;
  20. /**
  21. * WARNING: This call should be only used on platforms that don't
  22. * allow creating separate rendering thread. If it is called before
  23. * to bgfx_init, render thread won't be created by bgfx_init call.
  24. */
  25. BGFX_C_API bgfx_render_frame_t bgfx_render_frame();
  26. typedef struct bgfx_platform_data
  27. {
  28. void* ndt;
  29. void* nwh;
  30. void* context;
  31. void* backBuffer;
  32. void* backBufferDS;
  33. } bgfx_platform_data_t;
  34. BGFX_C_API void bgfx_set_platform_data(bgfx_platform_data_t* _pd);
  35. #endif // BGFX_PLATFORM_C99_H_HEADER_GUARD