nsopenglview

NSTextField over NSOpenGLView

I have made a window with an NSOpenGLView that I am rendering openGL content into. I want to add some buttons and text fields to the view: I can add NSTextFields and NSButtons using interface builder (or code) but they do not appear. NSOpenGLView is documented as not being able to have sub views, so I then made my own CustomGLView by d...

entering fullscreen on subclassed NSOpenGLView leaves empty window

hello, i have an application with 2 windows, one is a custom subclassed NSOpenGLView and one is displaying some standard cocoa user interace. making the opengl view go fullscreen (only on one NSScreen) works by calling enterFullScreenMode and exitFullScreenModeWithOptions and supplying the right screen and setting NSFullScreenModeAllS...

OpenGL Pixel Format Attributes (NSOpenGLPixelFormatAttibutes) explanation?

Hi, 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 { GLuint attribs[] = { //PF: PixelAttibutes NSOpenGLPFANoRecovery, ...

Problem exporting NSOpenGLView pixel data to some image file formats using ImageKit & CGImageDestination

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 resulting image to be exported to a file or copied to the clipboard. The view exports the ...

Determing if an NSOpenGLView has a valid context (Cocoa OSX)

I am trying to check that my NSOpenGLView has a valid context but it seems that a call to openGLContext will not help me figure this out. openGLContext seems to always returns a an NsOpenGlContext (it returns the current context if the view has one and if not it makes a context and returns that). Is there another method I could use ins...

NSWindow titlebar turns white when resizeing

Hi, I'm programatically resizing my NSWindow containing an NSOpenGLView. The window resizes, the NSOpenGLView is handling the resizing fine, but the titlebar of the NSWindow turns completely white. However the buttons (minimize,...) can be clicked, also you can not see them. Resizing occurs using the following code in the windows con...

Trouble sharing textures with OpenGL/Cocoa

I am a bit of an openGL novice and I am trying to get texture sharing to work between two openGL views. I created two NSOpenGL view classes and then in the interface builder I created a window that had one of each openGL view. The first view has code in its prepareOpenGl that sets up the texture and assigns it to a global variable, the...

Problems with an unusual NSOpenGLView setup

Hi, This is a bit long, so feel free to skip to the numbered parts if you want to avoid the lengthy intro. I'm trying to set a subclassed NSOpenGLView in an unusual way and I am running into some problems. Basically, I am writing a program to perform a bioengineering simulation for my PhD and I need to be able to compile it under both ...

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 ANOpenGLView is an NSOpenGLView in a NIB subclassed as ANOpenGLView: @implementation ANO...

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) keyUp:(NSEvent *)theEvent { NSString *characters = [theEvent charactersIgnoringModifiers...