Questions tagged [nsopenglview]

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.

Apple Documentation:

https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSOpenGLView_Class/Reference/Reference.html

82 questions
3
votes
0 answers

Cocoa API keeps resetting our NSCursor

We have an application that has a full screen video player and a floating window (pallet) can be brought up to give users tools to modify the video, there is only one view for video playback and all the drawing occur in there, its an NSOpenGLView…
Nathan Day
  • 5,981
  • 2
  • 24
  • 40
3
votes
1 answer

How to share textures between an NSOpenGLView and a full screen context in Mac OS?

I am working on an app that uses 2D textures to create animated kaleidoscopes. It starts out displaying to an NSOpenGLView. I am adding an option to switch to full-screen mode. I would prefer to use the OS 10.5 approach to full screen so I can…
Duncan C
  • 128,072
  • 22
  • 173
  • 272
3
votes
1 answer

Annoying Bump Sound with Keyboard Events in NSOpenGLView subclass

I've overridden an NSOpenGLView to handle keyboard events. The event detection is working fine, but every time I press a key I hear and annoying bump sound. How can I tell my view to chill out? Here's what my keyUp: method looks like: -(void)…
LandonSchropp
  • 10,084
  • 22
  • 86
  • 149
3
votes
2 answers

Swift, OpenGL and glVertexAttribPointer

I'm translating the Objective-C code in this repo into Swift, in order to learn some of the basics of OpenGL. I'm totally new to it. I've got a working project that compiles and produces a working NSOpenGLView with a floating rectangle, but the…
Aaron Rasmussen
  • 13,082
  • 3
  • 42
  • 43
3
votes
2 answers

NSOpenGLView subclass not resizing with window

I've been trying to get the NSOpenGLView to resize correctly when resizing the window, but I keep getting weird behaviour which I cannot explain. It looks like so: Original (What it looks like at the beginning): After resize: This is my resize…
3
votes
0 answers

Should my CVDisplayLinkOutputCallback method be used to update as well as render an OpenGL scene

I have managed to set up an NSOpenGLView using CVDisplayLinkSetOutputCallback as a method to render a scene in my application. Everything appears to be working correctly and the callback method is firing at a pretty decent rate. So far, I have…
Zack Brown
  • 5,990
  • 2
  • 41
  • 54
3
votes
1 answer

Efficient Cocoa Animation w/raw bitmap data

I have a raw bitmap image of RGBA malloc-ed data; rows are obviously a multiple of 4 bytes. This data actually originates from an AVI (24-bit BGR format), but I convert it to 32-bit ARGB. There's about 8mb of 32-bit data (1920x1080) per…
zzyzy
  • 973
  • 6
  • 21
2
votes
1 answer

FBO: render to texture, wrong texture mapping when drawing rendered texture

I'm using OpengGL on a Mac OS X application to draw texture on a NSOpenGLView. The app is a movie player. It decodes movie frames into CVOpenGLTextureRef (which are OpenGL texture) and I draw them directly to the view using GL_QUAD. Everything works…
Andrea3000
  • 1,018
  • 1
  • 11
  • 26
2
votes
2 answers

Draw different shapes on NSOpenGLView in different NSWindow

I work on AudioVisualizer in objective c on Mac OS. I have 2 NSWindows what has NSOpenGLView in it. If open only 1 NSWindow with NSOpenGLView, it shows shapes without any issues. But if open 2 NSWindows what has NSOpenGLView on it, only one GLView…
Mark
  • 271
  • 1
  • 9
2
votes
3 answers

How to draw to NSOpenGLView from a view controller object?

In IB I placed an NSOpenGLView instance into the window. I have all of my drawing code inside a custom NSViewController like so: // MyOpenGLViewController.h @interface MyOpenGLViewController : NSViewController { IBOutlet NSOpenGLView *glView; …
anna
  • 2,723
  • 4
  • 28
  • 37
2
votes
2 answers

Changing focus from NSTextField to NSOpenGLView?

I am developing an interface for an OpenGL Simulation on the Mac using Interface Builder. All OpenGL stuff is being written in C++ (which I know fairly well). Unfortunately I have no idea about Objective-C. Basically, I have a few NSTextField…
David
  • 43
  • 3
2
votes
0 answers

Hang in [NSOpenGLContext flushBuffer]

I have two NSOpenGLViews, named myView1 and myView2. myView2 is a sub view of myView1. Then I use CVDisplayLinkCreateWithCGDisplay to create a display link for the main display. Both myView1 and myView2 will draw something in the main thread(i.e. in…
popeye
  • 21
  • 2
2
votes
1 answer

Error creating NSOpenGLView

I'm trying to create an OpenGL application using Cocoa API, and by now everything works fine, except for one thing. When the main window is resized the GL context seems not be updated properly. Here's is the code used to setup window and render…
Ortuman
  • 21
  • 1
2
votes
3 answers

My NSOpenGLView won't work. I've tried everything

I want to display something in an NSOpenGLView, but since there is a total of zero bytes of documentation on it, and the sample code is as big and complex as the documentation should be, I can't get any wise out of it. This is my code so far, and my…
user142019
2
votes
0 answers

NSAnimation crash on com.apple.root.default-qos thread

I'm working on a Cocoa application that leverages NSOpenGLView driven from a CVDisplayLink thread. We've recently seen a number of crash reports (in the wild) with the following stack trace. 10.11 only. #29. Crashed: com.apple.root.default-qos 0 …