Skip to content

edin-m/gamedev-bvh-loader-article

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BVH File Loading and Displaying (codebase)

http://www.gamedev.net/page/resources/_/technical/game-programming/bvh-file-loading-and-displaying-r3295

Licence

  1. I do not claim to own anything in data/* folders.
  2. Code in test1/** is under GPL2 unless said otherwise in files (only bvh.cpp and bvh.h are exception)

Description

!!!!!!!!!!!!

This is Linux-only. To check out cross-platform version, use https://github.com/edin-m/gamedev-articles under projects/bvh-loader.

!!!!!!!!!!!!

Project is located under test1 folder (creative, I know). It is only supported on X11 (which means Linux). It would be good to port it with GLFW to multiplatform.

Project features creating OpenGL 3+ context on X11 system, bvh file loading and playing and using Vertex Array Objects (VAO) for rendering by GPU. It also features reusable shader class that is put to only basic use here. But can be used for various things.

It's main function is to load bvh file and display it and play it. Paths are hardcoded and shortcuts are:

  • Arrows left right up and down move camera
  • b plays backwards
  • c plays forwards
  • v stops playback
  • n frame forward
  • x frame backward

Setup dependencies

git submodule init lib/glm
git submodule update lib/glm

git submodule init lib/glew
git submodule update lib/glew

git submodule init lib/glfw
git submodule update lib/glfw

cd /.../lib/glew/auto
make

cd /.../lib/glew
make

cd /.../lib/glfw
cmake .

Windows

Setup:

  • cmake
  • msys & git
  • Visual studio (ex. 2015 express)
GLFW
$ cd lib/glfw
$ cmake -G "Visual Studio 14 2015" .

Open visual studio project lib/glfw/GLFW.sln or lib/glfw/src/Project.sln and build Relase and Debug version which will be in lib/gflw/src/[Debug|Release] path

GLEW

For GLEW it is best to download binaries from official site. They are included in lib/glew-1.13.0 but it is fixed version. You may want to change that.

Dependencies

You will need:

  • linux (check that graphics work with glxgears)
  • GLEW (see below for location)
  • qmake (comes with qt sdk and qt creator)
  • glm (this is included in the repo include/ folder since it is header only library)

qmake uses test1.pro to load and link libraries - only dependency being GLEW which expects to find it in REPO_ROOT/lib/glew-1.10.0/glew-1.10.0/lib. This can be changed in test1.pro

Of other dependencies you need to have normal build toolchain, libpthread dev, and gcc should support flags -std=c++11 -std=gnu++11 which is for any recent gcc no problem.

About

Repo for storing gamedev article(s) code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published