Opened 14 years ago

Closed 11 years ago

#5 closed defect (fixed)

Problem with new-pixel-format in examples

Reported by: phil Owned by: gb
Priority: minor Milestone:
Component: Foreign Function Interface Version: 1.1
Keywords: OpenGL Cc:


The macro new-pixel-format from the rubix opengl example code (in rubix/opengl.lisp) has been redefined as a function and does not appear to be functional. Error attached and here's the code which resulted in the error:

(opengl:new-pixel-format #$NSOpenGLPFAMultisample

#$NSOpenGLPFASampleAlpha #$NSOpenGLPFASampleBuffers 2 #$NSOpenGLPFASamples 4)

(it's a minor issue, but I do need the functionality as my non-example code uses it)

Attachments (1)

070408 pixelformat bt.txt (622 bytes) - added by phil 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by phil

comment:1 Changed 14 years ago by gb

This works fine for me if I just load the rubix demo.

The error indicates that allocating the instance - doing:

(#/initWithAttributes (#/alloc ns:ns-opengl-pixel-format) attributes)

returned a NULL pointer.

There is a bug here, in that ALLOCATE-INSTANCE should return that null pointer (and doesn't do so because I mis-indented something.) If ALLOCATE-INSTANCE had returned a NULL-POINTER, we whould have called SHARED-INITIALIZE on it and quietly returned the null pointer. That's probably not what you want to have happen, but as far as I can see it's what would have happened in previous releases.

I checked in a fix changeset:6248 a moment ago that should fix ALLOCATE-INSTANCE; as to why OpenGL is returning the null pointer ... I don't know, but I assume that that's a separate issue.

comment:2 Changed 11 years ago by rme

  • Resolution set to fixed
  • Status changed from new to closed

verified that the rubix demo works in trunk

Note: See TracTickets for help on using tickets.