text: #pragma once
  #include "Module.h"
  #include "Globals.h"
  #include "glmath.h"
  #include "Light.h"
  
  #define MAX_LIGHTS 8
  
  class ModuleRenderer3D : public Module
  {
  public:
  	ModuleRenderer3D(Application* app, bool start_enabled = true);
  	~ModuleRenderer3D();
  
  	bool Init();
  	update_status PreUpdate(float dt);
  	update_status PostUpdate(float dt);
  	bool CleanUp();
  
  	bool Save(nlohmann::json &j) const override;
  	bool Load(nlohmann::json &j) override;
  
  	void OnResize(int width, int height);
  	bool ChangeVSync();
  public:
  
  	Light lights[MAX_LIGHTS];
  	SDL_GLContext context;
  	mat3x3 NormalMatrix;
  	mat4x4 ModelMatrix, ViewMatrix, ProjectionMatrix;
  	bool vsync;
  	bool gl_depth_on = true;
  	bool gl_cull_face_on = true;
  	bool gl_lighting_on = true;
  	bool gl_color_material_on = true;
  	bool gl_texture_2D_on = true;
  	bool gl_smooth_line_on = true;
  	bool gl_hard_on = true;
  	bool gl_wireframe_on = false;	
  };