Commit 85d886a0 authored by hybrid's avatar hybrid

Added a new device creation parameter to choose alpha channel support for the color buffer.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1372 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 6b09fabb
...@@ -7,29 +7,31 @@ ...@@ -7,29 +7,31 @@
namespace irr namespace irr
{ {
//! Structure for holding advanced Irrlicht Device creation parameters. //! Structure for holding Irrlicht Device creation parameters.
/** This structure is only used in the createDeviceEx() function. */ /** This structure is used in the createDeviceEx() function. */
struct SIrrlichtCreationParameters struct SIrrlichtCreationParameters
{ {
//! Constructs a SIrrlichtCreationParameters structure with default values. //! Constructs a SIrrlichtCreationParameters structure with default values.
SIrrlichtCreationParameters() SIrrlichtCreationParameters() :
DriverType(video::EDT_BURNINGSVIDEO),
WindowSize(core::dimension2d<s32>(800, 600)),
Bits(16),
Fullscreen(false),
Stencilbuffer(false),
Vsync(false),
AntiAlias(false),
WithAlphaChannel(false),
HighPrecisionFPU(false),
EventReceiver(0),
WindowId(0),
SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
{ {
DriverType = video::EDT_BURNINGSVIDEO;
WindowSize = core::dimension2d<s32>(800, 600);
Bits = 16;
Fullscreen = false;
Stencilbuffer = false;
Vsync = false;
AntiAlias = false;
HighPrecisionFPU = false;
EventReceiver = 0;
WindowId = 0;
SDK_version_do_not_use = IRRLICHT_SDK_VERSION;
} }
//! Type of the device. //! Type of the device.
/** This can currently be video::EDT_NULL, /** This can currently be video::EDT_NULL, video::EDT_SOFTWARE,
video::EDT_SOFTWARE, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9 and video::EDT_OPENGL. video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8,
video::EDT_DIRECT3D9, and video::EDT_OPENGL.
Default: Software. */ Default: Software. */
video::E_DRIVER_TYPE DriverType; video::E_DRIVER_TYPE DriverType;
...@@ -44,33 +46,45 @@ namespace irr ...@@ -44,33 +46,45 @@ namespace irr
bool Fullscreen; bool Fullscreen;
//! Specifies if the stencil buffer should be enabled. //! Specifies if the stencil buffer should be enabled.
/** Set this to true, /** Set this to true, if you want the engine be able to draw
if you want the engine be able to draw stencil buffer shadows. Note that not all stencil buffer shadows. Note that not all devices are able to
devices are able to use the stencil buffer. If they don't no shadows will be drawn. use the stencil buffer. If they don't no shadows will be drawn.
Default: false. */ Default: false. */
bool Stencilbuffer; bool Stencilbuffer;
//! Specifies vertical syncronisation. //! Specifies vertical syncronisation.
/** If set to true, the driver will wait for the vertical retrace period, otherwise not. /** If set to true, the driver will wait for the vertical
retrace period, otherwise not.
Default: false */ Default: false */
bool Vsync; bool Vsync;
//! Specifies if the device should use fullscreen anti aliasing //! Specifies if the device should use fullscreen anti aliasing
/** Makes sharp/pixelated edges softer, but requires more performance. Also, 2D /** Makes sharp/pixelated edges softer, but requires more
elements might look blurred with this switched on. The resulting rendering quality performance. Also, 2D elements might look blurred with this
also depends on the hardware and driver you are using, your program might look switched on. The resulting rendering quality also depends on
different on different hardware with this. So if you are writing a the hardware and driver you are using, your program might look
game/application with antiAlias switched on, it would be a good idea to make it different on different hardware with this. So if you are
possible to switch this option off again by the user. writing a game/application with AntiAlias switched on, it would
This is only supported in D3D9 and D3D8. In D3D9, both sample types are supported, be a good idea to make it possible to switch this option off
D3DMULTISAMPLE_X_SAMPLES and D3DMULTISAMPLE_NONMASKABLE. Default value: false */ again by the user.
This is curently not supported in OpenGL under Windows.
Default value: false */
bool AntiAlias; bool AntiAlias;
//! Whether the main framebuffer uses an alpha channel.
/** In some situations it might be desireable to get a color
buffer with an alpha channel, e.g. when rendering into a
transparent window or overlay. If this flag is set the device
tries to create a framebuffer with alpha channel.
Default value: false */
bool WithAlphaChannel;
//! Specifies if the device should use high precision FPU setting //! Specifies if the device should use high precision FPU setting
/** This is only relevant for DirectX Devices, which switch to low FPU precision /** This is only relevant for DirectX Devices, which switch to
by default for performance reasons. However, this may lead to problems with the low FPU precision by default for performance reasons. However,
other computations of the application. In this case setting this flag to true this may lead to problems with the other computations of the
should help - on the expense of performance loss, though. application. In this case setting this flag to true should help
- on the expense of performance loss, though.
Default value: false */ Default value: false */
bool HighPrecisionFPU; bool HighPrecisionFPU;
...@@ -78,12 +92,14 @@ namespace irr ...@@ -78,12 +92,14 @@ namespace irr
IEventReceiver* EventReceiver; IEventReceiver* EventReceiver;
//! Window Id. //! Window Id.
/** If this is set to a value other than 0, the Irrlicht Engine will be created in /** If this is set to a value other than 0, the Irrlicht Engine
an already existing window. For windows, set this to the HWND of the window you want. will be created in an already existing window. For windows, set
The windowSize and FullScreen options will be ignored when using the WindowId parameter. this to the HWND of the window you want. The windowSize and
Default this is set to 0. FullScreen options will be ignored when using the WindowId
To make Irrlicht run inside the custom window, you still will have to draw Irrlicht parameter. Default this is set to 0.
on your own. You can use this loop, as usual: To make Irrlicht run inside the custom window, you still will
have to draw Irrlicht on your own. You can use this loop, as
usual:
\code \code
while (device->run()) while (device->run())
{ {
...@@ -94,13 +110,14 @@ namespace irr ...@@ -94,13 +110,14 @@ namespace irr
\endcode \endcode
Instead of this, you can also simply use your own message loop Instead of this, you can also simply use your own message loop
using GetMessage, DispatchMessage and whatever. Calling using GetMessage, DispatchMessage and whatever. Calling
IrrlichtDevice::run() will cause Irrlicht to dispatch messages internally too. IrrlichtDevice::run() will cause Irrlicht to dispatch messages
You need not call Device->run() if you want to do your own message internally too. You need not call Device->run() if you want to
dispatching loop, but Irrlicht will not be able to fetch do your own message dispatching loop, but Irrlicht will not be
user input then and you have to do it on your own using the window able to fetch user input then and you have to do it on your own
messages, DirectInput, or whatever. Also, you'll have to increment the Irrlicht timer. using the window messages, DirectInput, or whatever. Also,
An alternative, own message dispatching loop without device->run() would you'll have to increment the Irrlicht timer.
look like this: An alternative, own message dispatching loop without
device->run() would look like this:
\code \code
MSG msg; MSG msg;
while (true) while (true)
...@@ -123,8 +140,8 @@ namespace irr ...@@ -123,8 +140,8 @@ namespace irr
driver->endScene(); driver->endScene();
} }
\endcode \endcode
However, there is no need to draw the picture this often. Just do it how you like. However, there is no need to draw the picture this often. Just
*/ do it how you like. */
void* WindowId; void* WindowId;
//! Don't use or change this parameter. //! Don't use or change this parameter.
......
...@@ -42,7 +42,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) ...@@ -42,7 +42,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
#ifdef _IRR_COMPILE_WITH_X11_ #ifdef _IRR_COMPILE_WITH_X11_
display(0), visual(0), screennr(0), window(0), StdHints(0), SoftwareImage(0), display(0), visual(0), screennr(0), window(0), StdHints(0), SoftwareImage(0),
#endif #endif
Width(param.WindowSize.Width), Height(param.WindowSize.Height), Depth(24), Width(param.WindowSize.Width), Height(param.WindowSize.Height),
Close(false), WindowActive(false), WindowMinimized(false), UseXVidMode(false), UseXRandR(false), UseGLXWindow(false), AutorepeatSupport(0) Close(false), WindowActive(false), WindowMinimized(false), UseXVidMode(false), UseXRandR(false), UseGLXWindow(false), AutorepeatSupport(0)
{ {
#ifdef _DEBUG #ifdef _DEBUG
...@@ -282,11 +282,11 @@ bool CIrrDeviceLinux::createWindow() ...@@ -282,11 +282,11 @@ bool CIrrDeviceLinux::createWindow()
GLX_RED_SIZE, 4, GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4, GLX_GREEN_SIZE, 4,
GLX_BLUE_SIZE, 4, GLX_BLUE_SIZE, 4,
GLX_ALPHA_SIZE, 0, GLX_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0,
GLX_DEPTH_SIZE, 16, GLX_DEPTH_SIZE, 16,
GLX_DOUBLEBUFFER, GL_TRUE, GLX_DOUBLEBUFFER, GL_TRUE,
GLX_STENCIL_SIZE, 1, GLX_STENCIL_SIZE, 1,
GLX_SAMPLE_BUFFERS_ARB, GL_TRUE, GLX_SAMPLE_BUFFERS_ARB, 1,
GLX_SAMPLES_ARB, MAX_SAMPLES, GLX_SAMPLES_ARB, MAX_SAMPLES,
None None
}; };
...@@ -295,7 +295,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -295,7 +295,7 @@ bool CIrrDeviceLinux::createWindow()
int nitems=0; int nitems=0;
if (!CreationParams.AntiAlias) if (!CreationParams.AntiAlias)
{ {
visualAttrBuffer[17] = GL_FALSE; visualAttrBuffer[17] = 0;
visualAttrBuffer[19] = 0; visualAttrBuffer[19] = 0;
} }
if (CreationParams.Stencilbuffer) if (CreationParams.Stencilbuffer)
...@@ -310,7 +310,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -310,7 +310,7 @@ bool CIrrDeviceLinux::createWindow()
} }
if (!configList) if (!configList)
{ {
visualAttrBuffer[17] = GL_FALSE; visualAttrBuffer[17] = 0;
visualAttrBuffer[19] = 0; visualAttrBuffer[19] = 0;
configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
if (configList) if (configList)
...@@ -321,7 +321,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -321,7 +321,7 @@ bool CIrrDeviceLinux::createWindow()
else else
{ {
//reenable multisampling //reenable multisampling
visualAttrBuffer[17] = GL_TRUE; visualAttrBuffer[17] = 1;
visualAttrBuffer[19] = MAX_SAMPLES; visualAttrBuffer[19] = MAX_SAMPLES;
} }
} }
...@@ -345,7 +345,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -345,7 +345,7 @@ bool CIrrDeviceLinux::createWindow()
} }
if (!configList) if (!configList)
{ {
visualAttrBuffer[17] = GL_FALSE; visualAttrBuffer[17] = 0;
visualAttrBuffer[19] = 0; visualAttrBuffer[19] = 0;
configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
if (configList) if (configList)
...@@ -356,7 +356,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -356,7 +356,7 @@ bool CIrrDeviceLinux::createWindow()
else else
{ {
//reenable multisampling //reenable multisampling
visualAttrBuffer[17] = GL_TRUE; visualAttrBuffer[17] = 1;
visualAttrBuffer[19] = MAX_SAMPLES; visualAttrBuffer[19] = MAX_SAMPLES;
} }
} }
...@@ -377,7 +377,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -377,7 +377,7 @@ bool CIrrDeviceLinux::createWindow()
} }
if (!configList) if (!configList)
{ {
visualAttrBuffer[17] = GL_FALSE; visualAttrBuffer[17] = 0;
visualAttrBuffer[19] = 0; visualAttrBuffer[19] = 0;
configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); configList=glXChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
if (configList) if (configList)
...@@ -388,7 +388,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -388,7 +388,7 @@ bool CIrrDeviceLinux::createWindow()
else else
{ {
//reenable multisampling //reenable multisampling
visualAttrBuffer[17] = GL_TRUE; visualAttrBuffer[17] = 1;
visualAttrBuffer[19] = MAX_SAMPLES; visualAttrBuffer[19] = MAX_SAMPLES;
} }
} }
...@@ -411,7 +411,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -411,7 +411,7 @@ bool CIrrDeviceLinux::createWindow()
GLX_RED_SIZE, 4, GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4, GLX_GREEN_SIZE, 4,
GLX_BLUE_SIZE, 4, GLX_BLUE_SIZE, 4,
GLX_ALPHA_SIZE, 0, GLX_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0,
GLX_DEPTH_SIZE, 16, GLX_DEPTH_SIZE, 16,
GLX_DOUBLEBUFFER, GL_TRUE, GLX_DOUBLEBUFFER, GL_TRUE,
GLX_STENCIL_SIZE, 1, GLX_STENCIL_SIZE, 1,
...@@ -585,7 +585,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -585,7 +585,7 @@ bool CIrrDeviceLinux::createWindow()
u32 borderWidth; u32 borderWidth;
int x,y; int x,y;
XGetGeometry(display, window, &tmp, &x, &y, &Width, &Height, &borderWidth, &Depth); XGetGeometry(display, window, &tmp, &x, &y, &Width, &Height, &borderWidth, &CreationParams.Bits);
StdHints = XAllocSizeHints(); StdHints = XAllocSizeHints();
long num; long num;
XGetWMNormalHints(display, window, StdHints, &num); XGetWMNormalHints(display, window, StdHints, &num);
...@@ -853,6 +853,7 @@ void CIrrDeviceLinux::yield() ...@@ -853,6 +853,7 @@ void CIrrDeviceLinux::yield()
nanosleep(&ts, NULL); nanosleep(&ts, NULL);
} }
//! Pause execution and let other processes to run for a specified amount of time. //! Pause execution and let other processes to run for a specified amount of time.
void CIrrDeviceLinux::sleep(u32 timeMs, bool pauseTimer=false) void CIrrDeviceLinux::sleep(u32 timeMs, bool pauseTimer=false)
{ {
...@@ -871,6 +872,7 @@ void CIrrDeviceLinux::sleep(u32 timeMs, bool pauseTimer=false) ...@@ -871,6 +872,7 @@ void CIrrDeviceLinux::sleep(u32 timeMs, bool pauseTimer=false)
Timer->start(); Timer->start();
} }
//! sets the caption of the window //! sets the caption of the window
void CIrrDeviceLinux::setWindowCaption(const wchar_t* text) void CIrrDeviceLinux::setWindowCaption(const wchar_t* text)
{ {
...@@ -887,7 +889,6 @@ void CIrrDeviceLinux::setWindowCaption(const wchar_t* text) ...@@ -887,7 +889,6 @@ void CIrrDeviceLinux::setWindowCaption(const wchar_t* text)
} }
//! presents a surface in the client area //! presents a surface in the client area
void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* src ) void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* src )
{ {
...@@ -919,7 +920,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s ...@@ -919,7 +920,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s
s32* srcdata = (s32*)image->lock(); s32* srcdata = (s32*)image->lock();
if ((Depth == 32)||(Depth == 24)) if ((CreationParams.Bits == 32)||(CreationParams.Bits == 24))
{ {
int destPitch = SoftwareImage->bytes_per_line; int destPitch = SoftwareImage->bytes_per_line;
u8* destData = reinterpret_cast<u8*>(SoftwareImage->data); u8* destData = reinterpret_cast<u8*>(SoftwareImage->data);
...@@ -932,7 +933,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s ...@@ -932,7 +933,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s
} }
} }
else else
if (Depth == 16) if (CreationParams.Bits == 16)
{ {
// convert to R5G6B6 // convert to R5G6B6
...@@ -957,7 +958,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s ...@@ -957,7 +958,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s
s16* srcdata = (s16*)image->lock(); s16* srcdata = (s16*)image->lock();
if (Depth == 16) if (CreationParams.Bits == 16)
{ {
// convert from A1R5G5B5 to R5G6B6 // convert from A1R5G5B5 to R5G6B6
...@@ -972,7 +973,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s ...@@ -972,7 +973,7 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s
} }
} }
else else
if ((Depth == 32)||(Depth == 24)) if ((CreationParams.Bits == 32)||(CreationParams.Bits == 24))
{ {
// convert from A1R5G5B5 to X8R8G8B8 // convert from A1R5G5B5 to X8R8G8B8
...@@ -998,7 +999,6 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s ...@@ -998,7 +999,6 @@ void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s
} }
//! notifies the device that it should close itself //! notifies the device that it should close itself
void CIrrDeviceLinux::closeDevice() void CIrrDeviceLinux::closeDevice()
{ {
...@@ -1006,7 +1006,6 @@ void CIrrDeviceLinux::closeDevice() ...@@ -1006,7 +1006,6 @@ void CIrrDeviceLinux::closeDevice()
} }
//! returns if window is active. if not, nothing need to be drawn //! returns if window is active. if not, nothing need to be drawn
bool CIrrDeviceLinux::isWindowActive() const bool CIrrDeviceLinux::isWindowActive() const
{ {
...@@ -1014,7 +1013,6 @@ bool CIrrDeviceLinux::isWindowActive() const ...@@ -1014,7 +1013,6 @@ bool CIrrDeviceLinux::isWindowActive() const
} }
//! Sets if the window should be resizeable in windowed mode. //! Sets if the window should be resizeable in windowed mode.
void CIrrDeviceLinux::setResizeAble(bool resize) void CIrrDeviceLinux::setResizeAble(bool resize)
{ {
...@@ -1043,8 +1041,7 @@ void CIrrDeviceLinux::setResizeAble(bool resize) ...@@ -1043,8 +1041,7 @@ void CIrrDeviceLinux::setResizeAble(bool resize)
} }
//! \return Returns a pointer to a list with all video modes supported //! Return pointer to a list with all video modes supported by the gfx adapter.
//! by the gfx adapter.
video::IVideoModeList* CIrrDeviceLinux::getVideoModeList() video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
{ {
#ifdef _IRR_COMPILE_WITH_X11_ #ifdef _IRR_COMPILE_WITH_X11_
...@@ -1120,7 +1117,6 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList() ...@@ -1120,7 +1117,6 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
} }
void CIrrDeviceLinux::createKeyMap() void CIrrDeviceLinux::createKeyMap()
{ {
// I don't know if this is the best method to create // I don't know if this is the best method to create
...@@ -1128,6 +1124,7 @@ void CIrrDeviceLinux::createKeyMap() ...@@ -1128,6 +1124,7 @@ void CIrrDeviceLinux::createKeyMap()
// I find a better version. // I find a better version.
#ifdef _IRR_COMPILE_WITH_X11_ #ifdef _IRR_COMPILE_WITH_X11_
KeyMap.reallocate(84);
KeyMap.push_back(SKeyMap(XK_BackSpace, KEY_BACK)); KeyMap.push_back(SKeyMap(XK_BackSpace, KEY_BACK));
KeyMap.push_back(SKeyMap(XK_Tab, KEY_TAB)); KeyMap.push_back(SKeyMap(XK_Tab, KEY_TAB));
KeyMap.push_back(SKeyMap(XK_Linefeed, 0)); // ??? KeyMap.push_back(SKeyMap(XK_Linefeed, 0)); // ???
......
...@@ -270,15 +270,15 @@ namespace irr ...@@ -270,15 +270,15 @@ namespace irr
#endif #endif
} }
core::position2d<s32> CursorPos;
CIrrDeviceLinux* Device; CIrrDeviceLinux* Device;
bool IsVisible; core::position2d<s32> CursorPos;
bool Null;
bool UseReferenceRect;
core::rect<s32> ReferenceRect; core::rect<s32> ReferenceRect;
#ifdef _IRR_COMPILE_WITH_X11_ #ifdef _IRR_COMPILE_WITH_X11_
Cursor invisCursor; Cursor invisCursor;
#endif #endif
bool IsVisible;
bool Null;
bool UseReferenceRect;
}; };
friend class CCursorControl; friend class CCursorControl;
...@@ -303,7 +303,7 @@ namespace irr ...@@ -303,7 +303,7 @@ namespace irr
GLXContext Context; GLXContext Context;
#endif #endif
#endif #endif
u32 Width, Height, Depth; u32 Width, Height;
bool Close; bool Close;
bool WindowActive; bool WindowActive;
bool WindowMinimized; bool WindowMinimized;
......
...@@ -116,15 +116,17 @@ bool CIrrDeviceSDL::createWindow() ...@@ -116,15 +116,17 @@ bool CIrrDeviceSDL::createWindow()
{ {
if (CreationParams.Bits==16) if (CreationParams.Bits==16)
{ {
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 ); SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 4 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 4 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 4 );
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0 );
} }
else else
{ {
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 ); SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, CreationParams.WithAlphaChannel?8:0 );
} }
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, CreationParams.Bits); SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, CreationParams.Bits);
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
......
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