Opened 5 years ago

Closed 5 years ago

#15536 closed defect (fixed)

Always use HW accelerated OpenGL pixel format on OS X cocoa

Reported by: kristianduske Owned by: csomor
Priority: normal Milestone: 3.0.0
Component: wxOSX Version: 2.9.5
Keywords: wxGLContext wxGLCanvas acceleration OpenGL osx cocoa mac Cc:
Blocked By: Blocking:
Patch: yes


Currently, wxGLContext does not request a hardware accelerated pixel format on OS X cocoa. The result is that wxGLCanvas::IsDisplaySupported will report success for non-accelerated pixel formats, leading to slow performance if that pixel format is used to create the wxGLContext.

This is because the NSOpenGLPFAAccelerated attribute is missing from the attributes passed to NSOpenGLPixelFormat initWithAttributes. This differs from the behavior on msw, where an equivalent flag (WGL_FULL_ACCELERATION_ARB) is always passed to the wglChoosePixelFormatARB call. Therefore, the NSOpenGLPFAAccelerated should always be passed to the NSOpenGLPixelFormat initializer on OS X as well. The attached patch fixes this.

Attachments (1)

osx_gl_hw_accel.patch download (749 bytes) - added by kristianduske 5 years ago.
Force hardware acceleration when creating a pixel format on OS X

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by kristianduske

Force hardware acceleration when creating a pixel format on OS X

comment:1 Changed 5 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

comment:2 Changed 5 years ago by SC

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

(In [74861]) always use hw-accel, fixes #15536, applied with thanks

Note: See TracTickets for help on using tickets.