OpenGL-ES-2
所属分类:OpenGL
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2022-01-02 15:07:54
上 传 者:
sh-1993
说明: c++中的OpenGL ES 2.0编程,
(OpenGL ES 2.0 programming in c++,)
文件列表:
First.sln (947, 2022-01-02)
First/ (0, 2022-01-02)
First/First.vcxproj (9369, 2022-01-02)
First/First.vcxproj.filters (9303, 2022-01-02)
First/app_control/ (0, 2022-01-02)
First/app_control/ELAppDelegate.cpp (2135, 2022-01-02)
First/app_control/ELAppDelegate.h (243, 2022-01-02)
First/app_control/ELApplication.cpp (2014, 2022-01-02)
First/app_control/ELApplication.h (588, 2022-01-02)
First/app_control/ELApplicationProtocol.cpp (71, 2022-01-02)
First/app_control/ELApplicationProtocol.h (167, 2022-01-02)
First/app_control/ELDirector.cpp (1548, 2022-01-02)
First/app_control/ELDirector.h (839, 2022-01-02)
First/app_control/ELOpenGLView.cpp (3928, 2022-01-02)
First/app_control/ELOpenGLView.h (1752, 2022-01-02)
First/basic/ (0, 2022-01-02)
First/basic/ELAutoReleasePool.cpp (355, 2022-01-02)
First/basic/ELAutoReleasePool.h (1616, 2022-01-02)
First/basic/ELRef.h (528, 2022-01-02)
First/basic/deprecated_ELWindowApp.cpp (5819, 2022-01-02)
First/basic/deprecated_ELWindowApp.h (998, 2022-01-02)
First/copy_cmd.txt (403, 2022-01-02)
First/include/ (0, 2022-01-02)
First/include/EGL/ (0, 2022-01-02)
First/include/EGL/egl.h (15297, 2022-01-02)
First/include/EGL/eglext.h (35391, 2022-01-02)
First/include/EGL/eglplatform.h (4971, 2022-01-02)
First/include/GLES2/ (0, 2022-01-02)
First/include/GLES2/gl2.h (31871, 2022-01-02)
First/include/GLES2/gl2ext.h (96618, 2022-01-02)
First/include/GLES2/gl2platform.h (909, 2022-01-02)
First/include/KHR/ (0, 2022-01-02)
First/include/KHR/khrplatform.h (10022, 2022-01-02)
First/include/elloop/ (0, 2022-01-02)
First/include/elloop/Singleton.h (477, 2022-01-02)
First/include/elloop/inc.h (92, 2022-01-02)
First/include/elloop/log.h (115, 2022-01-02)
First/include/elloop/macro_define.h (359, 2022-01-02)
First/include/elloop/print_util.h (3660, 2022-01-02)
... ...
# OpenGL-ES-2.0-cpp
---------------------
# Introduction
This is a graphics application based on OpenGL ES 2.0 API, using C++ and the OpenGL ES Shading Language. The logic structure of this project is like the cocos2d-x game engine, it is started by main.cpp which contains main() function and calls Appdelegate's run() function.
Main contents in this project are:
## Draw Rectangle, Circle, etc , simple graphics.
these simple graphics drawwing programs help understanding the process of a OpenGL ES program running.
## Texture
- basic texture rendering
- multiple texture rendering
![dog_texture.gif](https://github.com/elloop/elloop.github.io/blob/master/blog_pictures/dog_texture.gif)
## Mipmapping
![mipmap_effect.gif](https://github.com/elloop/elloop.github.io/blob/master/blog_pictures/mipmap_effect.gif)
## 3D projection
![comprehensive_test.gif](https://github.com/elloop/elloop.github.io/blob/master/blog_pictures/comprehensive_test.gif)
## Using of buffer objects: VAO, VBO
![vbo_cube.gif](https://github.com/elloop/elloop.github.io/blob/master/blog_pictures/vbo_cube.gif)
## Alpha test, depth test
# [ ] Critical Codes
```c++
namespace elloop {
class Application; // application abstraction.
class AppDelegate; // derived from Application.
class OpenGLView; // Windows control and OpenGL ES Drawing Context.
class Director; // control the process of rendering.
class Drawable; // things to be rendered.
class Ref; // Object, for reference counting.
class AutoReleasePool; // manage the reference count of pointer to object of type Ref.
class PoolManager; // manage AutoReleasePool stack.
// ShaderHelper: help class for compiling and linking shader programs
class ShaderHelper {
public:
static const ShaderId compileVertexShader(const std::string &shaderSrc);
static const ShaderId compileFragmentShader(const std::string &shaderSrc);
static ProgramId linkProgram(ShaderId vertexShaderId, ShaderId fragShaderId);
private:
static ShaderId compileShader(const std::string &shaderSrc, GLenum shaderType);
};
}
```
# License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
# Blogs about this project
- [【C++ OpenGL ES 2.0编程笔记】4: 纹理贴图-图片叠加效果实现](http://blog.csdn.net/elloop/article/details/50458613)
- [【C++ OpenGL ES 2.0编程笔记】5: mipmap](http://blog.csdn.net/elloop/article/details/50466163)
- [【C++ OpenGL ES 2.0编程笔记】8: 使用VBO和IBO绘制立方体](http://blog.csdn.net/elloop/article/details/50472699)
- [【C++ OpenGL ES 2.0编程笔记】1: OpenGL ES 2.0 渲染管线和EGL](http://blog.csdn.net/elloop/article/details/50480040)
=============================
# 中文文档
这个项目是一个基于OpenGL ES 2.0 API的图形演示程序,编程语言是C++和The OpenGL ES Shading Language. 工程的逻辑架构是模仿cocos2d-x来组织的,main函数在main.cpp里面,其中启动Appdelegate来完成程序的启动。
主要包含的内容有:
## 绘制矩形,圆等简单图形
## 绘制纹理
## Mipmapping
## 3D投影
## 使用缓冲对象:VAO,VBO
## Alpha测试 深度测试
# 关于此项目的一些博客
- [【C++ OpenGL ES 2.0编程笔记】4: 纹理贴图-图片叠加效果实现](http://blog.csdn.net/elloop/article/details/50458613)
- [【C++ OpenGL ES 2.0编程笔记】5: mipmap](http://blog.csdn.net/elloop/article/details/50466163)
- [【C++ OpenGL ES 2.0编程笔记】8: 使用VBO和IBO绘制立方体](http://blog.csdn.net/elloop/article/details/50472699)
- [【C++ OpenGL ES 2.0编程笔记】1: OpenGL ES 2.0 渲染管线和EGL](http://blog.csdn.net/elloop/article/details/50480040)
# [ ] 关键代码解释
```c++
namespace elloop {
class Application; // application abstraction.
class AppDelegate; // derived from Application.
class OpenGLView; // Windows control and OpenGL ES Drawing Context.
class Director; // control the process of rendering.
class Drawable; // things to be rendered.
class Ref; // Object, for reference counting.
class AutoReleasePool; // manage the reference count of pointer to object of type Ref.
class PoolManager; // manage AutoReleasePool stack.
// ShaderHelper: help class for compiling and linking shader programs
class ShaderHelper {
public:
static const ShaderId compileVertexShader(const std::string &shaderSrc);
static const ShaderId compileFragmentShader(const std::string &shaderSrc);
static ProgramId linkProgram(ShaderId vertexShaderId, ShaderId fragShaderId);
private:
static ShaderId compileShader(const std::string &shaderSrc, GLenum shaderType);
};
}
```
# 许可协议
[MIT License](https://opensource.org/licenses/MIT)
近期下载者:
相关文件:
收藏者: