📄 test.h
字号:
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <gl/glaux.h>
#include <stdio.h>
#include <io.h>
#include <stdio.h>
HWND hWnd;
HDC hDC;
HGLRC hRC=NULL; //定义渲染环境
HINSTANCE hInstance; //得到程序的例子
RECT rect;
int sw = 640;
int sh = 480;
GLfloat aspect;
bool keys[256];
bool active=TRUE;
bool fullscreen=TRUE;
GLfloat rtri=0.0;
GLfloat rquad=0.0;
GLfloat xrot,yrot,zrot,xspeed,yspeed;
GLfloat z=-5.0f;//移入屏幕深度
GLuint texture[3];
bool light; //光源-开/关( 新 )
bool lp; //L键是否按下? ( 新 )
bool fp; //F键是否按下? ( 新 )
bool bp,blend;
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f }; //环境光的值(新)
GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f }; //散射光的值(新)
GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f }; //光照位置 (新)
GLuint filter; //过滤器选择
#pragma comment( lib, "opengl32.lib" ) // 链接时使用OpenGL32.lib
#pragma comment( lib, "glu32.lib" ) // 链接时使用GLu32.lib
#pragma comment( lib, "glaux.lib" ) // 链接时使用GLaux.lib
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -