Commit c11d706e authored by cutealien's avatar cutealien

Get rid of some nested anon types.

Unfortunately more tricky to get rid of those in S4dVertex, so can't fix em all.
Reason is that pedandic clang no longer likes those in newer clang versions. 


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4766 dfc29bdd-3216-0410-991c-e03cc46cb475
parent c6c974f3
...@@ -27,58 +27,61 @@ struct SExposedVideoData ...@@ -27,58 +27,61 @@ struct SExposedVideoData
SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;} SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;}
explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;} explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;}
struct SD3D9
{
//! Pointer to the IDirect3D9 interface
IDirect3D9* D3D9;
//! Pointer to the IDirect3DDevice9 interface
IDirect3DDevice9* D3DDev9;
//! Window handle.
/** Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd) */
void* HWnd;
};
struct SD3D8
{
//! Pointer to the IDirect3D8 interface
IDirect3D8* D3D8;
//! Pointer to the IDirect3DDevice8 interface
IDirect3DDevice8* D3DDev8;
//! Window handle.
/** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.D3D8.HWnd) */
void* HWnd;
};
struct SOpenGLWin32
{
//! Private GDI Device Context.
/** Get if for example with: HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc) */
void* HDc;
//! Permanent Rendering Context.
/** Get if for example with: HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc) */
void* HRc;
//! Window handle.
/** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd) */
void* HWnd;
};
struct SOpenGLLinux
{
// XWindow handles
void* X11Display;
void* X11Context;
unsigned long X11Window;
};
union union
{ {
struct SD3D9 D3D9;
{ SD3D8 D3D8;
//! Pointer to the IDirect3D9 interface SOpenGLWin32 OpenGLWin32;
IDirect3D9* D3D9; SOpenGLLinux OpenGLLinux;
//! Pointer to the IDirect3DDevice9 interface
IDirect3DDevice9* D3DDev9;
//! Window handle.
/** Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd) */
void* HWnd;
} D3D9;
struct
{
//! Pointer to the IDirect3D8 interface
IDirect3D8* D3D8;
//! Pointer to the IDirect3DDevice8 interface
IDirect3DDevice8* D3DDev8;
//! Window handle.
/** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.D3D8.HWnd) */
void* HWnd;
} D3D8;
struct
{
//! Private GDI Device Context.
/** Get if for example with: HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc) */
void* HDc;
//! Permanent Rendering Context.
/** Get if for example with: HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc) */
void* HRc;
//! Window handle.
/** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd) */
void* HWnd;
} OpenGLWin32;
struct
{
// XWindow handles
void* X11Display;
void* X11Context;
unsigned long X11Window;
} OpenGLLinux;
}; };
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment