Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Cocoa 2D OpenGL Texture + easy Question

This topic is 5279 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!