Skip to content

bobbyzhu/fury3d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fury3D

Introduction

Fury3d is a cross-platform rendering engine written in c++11 and modern opengl.

Works on windows && osx operating systems currentlly.

Please note, this is just a simple project for study purpose.

Features:

  • Use modern opengl.

  • C++11 smart pointers made memory management easier.

  • Support fbx model format, you can load static models and lights directlly.

  • Easy rendering pipeline management through json serialization functionality.

  • Build-in light-pre pass rendering pipeling.

Plans:

  • Add shadow maps.

  • Add skeleton animation support.

Compatibility

Tested compilers:

  • MSVC 2013 Community

  • Apple LLVM version 7.0.2 (clang-700.1.81)

Because fbxsdk only offers MSVC builds on windows, so you must use MSVC to build the library.

Should work with any graphic card that supports opengl 3.3 +

Example

You can setup custom rendering pipeline using json file:

{
    "textures": [
        {
            "name": "gbuffer_diffuse",
            "format": "rgba8",
            "filter": "linear",
            "wrap": "repeat",
            "width": 1280,
            "height": 720,
            "mipmap": false
        },
	], 
	"shaders": [
        {
            "name": "dirlight_shader",
            "type": "dir_light",
            "path": "Resource/Shader/SunLight.glsl"
        },
	], 
	"passes": [
        {
            "name": "pass_gbuffer",
            "camera": "camNode",
            "shaders": [
                "gbuffer_shader",
                "gbuffer_notexture_shader"
            ],
            "input": [],
            "output": [
                "depth_buffer",
                "gbuffer_normal",
                "gbuffer_depth",
                "gbuffer_diffuse"
            ],
            "index": 0,
            "blendMode": "replace",
            "compareMode": "less",
            "cullMode": "back",
            "drawMode": "renderable"
        },
	]
}

A simple demo should look like this:

// load scene
SceneNode::Ptr m_RootNode = SceneNode::Create("Root");
// Use FileUtil::GetAbsPath to get absolute file path on osx.
FbxUtil::Instance()->LoadScene(FileUtil::Instance()->GetAbsPath("Path to fbx"), m_RootNode);

// setup octree
OcTree::Ptr m_OcTree = OcTree::Create(Vector4(-10000, -10000, -10000, 1), Vector4(10000, 10000, 10000, 1), 2);
m_OcTree->AddSceneNodeRecursively(m_RootNode);

// Load pipeline
PrelightPipeline::Ptr m_Pipeline = PrelightPipeline::Create("pipeline");
FileUtil::Instance()->LoadFromFile(m_Pipeline, FileUtil::Instance()->GetAbsPath("Path To Pipeline.json"));

// draw scene
m_Pipeline->Execute(m_OcTree);

Special thanks

One more thing

If you use sublimetext, you can try my GLSLCompiler plugin to debug glsl code :D

About

A simple but modern graphic engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.3%
  • Other 0.7%