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
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
1
vote
1 answer

GCController framework (OSX) not generating notifications

I'm trying to integrate the GCController framework into my project. I'm not so familiar with Objective-C, so please excuse my ignorance around how this is supposed to work. I have a class that extends NSOpenGLView, which registers observer methods…
1
vote
1 answer

OpenGL Pixel Format Attributes (NSOpenGLPixelFormatAttibutes) explanation?

I am not new to OpenGL, but not an expert. Many tutorials teach how to draw, 3D, 2D, projections, orthogonal, etc, but How about setting a the view? (NSOpenGLView in Cocoa, Macs). For example I have this: - (id) initWithFrame: (NSRect) frame { …
nacho4d
  • 43,720
  • 45
  • 157
  • 240
1
vote
0 answers

Draw NSImage to NSOpenGLView

I'm trying to basically implement a NSImageView using NSOpenGLView. I mean, it should be able to render from a provided NSImage. Could anyone provide me a simple OpenGL implementation or some starting guide lines?
vbrittes
  • 200
  • 1
  • 14
1
vote
1 answer

NSView containing NSOpenGLView doesn't redraw after a subview is removed

I have a Mac OS X (10.9) application with a custom NSView for my main NSWindow's contentView property. The only thing the custom view does is override drawRect: so that it's transparent. Transparency is required so that my NSOpenGLView is visible…
brianfoshee
  • 37
  • 1
  • 7
1
vote
0 answers

NSOpenGLView drawRect not called after window resize

I have a NSOpenGLView object within a floating NSPanel of which I render an image using glDrawPixels. Everything works fine until the window gets resized. I've prevented resizing by returning a fixed size when the resize function of the NSPanel…
Sev
  • 4,858
  • 1
  • 14
  • 11
1
vote
1 answer

NSOpenGLContext destroying textures of another context

I'm using NSOpenGLContext to optimize drawing AU plugins. There are multiple plugins and each can have multiple instances. So each plugin creates a global NSOpenGLContext and attach particular NSView contexts to it, so that the textures do not need…
Vojtěch Melda Meluzín
  • 1,117
  • 3
  • 11
  • 22
1
vote
1 answer

OpenGL with Cocoa: No matching function call when trying to call CGLLockContext([[self openGLContext] CGLContextObj]);

I am learning OpenGL. To get an OpenGL context setup I was following the GlEssentials example from Apple. The GlContext is there locked in the draw method as follows: - (void) drawView { [[self openGLContext] makeCurrentContext]; // We…
Nils
  • 13,319
  • 19
  • 86
  • 108
1
vote
2 answers

NSOpenGLView Won't Clear

I am trying out OpenGL 3.2 using a Cocoa window and an NSOpenGLView. However I can't get the NSOpenGLView to draw a red color. I just get a white window. Here is my code (inside subclass of…
foobar5512
  • 2,470
  • 5
  • 36
  • 52
1
vote
1 answer

NSOpenglContext resources, incorrect render

I'm having trouble to get NSOpenGLContext working. I have a static object (3D engine) that handle all the opengl stuff, resources , vbos etc.. For the cocoa version, i create a NSOpenGLContext like this : - (BOOL) CreateContext { …
Ziggy
  • 332
  • 4
  • 19
1
vote
1 answer

How to draw in two NSOpenGLViews using Cocoa (Mac)

i want to draw in two NSOpenGLViews in a Cocoa App using XCode, different things in each view. i think i have to use NSOpenGLContext, and the method SetView. but i have not found how to use this exactly. where i have to use this calls? which is the…
1
vote
2 answers

OpenGL cube not showing, is it with near and far planes maybe?

I cannot get my cube to show after trying to do a manual perspective transformation My code is below. I have a suspicion it maybe my near and far plane numbers. -(void)drawRect:(NSRect)dirtyRect { // get the dimensions of the window NSSize…
xBACP
  • 531
  • 1
  • 3
  • 17
0
votes
1 answer

NSOpenGLView in a NP (Netscape) web plugin

Does anyone know of any resources/examples for setting up an NP web plugin on Mac with a NSOpenGLView? I've tried modifying some of the samples in the WebKit SVN, but it doesn't load the GLView. The way I have it setup is storing off the…
TaylorP
  • 1,039
  • 2
  • 13
  • 28
0
votes
1 answer

Can't get NSMouseMoved events from nextEventMatchingMask with an NSOpenGLView

I'm trying to create a basic opengl window with mouse input using a typical win-style event loop. The problem is that I'm pulling my hair out trying to get a NSMouseMoved event to generate. The following code outputs debug info on Mouse Up, Mouse…
user943803
  • 76
  • 1
0
votes
1 answer

Using OpenGL ES on the Mac

Is it possible and not too complicated to use OpenGL ES for OS X development. I have been writing Mac applications for three years now and I am ready to start learning about OpenGL, but I want use OpenGL ES because there is a lot of information…
foobar5512
  • 2,470
  • 5
  • 36
  • 52