GithubHelp home page GithubHelp logo

zhangjiangen / block-based-terrain-lod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ripper37/block-based-terrain-lod

0.0 0.0 0.0 4.08 MB

Block-based terrain LoD with simple example program.

License: GNU General Public License v2.0

C++ 99.83% C 0.17%

block-based-terrain-lod's Introduction

Project

Simple implementation of loading heightmaps and generating on-the-fly LoD database to efficiently render terrain with different level of detail depending on distance to camera.

Simple doesnt mean its slow. Though building might be faster, to render terrain it uses single OpenGL call glMultiDrawElements() with previously builded data in both VBO and IBO. It also allows for good customization with easy way to change number of levels, size of blocks and how levels for each block is determined.

Heart of the project are files Terrain.h and Terrain.cpp that implements algorithm. Rest is example Application structure with window and context creation.

Demo

Controls

Mouse - look with FlyCamera / FreeCamera
WSAD - move forward/backward/left/right
space - move up
lctrl - move down
lshift - hold to move much faster

Preview

Image

Compiling

Compiler and software

Tested with Code::Blocks 13.12 with MinGW compiler (GCC) (project file for Code::Blocks is included). Tested on platforms: Windows (Windows 7 x64).

Dependencies

  1. GLEW (tested with version 1.10.0)
  2. GLFW3 (tested with version 3.0.4)
  3. GLM (tested with 0.9.5.4, headers only)

Builded libs are included in demo example, however headers for them are not.

License

Feel free to do whatever you want with it, though it would be nice to mention me if my code helps you somehow.

block-based-terrain-lod's People

Contributors

ripper37 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.