Advertisement

Cocoa 2D OpenGL Texture + easy Question

Started by June 04, 2004 02:44 PM
-1 comments, last by bstace 20 years, 6 months ago
Ok, I''m new to OpenGL, and I tought I could do it, but I''m starting to think I can''t anymore. 1. I checked out Apple''s OpenGL sample code with the green triangle (http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/chap4/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000163), and I had no trouble doing it. Then I came here to see if I could do textures...Apparently the tutorials here are much different than how Apple lays out their sample code and I don''t know why. So, I go looking into Tutorial 6, and I kinda understand it. I wanted to see if I could take that tutorial 6 and make it 2d, without rotatation and without fullscreen (since fullscreen doesn''t work on any mac I tried it on >=Mac OS 10.2.8). I wanted to also try and make the tutorial 6 sample code similar to the Apple sample code. Anyhow, this is what I came up with the "red book" in hand. http://www.personal.psu.edu/users/b/s/bss156/projects/extgreeny.zip (40 some Kb) ...and it doesn''t work, I just get a white square. ANY IDEAS? (yes I looked at the thread below "MS3D OpenGL Texturing Question" and that fix in there didn''t work). 2. also, does anyone know why the -drawRect() function is always called at start up?...this was maybe why -awakeFromNib is in the tutorials here among other reasons? notes on the project: The CustomOpenGLView class is a subclass of NSOpenGLView and is pretty much the first part of Apple''s sample code but instead with a rectangle. The CustomOpenGLView2 class is my attempt at the nehe tutorial 6 2d, no rotation, no fullscreen. and the ControllerClass class only maintains an outlet that never gets used. FYI the outlet is to the CustomOpenGLView view in the MainMenu.nib. -------------- Brent Stace
--------------Brent Stace

This topic is closed to new replies.

Advertisement