NSOpenGLView is an NSView subclass in the Apple Appkit framework. It provides an easy way to create an OpenGL context and embed it inside a Cocoa application.
I'm new to macOS development.
Currently I'm implementing a NSOpenGLView with a third-party library.
The update function is a callback from the library, which will be called when a new frame arrives. Since it's expected to return immediately, the…
I am trying to use a layer-backed NSOpenGLView (wantsLayer = YES) and have noticed a performance issue when running the application on a secondary display.
The issue is easiest reproduced with the GLEssentials example and adding self.wantsLayer=YES…
Summary: exporting pixel data from NSOpenGLView to some file formats gives incorrect colours
I am developing an application to visualise some experimental data. One of its functions is to render the data in an NSOpenGLView subclass, and allow the…
totally new to openGL. I have this code, which displays my image using OpenGl.
#import "ImageView.h"
#import
#import
@interface ImageView ()
@property (nonatomic, strong) CIContext *context;
@property (nonatomic,…
I have a NSView displayed over a NSOpenGLView. I am using the 'setWantsLayer:YES' to force the NSView to appear over the opengl context. But when I minimize the window and deminimize it again, the NSView is no more over the NSOpenGLView.
Is there a…
I am creating a music-eduaction app that reads in musical scores - not audio files - and will need to present an animated graphical screen. I created a document-based app to make file access easy, and I have it now reading and parsing the files, and…
I'm making a Mac OS X (10.8.3) OpenGL application using a NSOpenGLView and the CVDisplayLink to manage the calls to the render method.
The application works fine but when the window gets covered or is in other space (basically when is not visible…
I have zoom method for my NSOpenGLView. If image is zoomed in, NSOpenGLView frame size, view port and etc. is being increased. Same thing is happening if NSOpenGLView is being zoomed out (the frame size, view port and etc. is being decreased). So I…
I am trying to create a GLSL example on Mac. I am trying to set up one color attribute per vertex. However, when the program runs, I just get a purple screen (the purple comes from glClearColor). I post the relevant code…
If I use a standard NSWindow to host a NSOpenGLView which extends for all the window frame, the two bottom corners of the window are automatically rounded.
When swithcing to NSBorderlessWindowMask I have to handle corner rounding myself.
I have…
I've got a problem with OpenGL on mac, and I think the problem is the Depth test.
So, to my problem: Rather than explaining, I made two screenshots:
My scene from far:…
The NSOpenGLView class has a read/write property openGLContext, and as I read the documentation, the getter should never return nil:
If the receiver has no associated context object, a new NSOpenGLContext object is created. The new object is…
I've encountered a very odd error when compiling with Xcode 10 against Mojave frameworks.
It turns out that the OpenGL the stops showing. It appears that it's actually somewhere there (the backing layer overlays it?) as visible when rapidly updating…
Updated: the crash doesn't occur on Sierra 10.12.6. But it does occur every time on my High Sierra 10.13.4 machie. So it seems like an AppKit issue introduced sometime in High Sierra. Logged a bug with Apple.
I have created a minimal example…
I have an NSOpenGLView displaying a SceneKit scene.
When using an SCNView, I could simply call showStatistics to have it display statistics such as FPS. With NSOpenGLView, is there an easy way to measure and display FPS without using the OpenGL…