Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with alpha resolution when blending



You need to color calibrate your Cinema Display. You'll even find subtle differences between the same model laptops.

http://www.colorvision.com/

All graphics professionals should do this... but that's a rant I won't go on here ;-)

You might be able to get away with just adjusting the brightness and/ or contrast too.

Richard


On May 18, 2007, at 7:50 AM, Christopher Ashworth wrote:

Hi All,

I'm a newb to this list, and although not quite a newb to OpenGL, probably close enough in present company.

I'm doing a fairly straightforward transparency blend as follows:

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
		
	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	glColor4f((GLfloat)1.0, (GLfloat)1.0, (GLfloat)1.0, (GLfloat)_alpha);
		
	if (!_currentFrame)
		[self updateCurrentFrame];
	[self renderCurrentFrame];
	
	glDisable(GL_BLEND);

The current frame comes from a QuickTime movie, and is simply texture mapped onto a quad.

The problem I'm trying to solve is related to the resolution of the blending operation. On my MacBook Pro, on the built-in screen, interpolating the _alpha value from 1 to 0 produces a smooth fade- out of the image. However, on the attached Cinema display (1920x1200), that same operation produces a visually erratic fade. Namely, as the _alpha value approaches zero the image eventually "jumps" to invisible without smoothly fading out. In this case, anything below 0.05 for the alpha value results in a completely invisible image.

If I create a window that spans both screens and perform a fade-out of the image, the half on the main display works correctly and the half on the secondary display does not.

Thinking it might be an issue of bit depth in the NSOpenGLPixelFormat, I tried creating a pixel format explicitly with an NSOpenGLPFAAlphaSize of 32, but that did not change the behavior.

Any idea what I'm doing wrong here?

Best,
Christopher
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/opengl% 40bellsouth.net


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >problem with alpha resolution when blending (From: Christopher Ashworth <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.