Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-05-2010, 01:09 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 25
Default Using Quartz to render OpenGL textures, with alpha?

Hi,
I am trying to use Quartz drawing functions to render into a CGContext, then create textures from this context to use for texture mapping in OpenGL. My current implementation mostly works, but I'm hitting a problem with alpha.

I use CGBitmapContextCreate() to create a context from scratch with an RGB color space. It seems that this function only supports premultiplied alpha, so there's no way to draw pixels with real alpha channel info to one of these contexts.

Is my understanding of this correct? If so, this approach won't work for my app so I need to figure out a different way to get a CG context, one that will allow me to preserve full alpha channel info. Any ideas?

Thanks
fancyPantsZero is offline   Reply With Quote
Old 05-05-2010, 01:17 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 25
Default

Never mind, apparently I can still use alpha channel info even though the context creation function doesn't claim to support alpha....strange. I just went ahead and started drawing with alpha channel pixels and it worked.
fancyPantsZero is offline   Reply With Quote
Reply

Bookmarks

Tags
alpha, opengl, quartz

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 248
21 members and 227 guests
@sandris, ADY, bookesp, ckgni, dacapo, Dani77, DarkAn, Davey555, Desert Diva, HemiMG, iDifferent, jakerocheleau, JasonR, LEARN2MAKE, prchn4christ, Rudy, ryantcb, Speed, themathminister, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,766
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:41 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0