Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

47 Commits

Repository files navigation

Nene Engine

我们的游戏引擎 (•̀ᴗ•́)و

  • 跨平台渲染 API 抽象层
  • 支持 Direct 3D 11 和 OpenGL 4.2+
  • 通过面向对象的方法高效创建三维场景

仅需要20行的代码就能构建一个简单的三维场景!

简单例子:

对应代码:

intmain() {
// 初始化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()) {
// 处理 IOUtils::pollEvents();
// 更新摄像机
cc.update();
// 清空颜色和深度缓冲Utils::clear();
// 绘制
pShape->draw(pShader, cc.getCamera());
// 交换缓冲Utils::swapBuffers();
}
// 释放资源Utils::terminate();
//return0;
}

About

Neta from <NEW GAME!> Sakura Nene's game engine.

Topics

Resources

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages