https://github.com/hellokenlee/neneengine
Neta from <NEW GAME!> Sakura Nene's game engine.
https://github.com/hellokenlee/neneengine
direct3d engine3d graphics opengl
Last synced: 3 months ago
JSON representation
Neta from <NEW GAME!> Sakura Nene's game engine.
- Host: GitHub
- URL: https://github.com/hellokenlee/neneengine
- Owner: hellokenlee
- Created: 2016-10-17T13:57:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-03-09T15:34:28.000Z (over 3 years ago)
- Last Synced: 2025-06-30T21:07:19.577Z (3 months ago)
- Topics: direct3d, engine3d, graphics, opengl
- Language: C++
- Homepage: http://newgame-anime.com/
- Size: 103 MB
- Stars: 24
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Nene Engine
#### 我们的游戏引擎 (•̀ᴗ•́)و
- 跨平台渲染 API 抽象层
- 支持 Direct 3D 11 和 OpenGL 4.2+
- 通过面向对象的方法高效创建三维场景_ _ _
**仅需要20行的代码就能构建一个简单的三维场景!**
简单例子:

对应代码:
```cpp
int main() {
// 初始化
Utils::init("Sample1", 800, 600);
// 背景色
Utils::clearColor(0.1f, 0.1f, 0.1f);
// 着色器
#ifdef NENE_DX
auto pShader = Shader::create("Resources/Shaders/HLSL/Texture.hlsl", "Resources/Shaders/HLSL/Texture.hlsl", POSITION_NORMAL_TEXTURE);
#elif NENE_GL
auto pShader = Shader::create("Resources/Shaders/GLSL/Texture.vert", "Resources/Shaders/GLSL/Texture.frag", POSITION_NORMAL_TEXTURE);
#endif
// 摄像机控制
CameraController cc;
// 可绘制对象
auto pShape = Geometry::createCube();
// 主循环
while (!Utils::windowShouldClose()) {
// 处理 IO
Utils::pollEvents();
// 更新摄像机
cc.update();
// 清空颜色和深度缓冲
Utils::clear();
// 绘制
pShape->draw(pShader, cc.getCamera());
// 交换缓冲
Utils::swapBuffers();
}
// 释放资源
Utils::terminate();
//
return 0;
}```