id: 11850    nodeId: 11850    type: General    point: 84.0    linkPoint: 1.0    maker: cella    permission: linkable    made at: 2013.09.16 01:59    edited at: 2013.09.16 12:48
OpenGL Programming Guide for Mac
Drawing to a Window or View

Drawing to an NSOpenGLView Class: A Tutorial
Though I had done according to the guide, MyOpenGLView was not added to the main window.
I fixed this problem by
(1) Click "Show Documents Outline" button in the left bottom in MainMenu.xib pane.
(2) Then "Objects" pane is shown. I moved MyOpenGLView object under the window's view.
(I wanted to use addSubview method, but couldn't find the window's view.)
The result is project op1.

Drawing OpenGL Content to a Custom View
The explanation of the guide is insufficient and old. I changed and added codes according to "General Approach"
in the top of this page.
The result is project op2_2. (op2 was failed to addSubview and couldn't fix it.)

Return to OpenGL Programming Guide for Mac