Ticket #5 (closed defect: fixed)

Opened 7 years ago

Last modified 5 years ago

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:

Description

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

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

Change History

Changed 7 years ago by phil

comment:1 Changed 7 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 5 years ago by rme

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

verified that the rubix demo works in trunk

Note: See TracTickets for help on using tickets.