文件名称:NeHeOpenGL
- 所属分类:
- OpenGL
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 11.37mb
- 下载次数:
- 0次
- 提 供 者:
- 任*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
NEHE教程所有源码,对学习OpenGL的初学者有很大的帮助。-#include <windows.h> // Header File For Windows
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include <gl\glu.h> // Header File For The GLu32 Library
#include <gl\glaux.h> // Header File For The Glaux Library
HDC hDC=NULL // Private GDI Device Context
HGLRC hRC=NULL // Permanent Rendering Context
HWND hWnd=NULL // Holds Our Window Handle
HINSTANCE hInstance // Holds The Instance Of The Application
bool keys[256] // Array Used For The Keyboard Routine
bool active=TRUE // Window Active Flag Set To TRUE By Default
bool fullscreen=TRUE // Fullscreen Flag Set To Fullscreen Mode By Default
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM) // Declaration For WndProc
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
{
if (height==0) // Prevent A Divide By Zero By
{
height=1 // Making Height Equal One
}
glViewport(0,0,width,height)
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include <gl\glu.h> // Header File For The GLu32 Library
#include <gl\glaux.h> // Header File For The Glaux Library
HDC hDC=NULL // Private GDI Device Context
HGLRC hRC=NULL // Permanent Rendering Context
HWND hWnd=NULL // Holds Our Window Handle
HINSTANCE hInstance // Holds The Instance Of The Application
bool keys[256] // Array Used For The Keyboard Routine
bool active=TRUE // Window Active Flag Set To TRUE By Default
bool fullscreen=TRUE // Fullscreen Flag Set To Fullscreen Mode By Default
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM) // Declaration For WndProc
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
{
if (height==0) // Prevent A Divide By Zero By
{
height=1 // Making Height Equal One
}
glViewport(0,0,width,height)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Lesson01
........\Lesson1.cpp
........\Lesson1.dsp
........\Lesson1.dsw
........\Lesson1.exe
........\NeHe's Readme.txt
Lesson02
........\Lesson2.cpp
........\Lesson2.dsp
........\Lesson2.dsw
........\Lesson2.exe
........\NeHe's Readme.txt
Lesson03
........\Lesson3.cpp
........\Lesson3.dsp
........\Lesson3.dsw
........\Lesson3.exe
........\NeHe's Readme.txt
Lesson04
........\Lesson4.cpp
........\Lesson4.dsp
........\Lesson4.dsw
........\Lesson4.exe
........\NeHe's Readme.txt
Lesson05
........\Lesson5.cpp
........\Lesson5.dsp
........\Lesson5.dsw
........\Lesson5.exe
........\NeHe's Readme.txt
Lesson06
........\Data
........\Lesson6.cpp
........\Lesson6.dsp
........\Lesson6.dsw
........\Lesson6.exe
........\NeHe's Readme.txt
Lesson07
........\Data
........\Lesson7.cpp
........\Lesson7.dsp
........\Lesson7.dsw
........\Lesson7.exe
........\NeHe's Readme.txt
Lesson08
........\Data
........\....\Glass.bmp
........\Lesson8.cpp
........\Lesson8.dsp
........\Lesson8.dsw
........\Lesson8.exe
........\NeHe's Readme.txt
Lesson09
........\Data
........\....\Star.bmp
........\Lesson9.cpp
........\Lesson9.dsp
........\Lesson9.dsw
........\Lesson9.exe
........\NeHe's Readme.txt
Lesson10
........\Data
........\....\World.txt
........\Lesson10.cpp
........\Lesson10.dsp
........\Lesson10.dsw
........\Lesson10.exe
........\NeHe's Readme.txt
Lesson11
........\Data
........\Lesson11.cpp
........\Lesson11.dsp
........\Lesson11.dsw
........\Lesson11.exe
........\NeHe's Readme.txt
Lesson12
........\Data
........\....\Cube.bmp
........\Lesson12.cpp
........\Lesson12.dsp
........\Lesson12.dsw
........\Lesson12.exe
........\NeHe's Readme.txt
Lesson13
........\Lesson13.cpp
........\Lesson13.dsp
........\Lesson13.dsw
........\Lesson13.exe
........\NeHe's Readme.txt
Lesson14
........\Lesson14.cpp
........\Lesson14.dsp
........\Lesson14.dsw
........\Lesson14.exe
........\NeHe's Readme.txt
Lesson15
........\Lesson1.cpp
........\Lesson1.dsp
........\Lesson1.dsw
........\Lesson1.exe
........\NeHe's Readme.txt
Lesson02
........\Lesson2.cpp
........\Lesson2.dsp
........\Lesson2.dsw
........\Lesson2.exe
........\NeHe's Readme.txt
Lesson03
........\Lesson3.cpp
........\Lesson3.dsp
........\Lesson3.dsw
........\Lesson3.exe
........\NeHe's Readme.txt
Lesson04
........\Lesson4.cpp
........\Lesson4.dsp
........\Lesson4.dsw
........\Lesson4.exe
........\NeHe's Readme.txt
Lesson05
........\Lesson5.cpp
........\Lesson5.dsp
........\Lesson5.dsw
........\Lesson5.exe
........\NeHe's Readme.txt
Lesson06
........\Data
........\Lesson6.cpp
........\Lesson6.dsp
........\Lesson6.dsw
........\Lesson6.exe
........\NeHe's Readme.txt
Lesson07
........\Data
........\Lesson7.cpp
........\Lesson7.dsp
........\Lesson7.dsw
........\Lesson7.exe
........\NeHe's Readme.txt
Lesson08
........\Data
........\....\Glass.bmp
........\Lesson8.cpp
........\Lesson8.dsp
........\Lesson8.dsw
........\Lesson8.exe
........\NeHe's Readme.txt
Lesson09
........\Data
........\....\Star.bmp
........\Lesson9.cpp
........\Lesson9.dsp
........\Lesson9.dsw
........\Lesson9.exe
........\NeHe's Readme.txt
Lesson10
........\Data
........\....\World.txt
........\Lesson10.cpp
........\Lesson10.dsp
........\Lesson10.dsw
........\Lesson10.exe
........\NeHe's Readme.txt
Lesson11
........\Data
........\Lesson11.cpp
........\Lesson11.dsp
........\Lesson11.dsw
........\Lesson11.exe
........\NeHe's Readme.txt
Lesson12
........\Data
........\....\Cube.bmp
........\Lesson12.cpp
........\Lesson12.dsp
........\Lesson12.dsw
........\Lesson12.exe
........\NeHe's Readme.txt
Lesson13
........\Lesson13.cpp
........\Lesson13.dsp
........\Lesson13.dsw
........\Lesson13.exe
........\NeHe's Readme.txt
Lesson14
........\Lesson14.cpp
........\Lesson14.dsp
........\Lesson14.dsw
........\Lesson14.exe
........\NeHe's Readme.txt
Lesson15