Skip to content

Basic C++ Framework for games, it wraps the basic GPU interface (Meshes, Textures, Shaders, Application).

Notifications You must be signed in to change notification settings

upf-gti/TJE_Framework

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TJE_Framework

TJE Framework is a C++ layer on top of SDL and OpenGL to help create games or visual applications. It only provides the basic GPU abstraction (Meshes, Textures, Shaders, Application). It has been used for many years in the Videogame's development courses at the Universitat Pompeu Fabra.

It contains the basics to do something nice:

  • Mesh, Texture, Shader and FBO classes
  • Vector2,Vector3,Vector4,Matrix44 and Quaternion classes
  • Meshes have a ray-mesh and sphere-mesh collision method (thanks to library Coldet)
  • Parser to load OBJ, PNG and TGA. Re-stores meshes in binary for faster load.
  • Supports skinned animated meshes using own format (you must use a web tool to convert them).

Installation

Clone and initialize the repository:

git clone --recurse-submodules -j8 https://github.com/upf-gti/TJE_Framework.git

The framework provided is compatible with all operating systems. The steps for each platform are mandatory to be able to build the framework. The mandatory C++ IDEs are the following:

  • MS Visual Studio Community (Windows)
  • XCode (Mac)
  • Visual Studio Code (Linux, optional for other platforms)

Detailed installation information can be seen below.

Windows

MS Visual Studio Community can be downloaded from here. Make sure you select "Desktop Development with C++".

In addition you need to install CMake which can be downloaded from here. Select "Windows x64 Installer" for the last version. Remember to set "Add CMake to PATH" when asked while installing, otherwhise you won't be able to call CMake from the terminal.

Once you have all required open a Windows Terminal, go to the project folder and do this steps:

mkdir build
cd build
cmake ..

This will generate a Visual Studio project inside the folder build/ (.sln) that you can use to compile and debug the framework.

Mac

You need XCode installed in your system (you may need to update MacOS version), Homebrew to install the missing libraries and also CMake.

To install Homebrew open a terminal and run this command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Continue by installing cmake using this command:

brew install cmake

Once you have all required open a MacOS Terminal, go to the project folder and do this steps:

mkdir build && cd build
cmake -G "Xcode" ..

This will generate a XCode project inside the folder build/ that you can use to compile and debug the framework.

If this process leads to cmake errors, run this command an try again:

sudo xcode-select --reset

Linux

Install cmake and needed libraries using this command:

sudo apt install cmake
sudo apt install build-essential
sudo apt install -y libglu1-mesa-dev freeglut3-dev mesa-common-dev libgl1-mesa-dev

Once you have all required open a Linux Terminal, go to the project folder and do this steps:

mkdir build && cd build
cmake ..

This will generate a Makefile inside the folder build/ that you can use to compile framework.

Use make to compile. You can speed-up compilation using more threads with -j(num threads), for example: make -j8.

Visual Studio Code (Linux, optional for other platforms)

After installing all the libs for your platform, if you need a more light weight IDEs which can be used in any platform (included Linux), this is your better option.

Visual Studio Code can be downloaded for each platform here.

Configuring VSCode

After the VSCode and the requirements for each platform are installed (the steps for each platform are mandatory!), the following extensions are needed to work with C++ code:

C/C++
C/C++ Extension Pack
C/C++ Themes
Cmake Tools

Check this link to learn how to debug the framework in Visual Studio Code.

First, open the project folder where the CMakeLists.txt is located, then open the CMake tab on the left, configure and build the project.

About

Basic C++ Framework for games, it wraps the basic GPU interface (Meshes, Textures, Shaders, Application).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.1%
  • C 5.3%
  • Other 1.6%