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 running compositions offline...



Ok, sorry ... my previous email was wrong.  I did some more testing.

As soon as I use

	NSOpenGLPixelFormatAttribute	attributes[] = {
		kCGLPFARemotePBuffer,
				NSOpenGLPFAPixelBuffer,
//				NSOpenGLPFANoRecovery,
				NSOpenGLPFAAccelerated,
//				NSOpenGLPFADepthSize, 24,
//				NSOpenGLPFADepthSize, 128,
//				NSOpenGLPFAColorFloat,
//				NSOpenGLPFAColorSize, 128,
//				NSOpenGLPFASamples, 1,
		(NSOpenGLPixelFormatAttribute) 0
	};


I get
benq:~/Temp/Objects/Deployment dominik$ ./QuartzComposerOffline / Developer/Examples/Quartz\ Composer/Motion\ Graphics\ Compositions/ Particle\ System.qtz /tmp/blah
2007-02-22 18:21:36.289 QuartzComposerOffline[4536] *** CGGetOnlineDisplayList() failed with error: 1011
2007-02-22 18:21:36.290 QuartzComposerOffline[4536] *** Uncaught exception: <NSInternalInconsistencyException> +[QCOpenGLContext maxSupportedTextureSizeForTarget:]: Inconsistent state
Trace/BPT trap


This is with and without display. Actually I get this error with as soon as I use kCGLPFARemotePBuffer at all.

dominik


On 22.02.2007, at 17:31, Pierre-Olivier Latour wrote:

Try different combinations of attributes like only kCGLPFARemotePBuffer and NSOpenGLPFAAccelerated.

On Feb 22, 2007, at 8:21 AM, Dominik Westner wrote:

Here is the code snippet:

- (id) initWithCompositionPath:(NSString*)path pixelsWide: (unsigned)width pixelsHigh:(unsigned)height
{
NSOpenGLPixelFormatAttribute attributes[] = {
kCGLPFARemotePBuffer,
NSOpenGLPFAPixelBuffer,
NSOpenGLPFANoRecovery,
NSOpenGLPFAAccelerated,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFASamples, 1,
(NSOpenGLPixelFormatAttribute) 0
};
NSOpenGLPixelFormat* format = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];

//Check parameters - Rendering at sizes smaller than 16x16 will likely produce garbage
if(![path length] || (width < 16) || (height < 16)) {
[self release];
return nil;
}

if(self = [super init]) {
//Create the OpenGL pixel buffer to render into
_pixelBuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_RECTANGLE_EXT textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height];
if(_pixelBuffer == nil) {
NSLog(@"Cannot create OpenGL pixel buffer");
[self release];
return nil;
}

//Create the OpenGL context to render with (with color and depth buffers)
_openGLContext = [[NSOpenGLContext alloc] initWithFormat:format shareContext:nil];
if(_openGLContext == nil) {
NSLog(@"Cannot create OpenGL context");
[self release];
return nil;
}
....


Dominik



On 22.02.2007, at 17:15, Pierre-Olivier Latour wrote:

Hi Pierre-Olivier,

I am running as root and I added the RemotePBuffer attribute to my Pixelformat.

If I have a monitor connected everything is running fine.
Then I unplug the monitor and reboot the machine. After that I get:

2007-02-22 10:02:56.823 ImageService[187] invalid pixel format
2007-02-22 10:02:56.823 ImageService[187] invalid context
2007-02-22 10:02:56.823 ImageService[187] Cannot create OpenGL context


So the RemotePBuffer attribute didn't seem to help. It looks like I have to find a way to make the hardware think there is a monitor connected. Maybe this works:

What are the exact list of attributes you use when creating the OpenGL context?



________________________________________________________ Pierre-Olivier Latour email@hidden Quartz Composer Team Apple Computer, Inc.






________________________________________________________
Pierre-Olivier Latour                            	email@hidden
Quartz Composer Team				Apple Computer, Inc.




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

This email sent to email@hidden
References: 
 >Problem running compositions offline... (From: Dominik Westner <email@hidden>)
 >Re: Problem running compositions offline... (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Problem running compositions offline... (From: Dominik Westner <email@hidden>)
 >Re: Problem running compositions offline... (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Problem running compositions offline... (From: Dominik Westner <email@hidden>)
 >Re: Problem running compositions offline... (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Problem running compositions offline... (From: Dominik Westner <email@hidden>)
 >Re: Problem running compositions offline... (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Problem running compositions offline... (From: Dominik Westner <email@hidden>)
 >Re: Problem running compositions offline... (From: Pierre-Olivier Latour <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.