-
大小: 170KB文件類型: .zip金幣: 1下載: 0 次發布日期: 2021-01-05
- 標簽: SDLFramework??OpenGL??
資源簡介
SDLFramework for OpenGL in C++.
代碼片段和文件信息
#include?“cgl.h“
CGL::CGL()
{
????//ctor
}
CGL::CGL(int?_width?int?_height)
{
????this->width?=?_width;
????this->height?=?_height;
}
CGL::~CGL()
{
????//dtor
}
bool?CGL::initGL()
{
????/*?Enable?smooth?shading?*/
????glShadeModel(?GL_SMOOTH?);
????/*?Set?the?background?black?*/
????glClearColor(?0.0f?0.0f?0.0f?0.0f?);
????/*?Depth?buffer?setup?*/
????glClearDepth(?1.0f?);
????/*?Enables?Depth?Testing?*/
????glEnable(?GL_DEPTH_TEST?);
????/*?The?Type?Of?Depth?Test?To?Do?*/
????glDepthFunc(?GL_LEQUAL?);
????/*?Really?Nice?Perspective?Calculations?*/
????glHint(?GL_PERSPECTIVE_CORRECTION_HINT?GL_NICEST?);
????return(?true?);
}
bool?CGL::resizeGL(int?widthint?height)
{
????if?(?height?==?0?)
????{
????????height?=?1;
????}
????//Reset?View
????glViewport(?0?0?(GLint)width?(GLin
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????452??2013-08-01?14:59??util.h
?????文件????????4144??2013-08-01?15:01??util.cpp
?????文件?????????839??2013-08-01?15:30??SDLTest.layout
?????文件?????????797??2013-08-02?02:05??SDLTest.depend
?????文件????????1373??2013-08-01?15:30??SDLTest.cbp
?????文件?????????591??2013-08-02?01:48??main.cpp
?????文件?????????758??2013-08-02?01:45??csdl.h
?????文件????????3044??2013-08-02?01:45??csdl.cpp
?????文件?????????408??2013-08-02?01:44??cgl.h
?????文件????????2422??2013-08-02?02:10??cgl.cpp
?????文件???????20052??2013-08-02?01:49??obj\Debug\main.o
?????文件???????22548??2013-08-02?02:00??obj\Debug\cgl.o
?????文件???????21460??2013-08-01?14:17??obj\Debug\sdl.o
?????文件???????35016??2013-08-02?01:46??obj\Debug\csdl.o
?????文件??????205412??2013-08-01?15:01??obj\Debug\util.o
?????文件??????187559??2013-08-02?02:00??bin\Debug\SDLTest
?????目錄???????????0??2013-08-02?02:00??obj\Debug\
?????目錄???????????0??2013-08-01?13:50??obj\
?????目錄???????????0??2013-08-02?02:00??bin\Debug\
?????目錄???????????0??2013-08-01?13:50??bin\
- 上一篇:通過滾動條調節圖像的亮度
- 下一篇:C++反射動態創建所需類的
評論
共有 條評論