Missing Member Declarations

You call shadowFBO, shadowMap, depthShader, and lightSpaceMatrix in Initialize() but never declared them in Engine.h.

Solution: add these as GLuint shadowFBO; GLuint shadowMap; Shader depthShader; glm::mat4 lightSpaceMatrix; and static constexpr int SHADOW_RES = 2048; to the Engine class.

Local vs. Class Constant

You define a local const unsigned int SHADOW_RES = 2048; inside Initialize(), but elsewhere refer to SHADOW_RES as a class‐wide constant.

Solution: remove the local definition and use the class member Engine::SHADOW_RES.

Undefined Shader Source and Wrapper

You call depthShader = Shader(depthVertexSrc, depthFragmentSrc); yet never provided the depthVertexSrc or depthFragmentSrc strings or a Shader wrapper class.

Solution: supply the depth‐only shader source code and ensure a Shader class with a .use() and .setMat4() interface is implemented.

Viewport and Buffer Binding Order

In Initialize(), you configure the FBO before completing the context and shader setup. Make sure the GL context is fully initialized (GLAD, GLFW) before creating textures and framebuffers.

Typo in Texture Format

You used glTexImage2D(..., GL_DEPTH_COMPONENT, ...) without specifying the internal format as GL_DEPTH_COMPONENT24. Some drivers require the full form.

Solution: use glTexImage2D(..., GL_DEPTH_COMPONENT24, ...) for consistent behavior.

Missing Light Position Initialization

You reference lightPos when computing lightSpaceMatrix but never initialized it.

Solution: define a glm::vec3 lightPos member, set it before calculating lightSpaceMatrix.

Addressing these five areas will clear up the undeclared‐identifier errors and establish a working shadow‐mapping pipeline.
