mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
cocoa: Support EDR windows with float framebuffer
Requires macOS 10.11
This commit is contained in:
parent
b7fa25f8f4
commit
20a2b26090
@ -449,6 +449,11 @@ open_window() {
|
||||
_parent_window_handle->attach_child(_window_handle);
|
||||
}
|
||||
|
||||
if (_fb_properties.get_float_color() &&
|
||||
[_view respondsToSelector:@selector(setWantsExtendedDynamicRangeOpenGLSurface:)]) {
|
||||
[_view setWantsExtendedDynamicRangeOpenGLSurface:YES];
|
||||
}
|
||||
|
||||
// Configure the view to be high resolution capable using the dpi-aware
|
||||
// configuration flag. If dpi-aware is false, macOS will upscale the view
|
||||
// for us.
|
||||
|
@ -188,6 +188,10 @@ choose_pixel_format(const FrameBufferProperties &properties,
|
||||
attribs.push_back(NSOpenGLPFAColorSize);
|
||||
attribs.push_back(properties.get_color_bits());
|
||||
|
||||
if (properties.get_float_color()) {
|
||||
attribs.push_back(NSOpenGLPFAColorFloat);
|
||||
}
|
||||
|
||||
// Set the depth buffer bits to 24 manually when 1 is requested.
|
||||
// This prevents getting a depth buffer of only 16 bits when requesting 1.
|
||||
attribs.push_back(NSOpenGLPFADepthSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user