Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jon170686

macrumors newbie
Original poster
Nov 3, 2008
1
0
How can I modify the alpha channel size through the CAEAGLLayer class (or whatever else I could do it with) used to set up the rendering for a opengl es iphone project?

Another way to put it; how do I accomplish what this CGL code does to set pixel format attributes (CGLChoosePixelFormat)?

CGLPixelFormatAttribute attribs[] = { kCGLPFADoubleBuffer,
kCGLPFAFullScreen,
kCGLPFADisplayMask,
CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay),
NULL
}; // 2
CGLPixelFormatObj pixelFormatObj;
long numPixelFormats ;

CGLChoosePixelFormat( attribs, &pixelFormatObj, &numPixelFormats );

Using CGLChoosePixelFormat() you can pass in properties such as kCGLPFASampleAlpha and kCGLPFAAlphaSize. How do I get to specify these starting from a standard opengl es iphone project (which I'm not sure if it can use CGL functions).

If it helps I have an old opengl GLUT project that called:
GLUTInitDisplay(GLUT_DOUBLE | .... | GLUT_ALPHA)

or it might have been GLUTInitDisplayMode... not sure.

Where the GLUT_ALPHA accomplished what I needed...

Sorry for the long post, any help is very much appreciated!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.