opengl renderer: Enable and fix renderer Mac support

The following enables the renderer build on darwin.
Moved platform specific type declarations from render_api.h
to render_api_platform_types.h so it can be included from the
objective c code.
Fixed subwindow to use EmuGLView which overrides NSView to prevent
background drawing of the view.
This commit is contained in:
Guy Zadickario
2011-06-30 16:06:57 +03:00
committed by Guy Zadickario
parent 2683b10bdd
commit b68a421908
10 changed files with 68 additions and 49 deletions

View File

@@ -17,28 +17,7 @@
#define _OPENGL_RENDERER_RENDER_API_H
#include "IOStream.h"
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
#include <windows.h>
typedef HDC FBNativeDisplayType;
typedef HWND FBNativeWindowType;
#elif defined(__linux__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
typedef Window FBNativeWindowType;
#elif defined(__APPLE__)
typedef void* FBNativeWindowType;
#else
#warning "Unsupported platform"
#endif
#include "render_api_platform_types.h"
//
// initOpenGLRenderer - initialize the OpenGL renderer process.

View File

@@ -0,0 +1,25 @@
#ifndef _RENDER_API_PLATFORM_TYPES_H
#define _RENDER_API_PLATFORM_TYPES_H
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
#include <windows.h>
typedef HDC FBNativeDisplayType;
typedef HWND FBNativeWindowType;
#elif defined(__linux__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
typedef Window FBNativeWindowType;
#elif defined(__APPLE__)
typedef void* FBNativeWindowType;
#else
#warning "Unsupported platform"
#endif
#endif // of _RENDER_API_PLATFORM_TYPES_H