OpenGL made easy.

Related tags

Graphics SmartGL
Overview

SmartGL

OpenGL made easy.

Demo video: https://youtu.be/zDuNxg4LJ18 (sorry for low-quality recording)

For an example of how my engine is used, please read through the demo.cpp file for the demo video's source code.

Contact me: [email protected]

About SmartGL

What the hell is this?

SmartGL is at its core two things: (1) a collection of object-oriented wrappers around OpenGL objects designed to boost productivity and ease of programming while working with OpenGL, and (2) a graphics engine designed primarily with the goal of making video games. No one likes having to write acres of OpenGL API calls for the most simple tasks or carefully look up OpenGL functions one at a time in the spec. My object-oriented wrappers were made to preserve all the fun and power of OpenGL programming while eliminating all the boring and tedious stuff. Some features include:

  • Classes for every type of commonly used texture with support for (pretty much) every data type.
  • Easy interface for loading shaders and creating programs.
  • Classes that provide an easy interface for setting a program's uniforms and keeping them all bundled in one place. In particular, uniform buffers with an std140 layout can be updated automatically without the user having to perform meticulous alignment calculations. This one was truly a game-changer for me.
  • My own math library. You can think of it as a slightly worse, less extensive version of the popular GLM library. But it's single-header and still gets the job done. (If you want to have nightmares tonight, go look at the source code for "util/GL-math.hpp"!)

The graphics engine is what I spent the bulk of my time on, and includes the following features:

  • Loading of models from pretty much any format.
  • Support for animated and PBR models.
  • Custom model format that minimizes loading times.
  • Custom PBR shaders that are generated on the fly for any type of model that is being rendered.
  • Integration of background skyboxes into a PBR scene.
  • Overhead and point-light shadows.
  • Integration of Bullet physics.
  • A relatively easy-to-use interface.

Ok cool, but like, why would I ever use this? Why not just use Unity or something?

Great question, my imaginary friend! Honestly, no reason -- you're most likely better off using Unity. This was just kind of a passion project for me. I personally like having full control over the GPU and I take pride in knowing that the games I develop are running off of code that is entirely my own. But if your goal is to maximize your game development productivity, probably go with a more well-established game engine. But just in case you would ever want to use a small, compact, quirky game engine made by a passionate developer, you now have the option to do so.

How can I learn more about the engine and how to use it?

I want to add Doxygen comments to all my code eventually, but for now, there is no documentation. Your best bet is to look through the "demo.cpp" file and read the comments/ try to understand the code. It's pretty simple and probably covers most common use cases. You can also look at the source code for each file; I organized the headers so that the class declarations are always at the top of the file for reference. If you have any additional pressing questions, you can email me (see top).

How would I go about including my library/ building the demo?

Including the library is easy enough, but you'll need to also include all of its dependencies. This is hard, and you can expect to spend a couple days getting it up and running. See the bottom for a list of dependencies. Also note that SmartGL does not internally use any window system or OpenGL function loading library, so you'll have to provide libraries for these utilities yourself (I use the combination GLEW/GLFW).

Not that I care, but can you tell me a little bit about yourself?

Well that's a little rude, but sure. At the time of writing this, I'm a 20 year old college student going into his junior year. I've been coding and making games as a hobby since middle school, and now I'm a math/CS major. Programming is probably the most important thing in my life at the moment. I spend most of my free time programming and it allows me to express myself on a level that I would never be able to in everyday life. This project of mine has become an important part of my identity and I've poured my heart into this engine for the last eight months. I'm posting it here in the hopes that someone may find it useful one day or at the very least appreciate the work that I've put into it. I also love playing guitar, listening to music, playing Rocket League, and hiking.

Okay that was honestly really sappy. Also, why are you having a conversation with an imaginary person? Don't you have a life?

No comment.

