2023-10-03 20:37:00 +02:00
|
|
|
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
2024-02-25 22:01:20 +01:00
|
|
|
#pragma once
|
2023-10-03 20:37:00 +02:00
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
|
|
|
|
//! structure for holding data describing a driver and operating system specific data.
|
|
|
|
/** This data can be retrieved by IVideoDriver::getExposedVideoData(). Use this with caution.
|
|
|
|
This only should be used to make it possible to extend the engine easily without
|
|
|
|
modification of its source. Note that this structure does not contain any valid data, if
|
|
|
|
you are using the software or the null device.
|
|
|
|
*/
|
|
|
|
struct SExposedVideoData
|
|
|
|
{
|
2024-03-20 19:35:52 +01:00
|
|
|
SExposedVideoData()
|
|
|
|
{
|
|
|
|
OpenGLWin32.HDc = 0;
|
|
|
|
OpenGLWin32.HRc = 0;
|
|
|
|
OpenGLWin32.HWnd = 0;
|
|
|
|
}
|
|
|
|
explicit SExposedVideoData(void *Window)
|
|
|
|
{
|
|
|
|
OpenGLWin32.HDc = 0;
|
|
|
|
OpenGLWin32.HRc = 0;
|
|
|
|
OpenGLWin32.HWnd = Window;
|
|
|
|
}
|
2023-10-03 20:37:00 +02:00
|
|
|
|
|
|
|
struct SOpenGLWin32
|
|
|
|
{
|
|
|
|
//! Private GDI Device Context.
|
|
|
|
/** Get if for example with: HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc) */
|
2024-03-20 19:35:52 +01:00
|
|
|
void *HDc;
|
2023-10-03 20:37:00 +02:00
|
|
|
|
|
|
|
//! Permanent Rendering Context.
|
|
|
|
/** Get if for example with: HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc) */
|
2024-03-20 19:35:52 +01:00
|
|
|
void *HRc;
|
2023-10-03 20:37:00 +02:00
|
|
|
|
|
|
|
//! Window handle.
|
|
|
|
/** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd) */
|
2024-03-20 19:35:52 +01:00
|
|
|
void *HWnd;
|
2023-10-03 20:37:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SOpenGLLinux
|
|
|
|
{
|
|
|
|
// XWindow handles
|
2024-03-20 19:35:52 +01:00
|
|
|
void *X11Display;
|
|
|
|
void *X11Context;
|
2023-10-03 20:37:00 +02:00
|
|
|
unsigned long X11Window;
|
|
|
|
unsigned long GLXWindow;
|
|
|
|
};
|
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
struct SOpenGLOSX
|
|
|
|
{
|
|
|
|
//! The NSOpenGLContext object.
|
|
|
|
void *Context;
|
2023-10-03 20:37:00 +02:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
//! The NSWindow object.
|
|
|
|
void *Window;
|
|
|
|
};
|
2023-10-03 20:37:00 +02:00
|
|
|
|
|
|
|
struct SOpenGLFB
|
|
|
|
{
|
|
|
|
//! The EGLNativeWindowType object.
|
2024-03-20 19:35:52 +01:00
|
|
|
void *Window;
|
2023-10-03 20:37:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SOGLESAndroid
|
|
|
|
{
|
|
|
|
//! The ANativeWindow object.
|
2024-03-20 19:35:52 +01:00
|
|
|
void *Window;
|
2023-10-03 20:37:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
SOpenGLWin32 OpenGLWin32;
|
|
|
|
SOpenGLLinux OpenGLLinux;
|
|
|
|
SOpenGLOSX OpenGLOSX;
|
|
|
|
SOpenGLFB OpenGLFB;
|
|
|
|
SOGLESAndroid OGLESAndroid;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace video
|
|
|
|
} // end namespace irr
|