/Helios

C++ game engine in OpenGL

Primary LanguageC++

opengl-game-engine

Current project state

Installing dependencies

Linux

GLEW

sudo apt install libglew-dev libglm-dev libglfw3-dev libassimp-dev

Windows

GLEW, glm, GLFW3

provided statically

Assimp

dll should finally be in the same directory as an executable

Useful

Point light attenuation

Materials

http://devernay.free.fr/cours/opengl/materials.html

What I've learned

Textures

When creating a texture you don't bind it to any particular texture unit

You do it when you actually wanna use it

Texture unit indexing

GL_TEXTURE0 is not 0 And because of that you set sampler2D like that

setInt("texture_sampler", 2); // don't use GL_TEXTURE0 + 2 here!!
glActiveTexture(GL_TEXTURE0 + 2);
glBindTexture(GL_TEXTURE_2D, texture);