first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,72 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NRENDERERENVINTERFACE__
#define __NRENDERERENVINTERFACE__
#include "core/render_data.h"
#include "color/color.h"
#include "container/nlist.h"
namespace GS {
struct Vector4;
class Frustum;
namespace Core {
class Camera;
class Light;
}
namespace Render {
/*
@short Renderer environment interface.
Used by the renderer to communicate events and query environment informations.
*/
struct IEnvironment
{
/// Get environment clock.
virtual float GetClock() const { return 0; }
/// Get environment time of day.
virtual float GetTimeOfDay() const { return 0.f; }
/// Get user sky box shader.
virtual Shader *GetSkyboxShader() const { return 0; }
/// Get sky box texture layers.
virtual bool GetSkyboxLayers(sTexture [2]) const { return false; }
/// Get clear color.
virtual Color GetClearColor() const { return Color::Black; }
/// Get ambient color.
virtual Color GetAmbientColor() const { return Color::Black; }
/// Get environment probe.
virtual void GetEnvironmentProbe(sTexture &/*radiance*/, sTexture &/*irradiance*/) const {}
/// Get current camera.
virtual Core::Camera *GetCurrentCamera() const { return 0; }
/// Get all lights in frustum.
virtual void GetLightsInFrustum(const Vector4 &/*world_pos*/, const Frustum &/*frustum*/, List <Core::Light *> &/*list*/, uint /*limit*/ = 0) const = 0;
/// Get closest lights.
virtual void GetClosestLights(const Vector4 &/*world_pos*/, List <Core::Light *> &/*list*/, uint /*limit*/ = 0) const = 0;
/// Get fog enabled.
virtual bool IsFogEnabled() const { return false; }
/// Get fog configuration.
virtual bool GetFogConfiguration(Color &color, float &fog_near, float &fog_far) const { return false; }
/// Render user/debug primitive hook.
virtual void OnRenderUser(Renderer *) const {}
virtual ~IEnvironment() {}
};
} // Render
} // GS
#endif // __NRENDERERENVINTERFACE__