/* Controller */

#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <AppKit/AppKit.h>

#define _NEWTON_USE_LIB 1
#import "newton.h"

@interface Controller : NSObject
{
    IBOutlet NSWindow *primaryWindow;
    IBOutlet NSWindow *surfaceWindow;
	
    IBOutlet id reflectCheck;
    IBOutlet id shadowCheck;
    IBOutlet id fpsText;
    IBOutlet id amsCheck;
    IBOutlet id sensitivitySlider;
    IBOutlet id speedSlider;
	
    NSOpenGLContext *shareContext;
    NSOpenGLContext *primaryContext;
    NSOpenGLContext *surfaceContext;

    NSSize shareContextSize;
    NSSize primaryContextSize;
    NSSize surfaceContextSize;
	
    GLenum surfaceTextureTarget;
    GLuint surfaceTexture;


    NSTimer        *timer;
    NSTimeInterval  startTime;
	
	//physics
	
	NewtonWorld* nWorld;
	NewtonBody* ballBody;
}
@end
