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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-20-2010, 12:59 PM   #2 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

It doesn't work because GL_ALPHA creates a texture which is a solid block of color plus an alpha channel. It is *not* premultiplied the way your loaded UIImages are. Since the texture is solid white, the source calculation for (white * GL_ONE) will always be white and the entire square will be drawn as white.

I'd suggest switching your glBlendFund back to glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) when you draw the text, and use the GL_ONE function only for your images; either that or rewrite initWithString: so that it premultiplies the color channels to match your images.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 379
11 members and 368 guests
baja_yu, bignoggins, deloisig73, Duncan C, heshiming, hussain1982, jbro, krisk, matador1978, mediaspree, n00b
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,558
Threads: 94,079
Posts: 402,741
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Garros1990
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:06 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.