• 大小: 5.74MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: 其他
  • 标签: opengl  Windows  

资源简介

压缩文件中,有OpenGL的安装包和在Windows平台下的安装指导网页文件

资源截图

代码片段和文件信息

// Block.cpp
// OpenGL SuperBible Chapter 1
// Demonstrates an assortment of basic 3D concepts
// Program by Richard S. Wright Jr.

#include  // OpenGL toolkit
#include 
#include ame.h>
#include 
#include 
#include 

#include 
#ifdef __APPLE__
#include 
#else
#define FREEGLUT_STATIC
#include 
#endif

#pragma comment(lib“gltools.lib“)

/////////////////////////////////////////////////////////////////////////////////
// An assortment of needed classes
GLShaderManager shaderManager;
GLMatrixStack modelViewMatrix;
GLMatrixStack projectionMatrix;
GLframe cameraframe;
GLFrustum viewFrustum;
GLBatch cubeBatch;
GLBatch floorBatch;
GLBatch topBlock;
GLBatch frontBlock;
GLBatch leftBlock;

GLGeometryTransform transformPipeline;
M3DMatrix44f shadowMatrix;


// Keep track of effects step
int nStep = 0;

// Lighting data
GLfloat lightAmbient[] = { 0.2f 0.2f 0.2f 1.0f };
GLfloat lightDiffuse[] = { 0.7f 0.7f 0.7f 1.0f };
GLfloat lightSpecular[] = { 0.9f 0.9f 0.9f };
GLfloat vLightPos[] = { -8.0f 20.0f 100.0f 1.0f };

GLuint textures[4];


///////////////////////////////////////////////////////////////////////////////
// Make a cube out of a batch of triangles. Texture coordinates and normals
// are also provided.
void MakeCube(GLBatch& cubeBatch)
{
cubeBatch.Begin(GL_TRIANGLES 36 1);

/////////////////////////////////////////////
// Top of cube
cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 1.0f 1.0f);
cubeBatch.Vertex3f(1.0f 1.0f 1.0f);

cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 1.0f 0.0f);
cubeBatch.Vertex3f(1.0f 1.0f -1.0f);

cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 0.0f);
cubeBatch.Vertex3f(-1.0f 1.0f -1.0f);

cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 1.0f 1.0f);
cubeBatch.Vertex3f(1.0f 1.0f 1.0f);

cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 0.0f);
cubeBatch.Vertex3f(-1.0f 1.0f -1.0f);

cubeBatch.Normal3f(0.0f 1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 1.0f);
cubeBatch.Vertex3f(-1.0f 1.0f 1.0f);


////////////////////////////////////////////
// Bottom of cube
cubeBatch.Normal3f(0.0f -1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 0.0f);
cubeBatch.Vertex3f(-1.0f -1.0f -1.0f);

cubeBatch.Normal3f(0.0f -1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 1.0f 0.0f);
cubeBatch.Vertex3f(1.0f -1.0f -1.0f);

cubeBatch.Normal3f(0.0f -1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 1.0f 1.0f);
cubeBatch.Vertex3f(1.0f -1.0f 1.0f);

cubeBatch.Normal3f(0.0f -1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 1.0f);
cubeBatch.Vertex3f(-1.0f -1.0f 1.0f);

cubeBatch.Normal3f(0.0f -1.0f 0.0f);
cubeBatch.MultiTexCoord2f(0 0.0f 0.0f);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18990  2017-04-18 22:04  OpenGL安装包\Demo\Block\Block.cpp

     文件     196652  2010-03-20 19:17  OpenGL安装包\Demo\Block\Block4.tga

     文件     196652  2010-03-20 19:17  OpenGL安装包\Demo\Block\Block5.tga

     文件     196652  2010-03-20 19:17  OpenGL安装包\Demo\Block\Block6.tga

     文件     196652  2010-03-20 19:17  OpenGL安装包\Demo\Block\floor.tga

     文件     210806  2017-04-15 14:51  OpenGL安装包\freeglut\freeglut-MSVC-3.0.0-2.mp.zip

     文件    2158207  2017-04-15 13:33  OpenGL安装包\glew\compiled\glew-2.0.0-win32.zip

     文件        522  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\filter_gles_ext.sh

     文件      22164  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\filter_gl_ext.sh

     文件       1271  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\filter_spec.py

     文件       5452  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make.pl

     文件        851  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_def_fun.pl

     文件        792  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_def_var.pl

     文件       1112  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_enable_index.pl

     文件       1697  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_header.pl

     文件       1453  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_html.pl

     文件        915  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_index.pl

     文件       1617  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_info.pl

     文件       1303  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_info_list.pl

     文件       1619  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_init.pl

     文件       1156  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_initd.pl

     文件       1928  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_list.pl

     文件       1143  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_list2.pl

     文件       1491  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_str.pl

     文件        875  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_struct_fun.pl

     文件        797  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\make_struct_var.pl

     文件      13438  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\parse_spec.pl

     文件       4080  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\parse_xml.py

     文件        698  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\bin\update_ext.sh

     文件        352  2016-07-24 08:43  OpenGL安装包\glew\src\glew-2.0.0\auto\blacklist

............此处省略1162个文件信息

评论

共有 条评论