render ctx
This commit is contained in:
1 parent
fbea0673c1
commit
fbb02855ee
10 files changed
+167
-15
No files matched your search
@@ -11,20 +11,11 @@ final class RenderGLView: NSOpenGLView {
|
||||
private var startTime: CFTimeInterval = 0
|
||||
|
||||
override init(frame frameRect: NSRect) {
|
||||
let attributes: [NSOpenGLPixelFormatAttribute] = [
|
||||
UInt32(NSOpenGLPFAOpenGLProfile), UInt32(NSOpenGLProfileVersion3_2Core),
|
||||
UInt32(NSOpenGLPFAColorSize), 24,
|
||||
UInt32(NSOpenGLPFAAlphaSize), 8,
|
||||
UInt32(NSOpenGLPFADepthSize), 24,
|
||||
UInt32(NSOpenGLPFADoubleBuffer),
|
||||
UInt32(NSOpenGLPFAAccelerated),
|
||||
0
|
||||
]
|
||||
|
||||
guard let format = NSOpenGLPixelFormat(attributes: attributes) else {
|
||||
fatalError("Unable to create an OpenGL 3.2 core pixel format")
|
||||
guard
|
||||
let format = NSOpenGLPixelFormat(attributes: RENDER_OPENGL_ATTRS)
|
||||
else {
|
||||
fatalError("ERROR Could not create required OpenGL pixel format")
|
||||
}
|
||||
|
||||
super.init(frame: frameRect, pixelFormat: format)!
|
||||
wantsBestResolutionOpenGLSurface = true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user