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 the whole Cocoa/Objective-C malarky (but have years of C/C++ on *nix).
I'm trying to create a basic Cocoa application that is filled with an NSOpenGLView. I have:
chink.mm
#import
#import "chink.h"
@implementation…
I Am trying to implement picking in a NSOpenGLView , but not works, this is the code.
I render only the objects that I need pick with no lights and I render the scene as same in normal render.
- (void)drawSeleccion
{
NSSize size = [self…
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 MacOSX and Unix (my…
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…
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,…
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…
I'm really tearing my head out on this one!
I'm subclassing NSOpenGLView to do some animations on the view.
When i say animations, i mean that am moving some images from left to right of the view and so on.
This is what i do
a) Initialise the OpenGL…
I initialize my QCRenderer like this:
let glPFAttributes:[NSOpenGLPixelFormatAttribute] = [
UInt32(NSOpenGLPFABackingStore),
UInt32(0)
]
let glPixelFormat = NSOpenGLPixelFormat(attributes: glPFAttributes)
if glPixelFormat == nil {
…
I'm working on an OSX app that is made of two NSOpengGLViews (leftGLView and rightGLView) placed side-by-side inside the NSWindow contentView.
The two views don't share the NSOpenGLContext but are both double-buffered and sync the buffer swap with…
I do not know whether this is a depth buffer issue or another. I can see through one wall but not another:
Now when I rotate so the second wall becomes more prominent:
I have the depth buffer enabled in Interface Builder. My OGL enables look like…
I'm currently using OpenGL to display my QTMovie's frames into an NSOpenGLView.
In order to do that, I'm creating a texture context with the following code:
// Called from a subclass of NSOpenGLView
QTOpenGLTextureContextCreate(kCFAllocatorDefault,
…
I am trying to draw a very simple blue square with a red background in OpenGL using an NSOpenGL on Mountain Lion. The code is simple and should work, I'm assuming it's a problem with me setting up the context.
Here is my GLView interface:
#import…
I'm writing an application that will require multiple windows.
I've designed how I want my window to look in Interface Builder and when I start my application it all looks as it should.
I've got a large library of C++ code that I've been making use…
I'm trying to create a method that will toggle between fullscreen and a window. I'm trying to do this from within a class inherited from NSOpenGLView, essentially following this blogpost. That works once, going from windowed to fullscreen; trying to…