We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 805e112 commit ef41788Copy full SHA for ef41788
osx/Scenario/app/scene_controller.rb
@@ -12,6 +12,21 @@ def loadView
12
view.scene = SCNScene.sceneWithURL url, options:nil, error:nil
13
end
14
15
+
16
+ attributes = [
17
+ NSOpenGLPFAAccelerated,
18
+ NSOpenGLPFAColorSize, 32,
19
+ NSOpenGLPFADepthSize, 24,
20
+ ]
21
22
+ attributes_pointer = Pointer.new("I", attributes.size)
23
+ attributes.each_with_index do |v, i|
24
+ attributes_pointer[i] = v
25
+ end
26
27
+ self.view.pixelFormat = NSOpenGLPixelFormat.alloc.initWithAttributes(attributes_pointer)
28
+ self.view.openGLContext = NSOpenGLContext.alloc.initWithFormat(self.view.pixelFormat, shareContext:nil)
29
30
Dispatch::Queue.current.after(0.1) { configure }
31
32
0 commit comments