ofAppCocoaWindow + shaders


has anyone tried to use the cocoa window renderer with ofxShader?
I keep getting the error

“Sorry, it looks like you can’t run ‘ARB_shader_objects’.
Please check the capabilites of your graphics card.

Any ideas? I guess this would have to do with the constant GLEE_ARB_shader_objects, but I’m not sure why that would show up as false with cocoa windows…

FYI, the reason I’m using ofAppCocoaWindow is to make chromeless windows via NSBorderlessWindowMask, which is working nicely aside from the shader issues.

update: should have poked around a little first! memo’s fantastic ofxMacOSX addon solves this issue no problem.


just as a side note, chromeless windows (e.g. fullscreen-esque with no menu bars, etc) are super easy to make. just point your window in interface builder to a class such as ChromelessWindow and override initWithContentRect like this:

#import "ChromelessWindow.h"  
@implementation ChromelessWindow  
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag  
	self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag];  
	[self setLevel:NSScreenSaverWindowLevel]; //comment this out to make the window at a normal level (not above all of your other apps)  
	[self setReleasedWhenClosed: YES];  
	[self setAcceptsMouseMovedEvents:YES];  
	[self makeFirstResponder:self];  
	[self setOpaque:true];  
	return self;  
- (BOOL)canBecomeKeyWindow  
    return YES;  

The last override, canBecomeKeyWindow, is 100% necessary as well. As I understand it, NSBorderlessWindowMask styled windows are not by default set to receive key events.