bugGNUstep - Bugs: bug #34433, NSOpenGLPixelFormatAttribute...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34433: NSOpenGLPixelFormatAttribute completely broken

Submitted by:  julian <julian_>
Submitted on:  Thu 29 Sep 2011 01:01:13 PM UTC  
Votes:  2  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Tue 08 Nov 2011 10:12:15 PM UTC, comment #4:

yes sorry you are right. i reinstalled base and gui, but not back.

NSOpenGLPixelFormat no longer crashes.

i can also confirm that the CocoaGL sample i attached runs fine except for one problem:

in XGGLContext.m this method throws an exception:

- (void)setValues:(const long *)vals
forParameter:(NSOpenGLContextParameter)param
{
[self notImplemented: _cmd];
}

when the sample calls
[[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval|;

commenting out the line makes it work and look fine.

julian <julian_>
Tue 08 Nov 2011 08:43:41 PM UTC, comment #3:

I am not that convinced. Your screen shot reads: "Source file is more recent than executable"
Are you sure you did recompile and install back?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 08 Nov 2011 01:27:08 PM UTC, comment #2:

still doesn't seem to work. new crash attached as PNG.

btw i'm also attaching a gnustep port of Apple's (NS)OpenGL sample code called CocoaGL which exercises basic NSOpenGLView usage including NSOpenGLPixelFormat etc etc.

if there is someday interest in fixing NSOpenGLView, getting this sample to run would be a good starting point.

(file #24327, file #24328)

julian <julian_>
Mon 07 Nov 2011 09:07:08 PM UTC, comment #1:

I had a look at the specification at
http://www.opengl.org/sdk/docs/man/xhtml/glXGetConfig.xml

and decided that we should use GLX_BUFFER_SIZE as a replacement for NSOpenGLPFAColorSize instead of setting all the colours to this value. In your case the old code resulted in each colour having 24 bits which sounds to much to me.

Could you please give it another try as I don't have code to exercise this case.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Thu 29 Sep 2011 01:01:13 PM UTC, original submission:

any usage of NSOpenGLPixelFormatAttribute is completely broken and leads to segfaults. just add this to any executed code of a gnustep app:

NSOpenGLPixelFormatAttribute attribs[] = {
NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute) 24,
NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute) 24,
NSOpenGLPFAWindow,
(NSOpenGLPixelFormatAttribute) 0 };
NSOpenGLPixelFormat *pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];

the requested attributes are irrelevant, it will always lead to a segfault here:

Program received signal SIGSEGV, Segmentation fault.
0x01333db4 in -[XGGLPixelFormat initWithAttributes:] (self=0x8570370,
_cmd=0x8050660, attribs=0xbfffd830) at XGGLFormat.m:344
344 visualinfo = glXGetVisualFromFBConfig(display,fbconfig[0]);

at least thats the case on ubuntu 11.04, either on actual hardware with working opengl or even just in a vmware virtual machine. true for a-few-months old gnustep as well as for SVN trunk as of yesterday.

julian <julian_>

 

Attached Files
file #24327:  problem.png added by julian_ (33KiB - image/png)
file #24328:  CocoaGL.zip added by julian_ (470KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by julian_ (Voted in favor of this item)
  • -unavailable- added by julian_ (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 2 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Nov 2011 10:24:30 PM UTCFredKieferStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Tue 08 Nov 2011 08:40:26 PM UTCFredKieferStatusReady For Test=>In Progress
      Open/ClosedIn Test=>Open
    Tue 08 Nov 2011 01:27:08 PM UTCjulian_Attached File-=>Added problem.png, #24327
      Attached File-=>Added CocoaGL.zip, #24328
    Mon 07 Nov 2011 09:07:08 PM UTCFredKieferStatusNone=>Ready For Test
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test
    Sat 01 Oct 2011 09:00:35 PM UTCjulian_Carbon-Copy-=>Added julian_

    Back to the top


    Powered by Savane 3.1-cleanup1