Skip to content

[book] From making a window to animating a simple 3D object

License

Notifications You must be signed in to change notification settings

arkenidar/GLES3-SDL2-Demos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLES3+SDL2 Demos

These demos are the incremental examples from Hans de Ruiter's amazing tutorials on OpenGL ES 3.0 and SDL2, check them out here!

Contents

  • Tutorial 1: An empty SDL window with a GLContext
  • Tutorial 2: Draw a single triangle using vertex and fragment shaders
  • Tutorial 3: Draw a texture using SDL Image
  • Tutorial 4: Draw a cube, set up a mvpMatrix using OpenGL Mathematics (GLM)
  • Tutorial 5: Add a single point light source
  • Tutorial 5a: Animate the cube with a rotation

Build Instructions

Tutorial 1:

$ g++ main.cpp `pkg-config --cflags --libs sdl2 glesv2`

Tutorial 2:

$ g++ main.cpp shader.cpp `pkg-config --cflags --libs sdl2 glesv2`

Tutorial 3 onwards:

$ g++ main.cpp shader.cpp texture.cpp `pkg-config --cflags --libs sdl2 SDL2_image glesv2`

Dependencies

  • libsdl2-dev
  • libsdl2-image-dev
  • libglm-dev

Preview

Preview Image

About

[book] From making a window to animating a simple 3D object

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.2%
  • GLSL 5.3%
  • C 4.8%
  • Shell 0.7%