Advertisement

C++ references, NeHe basecode, openGL help

Started by May 12, 2001 05:29 PM
1 comment, last by Sketchy 23 years, 9 months ago
Hi, I have 2 questions. The first is that I''ve been learning C++ and when I look at NeHe''s tutorials (eg. Lesson 1), I see that it is in C. Now what I''m wondering is if it would be better, when creating win32 windowing functions (such as one to create a window) that take in objects as parameters (such as having hInstance and hWnd parameters), to use call by reference instead of call by value. NeHe''s code for lesson 1 uses call by value, but I changed it to use call by reference so that copies of the object parameters are not created when the function is called. I was also wondering why some of the GL functions in lesson 1 have weird return types and parameters like GLVoid. What would happen if plain old Void was used instead? ---SK, drugged up on flu meds
GLvoid is a typedef of void, they''re the same thing.

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/
Advertisement
The typedef for glvoid is used to make it easier to port your programs to other platforms. glvoid will work the same on any compiler for and platform that is compatible with opengl. It just makes it easier to port.

"Those who want it, but can''''t get it, will complain about it.

This topic is closed to new replies.

Advertisement