Results 1 to 3 of 3
Discuss CoreSurface - 32bit CGBufferRef at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Hey! Is t possible to create a 32bit (RGBA) CoreSurface buffer? In every piece of ...
  1. #1
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default CoreSurface - 32bit CGBufferRef

    Hey!

    Is t possible to create a 32bit (RGBA) CoreSurface buffer?

    In every piece of code I've seen "565L" is used as pixel format, where the digits obviously stands for 5bit red, 6bit green, 5bit blue. What the "L" stand for I have no idea. So the usual code looks like this:

    Code:
    int pitch = w * 2, allocSize = 2 * w * h;
    char *pixelFormat = "565L";
    CFMutableDictionaryRef dict;
    
    dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
    CFDictionarySetValue(dict, kCoreSurfaceBufferGlobal, kCFBooleanTrue);
    CFDictionarySetValue(dict, kCoreSurfaceBufferMemoryRegion, CFSTR("PurpleGFXMem"));
    CFDictionarySetValue(dict, kCoreSurfaceBufferPitch, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &pitch));
    CFDictionarySetValue(dict, kCoreSurfaceBufferWidth, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &w));
    CFDictionarySetValue(dict, kCoreSurfaceBufferHeight, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &h));
    CFDictionarySetValue(dict, kCoreSurfaceBufferPixelFormat, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, pixelFormat));
    CFDictionarySetValue(dict, kCoreSurfaceBufferAllocSize, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &allocSize));
    
    CoreSurfaceBufferRef screenSurface = CoreSurfaceBufferCreate(dict);
    I have tried a couple of different combinations of characters for pixelFormat (8888, 888L, RGBA), but none have worked. Also the term "565L" appears in tags in the header for some ipod image format.

    So, is it possible to create a 32 bit CoreSurface buffer?

    Cheers,
    Max



  2. #2
    Professional Array

    Join Date
    Aug 2007
    Posts
    78
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Stab in the dark, but maybe it's related to endianess? Little and Big?

    Doesn't apple store iphone png's with reverse endianess or similar?

    Or maybe i'm talking complete crap.

  3. #3
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I think this has little to do with the Apple png, at least in this case. I can use UIImage to perfectly load full 32bit RGBA images. It is also possible to create a full screen egl context with 32 bit capabilities (that is what I will use it for, as a offscreen display surface for egl).

    Chhers,
    Max

 

 

Similar Threads

  1. Can't boot in 32Bit Mode
    By RisTar in forum Installation
    Replies: 0
    Last Post: 05-12-2010, 12:03 PM
  2. Bcm5751 32bit driver
    By psilocybin in forum Kernel / Kext (Driver) Support
    Replies: 1
    Last Post: 01-25-2010, 11:59 AM
  3. [GUIDE] P5N-D 10.6.1+10.5 [32bit]
    By rohizzle121 in forum Tutorials
    Replies: 3
    Last Post: 12-19-2009, 01:42 PM
  4. Can i install it on 32bit systems?
    By kev0121 in forum Installation
    Replies: 2
    Last Post: 06-26-2009, 11:06 PM
  5. 2.1 CoreSurface help
    By zydeco in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 09-25-2008, 06:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:10 AM.
twitter, follow us!