List of dependencies:

  • The stb_image library (single-header).
  • Bullet physics (only required if physics models are used).
  • Assimp (required to convert models into SmartGL's custom format, but you can write a separate program to do this so that you don't need Assimp to build your main game's executable).
Owner
Coolest guy ever.
null
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

GLFW Introduction GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platf

GLFW 9.4k Aug 6, 2022
A legacy OpenGL simulator for OpenGL 4.4, written in C++.

the-ancient-tri A legacy OpenGL simulator for OpenGL 4.4, written in C++. Why? My Uni forces us to use legacy OpenGL (eww!), and I didn't want to lear

Mohammad Issawi 4 Feb 10, 2022
This is a openGL cube demo program. It was made as a tech demo using PVR_PSP2 Driver layer GPU libraries.

OpenGL Cube Demo using PVR_PSP2 Driver layer GPU libraries This is a openGL cube demo program. It was made as a tech demo using PVR_PSP2 Driver layer

David Cantu 5 Oct 31, 2021
A simple mirror simulator made with OpenGL 3.3 and C++

Mirror-Example A simple mirror example using OpenGL 3.3 with C++. Theory It basically constructs a camera at the mirror location, by determining its v

Mohammad Issawi 4 Feb 10, 2022
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.4k Aug 1, 2022
Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.

This project is not actively maintained. NanoVG NanoVG is small antialiased vector graphics rendering library for OpenGL. It has lean API modeled afte

Mikko Mononen 4.4k Jul 31, 2022
Epoxy is a library for handling OpenGL function pointer management for you

Epoxy is a library for handling OpenGL function pointer management for you. It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(), eglGetP

Eric Anholt 551 Jul 29, 2022
3D engine from scratch (without OpenGL or any other 3D graphics library)

Simple 3d engine based on SFML library. I tried to make this engine powerful and easy to understand.

Vectozavr 42 Jul 28, 2022
RGL - 3D visualization device system for R using OpenGL

RGL - 3D visualization device system for R using OpenGL INTRODUCTION The RGL package is a visualization device system for R, using OpenGL or WebGL as

null 59 Jul 27, 2022
OpenGL Demo: Simulating Ocean Waves with FFT

OceanFFT Realistic ocean wave simulation, primarily based on J. Tessendorf's paper, using OpenGL compute shaders. Checkout the demo video here. In the

Achal Pandey 60 Jul 12, 2022
OBS Linux Vulkan/OpenGL game capture

OBS Linux Vulkan/OpenGL game capture OBS plugin for Vulkan/OpenGL game capture on Linux. Requires OBS with EGL support (currently unreleased, you need

David Rosca 214 Aug 3, 2022
NodeEditor basiced on Qt and OpenGL/CV

Vapour 基于Qt的轻量级的节点式几何建模工具与shader材质生成工具 可能加入图像处理(合成)的功能 日志: 2021-5-17: 完成背景绘制,右键菜单,节点连线,节点删除,初步拓扑排序 (细节)连线位于节点层级之下,使用lambda处理右键菜单slot,节点创建生成在鼠标位置处 2021

Cuimi 16 Jul 17, 2022
C Wavefront OBJ loader for OpenGL

OBJ GL Loader v2 Quite fast .OBJ loader written in C How to use it Put objgl2.c and objgl2.h files in Your project and include them. To put it simply:

null 7 Jul 29, 2022
Orbit is a multiplatform-focus graphical engine build on top of OpenGl, ImGui

Orbit Engine Orbit is a multiplatform-focus graphical engine build on top of OpenGl, ImGui and more... The development of the engine is documented via

Madsycode 11 Jul 3, 2021
Axel Gneiting 1.4k Jul 25, 2022
A 2d Graphing Calculator using OpenGL

glGraph A 2d Graphing Calculator using Modern OpenGL Demo glGraph.mp4 Information This has only been tested on Fedora 34, it should work on other OS's

Nathan Medros 16 Apr 19, 2022
Tetris written with C++ and OpenGL.

Tetrec This is yet another Tetris game, which is in 3D, written using C++ and OpenGL 2.1, aiming at being lightweight towards not-so-beefy computers (

Lê Duy Quang 14 Jan 17, 2022
A simple single point light shadow mapping with OpenGL 3.3 and C++

omni-directional-light-example Using OpenGL 3.3 with C++ Basically a single light map, no lighting model was used Usage Build the executable outside A

Mohammad Issawi 4 Feb 10, 2022
3D Procedural Terrain Generation Tool in OpenGL/C++

TerraGen3D 3D Procedural Terrain Generation Tool in OpenGL/C++ Give your valuable feedback : https://github.com/Jaysmito101/TerraGen3D/discussions/6 T

Jaysmito Mukherjee 594 Jul 24, 2022