PDA

View Full Version : glGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB) problem


Jake
2004.11.05, 08:18 PM
Sorry for my 100th thread in the last few days, but I keep crashing on the glGetint line here


GLint maxTexelUnits; (class declaration)

maxTexelUnits = 1;
NSLog(@"%d",maxTexelUnits);
glGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &maxTexelUnits );
NSLog(@"%d",maxTexelUnits);


Any ideas??? It worked in a NeHe example. I also have the same includes that they have.


#0 0x90c340f8 in glGetIntegerv
#1 0x0000b368 in -[controller awakeFromNib] at controller.m:612
#2 0x0000b368 in -[controller awakeFromNib] at controller.m:612
#3 0x90a2e750 in -[NSSet makeObjectsPerformSelector:]
#4 0x92df1c18 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:]
#5 0x92e85ddc in -[NSWindow(DrawerSupportPrivate) _destroyRealWindowForAllDrawers]
#6 0x92e3a80c in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
#7 0x92eb95c8 in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
#8 0x92ecadbc in +[NSBundle(NSNibLoading) loadNibNamed:owner:]
#9 0x92eb9430 in NSApplicationMain
#10 0x000085e0 in main at main.m:13

arekkusu
2004.11.05, 08:42 PM
It might not be safe to issue GL commands in your GLview subclass init called from awakeFromNib. Did you make the context current? Is the view visible on screen at that time?

Jake
2004.11.05, 09:00 PM
It might not be safe to issue GL commands in your GLview subclass init called from awakeFromNib. Did you make the context current? Is the view visible on screen at that time?

That must be the problem, If I don't make another post assume that was the problem (it sounds like it is).

Thanks