Chapter 6. Creating a Windows OpenGL View Class
To a programmer, it’s never concrete ’til they see code. | ||
--John Vlissides |
Encapsulating OpenGL
So far we’ve covered the basic OpenGL operations and have learned how to create an OpenGL window under Windows. The simplest way to use OpenGL is to encapsulate and keep all this functionality in one place. After all, the process of creating an OpenGL window when using the Microsoft Foundation Classes (MFC) is going to be the same, no matter what the objective of your OpenGL program is going to be. Thus we can encapsulate all this initialization and setup, using C++ as a reusable class for viewing OpenGL scenes. If you’ve never used MFC before or if you use another framework, the next section will give ...
Get OpenGL Programming for Windows 95 and Windows NT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.