Commit 14b4e58c authored by teella's avatar teella

added depthSize and alphaSize support to OSX based on colour bit


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1284 dfc29bdd-3216-0410-991c-e03cc46cb475
parent fca48f5a
......@@ -160,6 +160,12 @@ bool CIrrDeviceMacOSX::createWindow(const irr::core::dimension2d<irr::s32>& wind
NSOpenGLPixelFormatAttribute windowattribs[32];
CFDictionaryRef displaymode,olddisplaymode;
long numPixelFormats,newSwapInterval;
int alphaSize = 4, depthSize = 16;
if (bits == 32) {
alphaSize = 8;
depthSize = 32;
}
result = false;
display = CGMainDisplayID();
......@@ -178,9 +184,11 @@ bool CIrrDeviceMacOSX::createWindow(const irr::core::dimension2d<irr::s32>& wind
windowattribs[index++] = NSOpenGLPFADoubleBuffer;
windowattribs[index++] = NSOpenGLPFAAccelerated;
windowattribs[index++] = NSOpenGLPFADepthSize;
windowattribs[index++] = (NSOpenGLPixelFormatAttribute)16;
windowattribs[index++] = (NSOpenGLPixelFormatAttribute)depthSize;
windowattribs[index++] = NSOpenGLPFAColorSize;
windowattribs[index++] = (NSOpenGLPixelFormatAttribute)bits;
windowattribs[index++] = NSOpenGLPFAAlphaSize;
windowattribs[index++] = (NSOpenGLPixelFormatAttribute)alphaSize;
if (antiAlias) {
windowattribs[index++] = NSOpenGLPFASampleBuffers;
......@@ -242,9 +250,11 @@ bool CIrrDeviceMacOSX::createWindow(const irr::core::dimension2d<irr::s32>& wind
fullattribs[index++] = kCGLPFADoubleBuffer;
fullattribs[index++] = kCGLPFAAccelerated;
fullattribs[index++] = kCGLPFADepthSize;
fullattribs[index++] = (CGLPixelFormatAttribute)16;
fullattribs[index++] = (CGLPixelFormatAttribute)depthSize;
fullattribs[index++] = kCGLPFAColorSize;
fullattribs[index++] = (CGLPixelFormatAttribute)bits;
fullattribs[index++] = kCGLPFAAlphaSize;
fullattribs[index++] = (CGLPixelFormatAttribute)alphaSize;
if (antiAlias) {
fullattribs[index++] = kCGLPFASampleBuffers;
......
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