PDA

View Full Version : Fundamental Q: Switching to Cocoa mindset



typewriter
09-29-2004, 11:22 AM
Say I have a class for manipulating a graphics array of 720x486:


@interface NTSCBuffer : NSObject {
int Status;
GLubyte S[720*486*3];
}
- (id) Perlinnoise: (int) future_features;
- (id) Flood: (int) value;I want functions to modify the array S, and I will want to add a way for my openGL instance to draw this array to its viewport.

My understanding is that to utilize this class, I would create an instance in my openGL class

NTSCBuffer Viewport;xcode gives error: "statically allocated instance". Can anyone clarify my incorrect thinking behind this?

Thanks very much guys, sorry for the minimal GL content!

Aeluned
09-29-2004, 11:46 AM
What does this have to do with OpenGL?

I'm not even sure what you're writing with, but apparently it doesn't like you trying to allocate things off the stack...

try getting a reference to the class at runtime off the heap.

...