Questions tagged [nsopengl]

8 questions
7
votes
1 answer

OpenGL 3.2 w/ NSOpenGLView

How would I create a core profile in a custom implementation of NSOpenGLView? Which method should I override and what code should I put there? So far I have this code: // Header File #import @interface TCUOpenGLView :…
Oskar
  • 1,321
  • 9
  • 19
6
votes
3 answers

OpenGL not rendering on macOS Mojave

If you create an NSView and a custom NSOpenGLContext on macOS Mojave, the window is not being rendered to until it is being resized. But everything works if you use NSOpenGLView instead. I see lots of hacks that resize the window programmatically…
Elviss Strazdins
  • 1,404
  • 14
  • 30
3
votes
1 answer

Draw from a separate thread with NSOpenGLLayer

I'm working on an app which needs to draw with OpengGL at a refresh rate at least equal to the refresh rate of the monitor. And I need to perform the drawing in a separate thread so that drawing is never locked by intense UI actions. Actually I'm…
Andrea3000
  • 1,018
  • 1
  • 11
  • 26
2
votes
1 answer

Drawing in a NSWindow

I'm working on a cocoa wrapper for a graphics framework. To finally draw the stuff, I'm doing this: - (void)drawRect:(NSRect)rect { CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawImage(ctx,…
Karl von Moor
  • 8,484
  • 4
  • 40
  • 52
2
votes
0 answers

Embedding NSOpenGlViews in a ScrollView does not produce expected scrolling behavior

I have three NSOpenGLViews embedded in a scrollview. Scrolling produces unexpected behavior. The NSOpenGLViews refuse to be clipped by the bottom of the scrollview and instead will sit on the bottom of the scrollview as its resized to a smaller…
Christian J. B.
  • 491
  • 1
  • 5
  • 16
1
vote
0 answers

NSOpenGL I420 YUV buffer render on OSX

In my application, i have to display the YUV frame receiving from the server, YUV image format is I420, I have subclass NSOpenGLView like this, @interface RTCNSGLVideoView : NSOpenGLView and OpenGL View creating on the View…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
0
votes
1 answer

NSOpenGLContext for non-drawing purposes

How to create a system-independent NSOpenGLContext in Cocoa, not for drawing, but for retrieving OpenGL information like vendor, version etc. ???
yolo
  • 2,757
  • 6
  • 36
  • 65
0
votes
1 answer

cocos2d CCDirectorMac - SIGABRT on self.view.openGLContext flushBuffer

I have a cocos2d Mac application. I get random crashes when creating and adding Sprites. Bascially i get SIGABRT on // flush buffer [self.view.openGLContext flushBuffer]; in CCDirectorMac. Screenshot…
Alex
  • 541
  • 5
  • 19