10.3 support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,9 @@ static void swizzleBitmap(void * data, int rowBytes, int height)
|
|||||||
* using CFRelease().
|
* using CFRelease().
|
||||||
* Returns NULL on an error.
|
* Returns NULL on an error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern CGColorSpaceRef wxMacGetGenericRGBColorSpace();
|
||||||
|
|
||||||
CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
||||||
{
|
{
|
||||||
CGContextRef bitmap;
|
CGContextRef bitmap;
|
||||||
@@ -109,7 +112,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
|||||||
long bytewidth;
|
long bytewidth;
|
||||||
GLint width, height;
|
GLint width, height;
|
||||||
long bytes;
|
long bytes;
|
||||||
CGColorSpaceRef cSpace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
|
|
||||||
|
|
||||||
CGLContextObj glContextObj;
|
CGLContextObj glContextObj;
|
||||||
CGLPixelFormatObj pixelFormatObj ;
|
CGLPixelFormatObj pixelFormatObj ;
|
||||||
@@ -163,8 +165,7 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
bitmap = CGBitmapContextCreate(data, width, height, 8, bytewidth,
|
bitmap = CGBitmapContextCreate(data, width, height, 8, bytewidth,
|
||||||
cSpace, kCGImageAlphaNoneSkipFirst /* XRGB */);
|
wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst /* XRGB */);
|
||||||
CFRelease(cSpace);
|
|
||||||
|
|
||||||
|
|
||||||
/* Read framebuffer into our bitmap */
|
/* Read framebuffer into our bitmap */
|
||||||
|
Reference in New Issue
Block a user