summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
08d0a9f)
Explicitly passing the Resources reference causes problems when some
classes in a hierarchy need it and others don't. It's also awkward in
RenderPass::set_material and PostProcessor templates. It doesn't even
matter which instance is passed in since the data is builtin anyway.
The first created Resources instance is now registered as the one to use
for builtin data, unless suppressed by a constructor parameter.
25 files changed:
keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &DesertPillars::key_press), false));
const GL::Light &sun = resources.get<GL::Light>("Sun.light");
keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &DesertPillars::key_press), false));
const GL::Light &sun = resources.get<GL::Light>("Sun.light");
- sky = make_unique<GL::Sky>(resources, content, sun);
+ sky = make_unique<GL::Sky>(content, sun);
unsigned shadow_size = 8192;
shadow_seq = make_unique<GL::Sequence>(shadow_size, shadow_size);
GL::Sequence::Step *step = &shadow_seq->add_step("shadow", content);
step->set_depth_test(&GL::DepthTest::lequal());
unsigned shadow_size = 8192;
shadow_seq = make_unique<GL::Sequence>(shadow_size, shadow_size);
GL::Sequence::Step *step = &shadow_seq->add_step("shadow", content);
step->set_depth_test(&GL::DepthTest::lequal());
- shadow_map = make_unique<GL::ShadowMap>(resources, shadow_size, *sky, sun, *shadow_seq);
+ shadow_map = make_unique<GL::ShadowMap>(shadow_size, *sky, sun, *shadow_seq);
shadow_map->set_darkness(0.9f);
shadow_map->set_target(GL::Vector3(0.0f, 0.0f, 0.0f), 20.0f);
shadow_map->set_darkness(0.9f);
shadow_map->set_target(GL::Vector3(0.0f, 0.0f, 0.0f), 20.0f);
step->set_lighting(&resources.get<GL::Lighting>("Desert.lightn"));
step->set_depth_test(&GL::DepthTest::lequal());
step->set_lighting(&resources.get<GL::Lighting>("Desert.lightn"));
step->set_depth_test(&GL::DepthTest::lequal());
- env_map = make_unique<GL::EnvironmentMap>(resources, 256, GL::RGB16F, sphere, *env_seq);
+ env_map = make_unique<GL::EnvironmentMap>(256, GL::RGB16F, sphere, *env_seq);
sphere.set_matrix(GL::Matrix::translation(GL::Vector3(0.0f, 0.0f, 3.3f)));
content.add(resources.get<GL::Scene>("Background.scene"));
sphere.set_matrix(GL::Matrix::translation(GL::Vector3(0.0f, 0.0f, 3.3f)));
content.add(resources.get<GL::Scene>("Background.scene"));
sequence.add_postprocessor(*proc);
else if(i->postprocessor_template)
{
sequence.add_postprocessor(*proc);
else if(i->postprocessor_template)
{
- proc = i->postprocessor_template->create(tmpl.get_resources(), sequence.get_width(), sequence.get_height());
+ proc = i->postprocessor_template->create(sequence.get_width(), sequence.get_height());
if(proc)
sequence.add_postprocessor_owned(proc);
}
if(proc)
sequence.add_postprocessor_owned(proc);
}
namespace GL {
SequenceTemplate::SequenceTemplate():
namespace GL {
SequenceTemplate::SequenceTemplate():
hdr(false),
alpha(false),
required_multisample(0),
hdr(false),
alpha(false),
required_multisample(0),
delete i->postprocessor_template;
}
delete i->postprocessor_template;
}
-Resources &SequenceTemplate::get_resources() const
-{
- if(!resources)
- throw logic_error("no resources");
- return *resources;
-}
-
SequenceTemplate::PostProcessorRegistry &SequenceTemplate::get_postprocessor_registry()
{
SequenceTemplate::PostProcessorRegistry &SequenceTemplate::get_postprocessor_registry()
{
// Deprecated
add("pass", &Loader::step_with_slot);
// Deprecated
add("pass", &Loader::step_with_slot);
}
void SequenceTemplate::Loader::postprocessor_loaded()
}
void SequenceTemplate::Loader::postprocessor_loaded()
private:
typedef TypeRegistry<PostProcLoader::AddPostProc, PostProcLoader &> PostProcessorRegistry;
private:
typedef TypeRegistry<PostProcLoader::AddPostProc, PostProcLoader &> PostProcessorRegistry;
bool hdr;
bool alpha;
unsigned required_multisample;
bool hdr;
bool alpha;
unsigned required_multisample;
SequenceTemplate();
~SequenceTemplate();
SequenceTemplate();
~SequenceTemplate();
- Resources &get_resources() const;
bool get_hdr() const { return hdr; }
bool get_alpha() const { return alpha; }
unsigned get_required_multisample() const { return required_multisample; }
bool get_hdr() const { return hdr; }
bool get_alpha() const { return alpha; }
unsigned get_required_multisample() const { return required_multisample; }
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-AmbientOcclusion::AmbientOcclusion(Resources &resources, unsigned w, unsigned h, float):
+AmbientOcclusion::AmbientOcclusion(unsigned w, unsigned h, float):
occlude_target(w, h, (RENDER_COLOR,R8)),
occlude_target(w, h, (RENDER_COLOR,R8)),
- occlude_shader(resources.get<Program>("_ambientocclusion_occlude.glsl.shader")),
- combine_shader(resources.get<Program>("_ambientocclusion_combine.glsl.shader")),
- quad(resources.get<Mesh>("_fullscreen_quad.mesh")),
- linear_sampler(resources.get<Sampler>("_linear_clamp.samp")),
- nearest_sampler(resources.get<Sampler>("_nearest_clamp.samp"))
+ occlude_shader(Resources::get_global().get<Program>("_ambientocclusion_occlude.glsl.shader")),
+ combine_shader(Resources::get_global().get<Program>("_ambientocclusion_combine.glsl.shader")),
+ quad(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
+ linear_sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp")),
+ nearest_sampler(Resources::get_global().get<Sampler>("_nearest_clamp.samp"))
{
unsigned seed = 1;
rotate_lookup.storage(RGBA8, 4, 4, 1);
{
unsigned seed = 1;
rotate_lookup.storage(RGBA8, 4, 4, 1);
edge_depth_threshold(0.1f)
{ }
edge_depth_threshold(0.1f)
{ }
-AmbientOcclusion *AmbientOcclusion::Template::create(Resources &res, unsigned width, unsigned height) const
+AmbientOcclusion *AmbientOcclusion::Template::create(unsigned width, unsigned height) const
- RefPtr<AmbientOcclusion> ao = new AmbientOcclusion(res, width/size_divisor, height/size_divisor);
+ RefPtr<AmbientOcclusion> ao = new AmbientOcclusion(width/size_divisor, height/size_divisor);
ao->set_n_samples(n_samples);
ao->set_occlusion_radius(occlusion_radius);
ao->set_darkness(darkness);
ao->set_n_samples(n_samples);
ao->set_occlusion_radius(occlusion_radius);
ao->set_darkness(darkness);
- virtual AmbientOcclusion *create(Resources &, unsigned, unsigned) const;
+ virtual AmbientOcclusion *create(unsigned, unsigned) const;
const Sampler &nearest_sampler;
public:
const Sampler &nearest_sampler;
public:
- AmbientOcclusion(Resources &, unsigned, unsigned, float = 1.0f);
+ AmbientOcclusion(unsigned, unsigned, float = 1.0f);
private:
static float random(unsigned &);
private:
static float random(unsigned &);
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-Bloom::Bloom(Resources &resources, unsigned w, unsigned h):
- blur_shader(resources.get<Program>("_bloom_blur.glsl.shader")),
- combine_shader(resources.get<Program>("_bloom_combine.glsl.shader")),
- quad(resources.get<Mesh>("_fullscreen_quad.mesh")),
- nearest_sampler(resources.get<Sampler>("_nearest_clamp.samp")),
- linear_sampler(resources.get<Sampler>("_linear_clamp.samp"))
+Bloom::Bloom(unsigned w, unsigned h):
+ blur_shader(Resources::get_global().get<Program>("_bloom_blur.glsl.shader")),
+ combine_shader(Resources::get_global().get<Program>("_bloom_combine.glsl.shader")),
+ quad(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
+ nearest_sampler(Resources::get_global().get<Sampler>("_nearest_clamp.samp")),
+ linear_sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp"))
{
blur_shdata[0].uniform("delta", 1.0f/w, 0.0f);
blur_shdata[1].uniform("delta", 0.0f, 1.0f/h);
{
blur_shdata[0].uniform("delta", 1.0f/w, 0.0f);
blur_shdata[1].uniform("delta", 0.0f, 1.0f/h);
-Bloom *Bloom::Template::create(Resources &res, unsigned width, unsigned height) const
+Bloom *Bloom::Template::create(unsigned width, unsigned height) const
- RefPtr<Bloom> bloom = new Bloom(res, width/size_divisor, height/size_divisor);
+ RefPtr<Bloom> bloom = new Bloom(width/size_divisor, height/size_divisor);
bloom->set_radius(radius);
bloom->set_strength(strength);
return bloom.release();
bloom->set_radius(radius);
bloom->set_strength(strength);
return bloom.release();
- virtual Bloom *create(Resources &, unsigned, unsigned) const;
+ virtual Bloom *create(unsigned, unsigned) const;
const Sampler &linear_sampler;
public:
const Sampler &linear_sampler;
public:
- Bloom(Resources &, unsigned, unsigned);
+ Bloom(unsigned, unsigned);
~Bloom();
/** Sets the σ value of the gaussian blur. Values much larger than 4.0 are
~Bloom();
/** Sets the σ value of the gaussian blur. Values much larger than 4.0 are
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-ColorCurve::ColorCurve(Resources &resources):
- shprog(resources.get<Program>("_colorcurve.glsl.shader")),
- quad(resources.get<Mesh>("_fullscreen_quad.mesh")),
- linear_sampler(resources.get<Sampler>("_linear_clamp.samp")),
- nearest_sampler(resources.get<Sampler>("_nearest_clamp.samp"))
+ColorCurve::ColorCurve():
+ shprog(Resources::get_global().get<Program>("_colorcurve.glsl.shader")),
+ quad(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
+ linear_sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp")),
+ nearest_sampler(Resources::get_global().get<Sampler>("_nearest_clamp.samp"))
{
curve.storage(LUMINANCE8, 256, 1);
{
curve.storage(LUMINANCE8, 256, 1);
-ColorCurve *ColorCurve::Template::create(Resources &res, unsigned, unsigned) const
+ColorCurve *ColorCurve::Template::create(unsigned, unsigned) const
- RefPtr<ColorCurve> colorcurve = new ColorCurve(res);
+ RefPtr<ColorCurve> colorcurve = new ColorCurve();
colorcurve->set_exposure_adjust(exposure_adjust);
colorcurve->set_brightness_response(brightness_response);
if(srgb)
colorcurve->set_exposure_adjust(exposure_adjust);
colorcurve->set_brightness_response(brightness_response);
if(srgb)
- virtual ColorCurve *create(Resources &, unsigned, unsigned) const;
+ virtual ColorCurve *create(unsigned, unsigned) const;
const Sampler &nearest_sampler;
public:
const Sampler &nearest_sampler;
public:
- ColorCurve(Resources &);
/** Set exposure adjustment in EV units. Positive values brighten the
image, negative values darken it. Zero is neutral. */
/** Set exposure adjustment in EV units. Positive values brighten the
image, negative values darken it. Zero is neutral. */
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-EnvironmentMap::EnvironmentMap(Resources &resources, unsigned s, Renderable &r, Renderable &e):
+EnvironmentMap::EnvironmentMap(unsigned s, Renderable &r, Renderable &e):
Effect(r),
environment(e),
Effect(r),
environment(e),
- sampler(resources.get<Sampler>("_linear_clamp.samp"))
+ sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp"))
-EnvironmentMap::EnvironmentMap(Resources &resources, unsigned s, PixelFormat f, Renderable &r, Renderable &e):
+EnvironmentMap::EnvironmentMap(unsigned s, PixelFormat f, Renderable &r, Renderable &e):
Effect(r),
environment(e),
Effect(r),
environment(e),
- sampler(resources.get<Sampler>("_linear_clamp.samp"))
+ sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp"))
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
/**
Creates a cube map texture of the surroundings of the renderable. This texture
can then be used to implement effects such as reflections or refractions.
/**
Creates a cube map texture of the surroundings of the renderable. This texture
can then be used to implement effects such as reflections or refractions.
unsigned update_delay;
public:
unsigned update_delay;
public:
- EnvironmentMap(Resources &, unsigned size, Renderable &rend, Renderable &env);
- EnvironmentMap(Resources &, unsigned size, PixelFormat, Renderable &rend, Renderable &env);
+ EnvironmentMap(unsigned size, Renderable &rend, Renderable &env);
+ EnvironmentMap(unsigned size, PixelFormat, Renderable &rend, Renderable &env);
private:
void init(unsigned, PixelFormat);
private:
void init(unsigned, PixelFormat);
class Mesh;
class Renderer;
class Mesh;
class Renderer;
class Sampler;
class Shader;
class Texture2D;
class Sampler;
class Shader;
class Texture2D;
Template();
virtual ~Template() { }
Template();
virtual ~Template() { }
- virtual PostProcessor *create(Resources &, unsigned, unsigned) const = 0;
+ virtual PostProcessor *create(unsigned, unsigned) const = 0;
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-ShadowMap::ShadowMap(Resources &resources, unsigned s, Renderable &r, const Light &l, Renderable &c):
+ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l, Renderable &c):
Effect(r),
light(l),
shadow_caster(c),
Effect(r),
light(l),
shadow_caster(c),
- sampler(resources.get<Sampler>("_linear_clamp_shadow.samp"))
+ sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
-ShadowMap::ShadowMap(Resources &resources, unsigned s, Renderable &r, const Light &l):
+ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l):
Effect(r),
light(l),
shadow_caster(r),
Effect(r),
light(l),
shadow_caster(r),
- sampler(resources.get<Sampler>("_linear_clamp_shadow.samp"))
+ sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
- ShadowMap(Resources &, unsigned, Renderable &, const Light &, Renderable &);
- DEPRECATED ShadowMap(Resources &, unsigned, Renderable &, const Light &);
+ ShadowMap(unsigned, Renderable &, const Light &, Renderable &);
+ DEPRECATED ShadowMap(unsigned, Renderable &, const Light &);
private:
void init(unsigned);
private:
void init(unsigned);
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-Sky::Sky(Resources &resources, Renderable &r, const Light &s):
+Sky::Sky(Renderable &r, const Light &s):
Effect(r),
sun(s),
transmittance_lookup(128, 64, (RENDER_COLOR, RGB16F)),
Effect(r),
sun(s),
transmittance_lookup(128, 64, (RENDER_COLOR, RGB16F)),
- transmittance_shprog(resources.get<Program>("_sky_transmittance.glsl.shader")),
+ transmittance_shprog(Resources::get_global().get<Program>("_sky_transmittance.glsl.shader")),
transmittance_lookup_dirty(true),
distant(256, 128, (RENDER_COLOR, RGB16F)),
transmittance_lookup_dirty(true),
distant(256, 128, (RENDER_COLOR, RGB16F)),
- distant_shprog(resources.get<Program>("_sky_distant.glsl.shader")),
- fullscreen_mesh(resources.get<Mesh>("_fullscreen_quad.mesh")),
- backdrop_shprog(resources.get<Program>("_sky_backdrop.glsl.shader")),
- sampler(resources.get<Sampler>("_linear_clamp.samp")),
- wrap_sampler(resources.get<Sampler>("_linear_clamp_v.samp")),
+ distant_shprog(Resources::get_global().get<Program>("_sky_distant.glsl.shader")),
+ fullscreen_mesh(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
+ backdrop_shprog(Resources::get_global().get<Program>("_sky_backdrop.glsl.shader")),
+ sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp")),
+ wrap_sampler(Resources::get_global().get<Sampler>("_linear_clamp_v.samp")),
rendered(false)
{
shdata.uniform("n_steps", 50);
rendered(false)
{
shdata.uniform("n_steps", 50);
- Sky(Resources &, Renderable &, const Light &);
+ Sky(Renderable &, const Light &);
void set_planet(const Planet &);
void set_view_height(float);
void set_planet(const Planet &);
void set_view_height(float);
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-const Program *Material::create_compatible_shader(DataFile::Collection &coll, const map<string, int> &extra_spec) const
+const Program *Material::create_compatible_shader(const map<string, int> &extra_spec) const
{
string module_name;
map<string, int> spec_values;
{
string module_name;
map<string, int> spec_values;
for(map<string, int>::const_iterator i=spec_values.begin(); i!=spec_values.end(); ++i)
info += format(",%s:%d", i->first, i->second);
for(map<string, int>::const_iterator i=spec_values.begin(); i!=spec_values.end(); ++i)
info += format(",%s:%d", i->first, i->second);
+ Resources &res = Resources::get_global();
string name = format("_material_%016x.shader", hash64(info));
string name = format("_material_%016x.shader", hash64(info));
- Program *shprog = coll.find<Program>(name);
+ Program *shprog = res.find<Program>(name);
if(shprog)
return shprog;
if(shprog)
return shprog;
- const Module &module = coll.get<Module>(module_name);
+ const Module &module = res.get<Module>(module_name);
shprog = new Program(module, spec_values);
try
{
shprog = new Program(module, spec_values);
try
{
- coll.add(name, shprog);
public:
virtual ~Material() { }
public:
virtual ~Material() { }
- virtual const Program *create_compatible_shader(DataFile::Collection &, const std::map<std::string, int> & = std::map<std::string, int>()) const;
+ virtual const Program *create_compatible_shader(const std::map<std::string, int> & = std::map<std::string, int>()) const;
protected:
virtual void fill_program_info(std::string &, std::map<std::string, int> &) const = 0;
protected:
virtual void fill_program_info(std::string &, std::map<std::string, int> &) const = 0;
set_texture(*tag, material->get_texture(*tag), material->get_sampler());
}
set_texture(*tag, material->get_texture(*tag), material->get_sampler());
}
-void RenderPass::maybe_create_material_shader(DataFile::Collection *coll)
+void RenderPass::maybe_create_material_shader()
{
if(shprog && !shprog_from_material)
return;
{
if(shprog && !shprog_from_material)
return;
if(receive_shadows)
extra_spec["use_shadow_map"] = true;
if(receive_shadows)
extra_spec["use_shadow_map"] = true;
- if(coll)
- {
- shprog = material->create_compatible_shader(*coll, extra_spec);
- shprog.keep();
- }
- else
- throw invalid_operation("RenderPass::maybe_create_material_shader");
+ shprog = material->create_compatible_shader(extra_spec);
if(shdata)
shdata = new ProgramData(*shdata, shprog.get());
if(shdata)
shdata = new ProgramData(*shdata, shprog.get());
-void RenderPass::set_material(const Material *mat, DataFile::Collection *coll)
+void RenderPass::set_material(const Material *mat)
{
material = mat;
material.keep();
{
material = mat;
material.keep();
- maybe_create_material_shader(coll);
+ maybe_create_material_shader();
set_material_textures();
}
set_material_textures();
}
void RenderPass::Loader::finish()
{
if(obj.material)
void RenderPass::Loader::finish()
{
if(obj.material)
- obj.maybe_create_material_shader(coll);
+ obj.maybe_create_material_shader();
}
// Temporary compatibility feature
}
// Temporary compatibility feature
- void maybe_create_material_shader(DataFile::Collection *);
+ void maybe_create_material_shader();
void set_material_textures();
public:
void set_material_textures();
public:
const Program *get_shader_program() const { return shprog.get(); }
const ProgramData *get_shader_data() const { return shdata.get(); }
Tag get_slotted_uniform_tag(Tag) const;
const Program *get_shader_program() const { return shprog.get(); }
const ProgramData *get_shader_data() const { return shdata.get(); }
Tag get_slotted_uniform_tag(Tag) const;
- void set_material(const Material *, DataFile::Collection * = 0);
+ void set_material(const Material *);
const Material *get_material() const { return material.get(); }
const std::string &get_material_slot_name() const { return material_slot; }
void set_texture(Tag, const Texture *, const Sampler * = 0);
const Material *get_material() const { return material.get(); }
const std::string &get_material_slot_name() const { return material_slot; }
void set_texture(Tag, const Texture *, const Sampler * = 0);
namespace Msp {
namespace GL {
namespace Msp {
namespace GL {
-OccludedScene::OccludedScene(Resources &resources):
- bounding_mesh(resources.get<Mesh>("_occluder.mesh")),
- bounding_shader(resources.get<Program>("_occluder.glsl.shader")),
+OccludedScene::OccludedScene():
+ bounding_mesh(Resources::get_global().get<Mesh>("_occluder.mesh")),
+ bounding_shader(Resources::get_global().get<Program>("_occluder.glsl.shader")),
occluder_min_size(0.25f),
cache_dirty(false)
{
occluder_min_size(0.25f),
cache_dirty(false)
{
mutable bool cache_dirty;
public:
mutable bool cache_dirty;
public:
- OccludedScene(Resources &);
~OccludedScene();
virtual void add(Renderable &);
~OccludedScene();
virtual void add(Renderable &);
#include "animation.h"
#include "armature.h"
#include "camera.h"
#include "animation.h"
#include "armature.h"
#include "camera.h"
#include "font.h"
#include "keyframe.h"
#include "light.h"
#include "font.h"
#include "keyframe.h"
#include "light.h"
void init_shaderlib(DataFile::BuiltinSource &);
void init_builtin_data(DataFile::BuiltinSource &);
void init_shaderlib(DataFile::BuiltinSource &);
void init_builtin_data(DataFile::BuiltinSource &);
+Resources *Resources::global_resources = 0;
+
+Resources::Resources(bool set_as_global):
default_tex_filter(Texture::can_generate_mipmap() ? LINEAR_MIPMAP_LINEAR : LINEAR),
default_tex_anisotropy(1.0f),
srgb_conversion(false),
default_tex_filter(Texture::can_generate_mipmap() ? LINEAR_MIPMAP_LINEAR : LINEAR),
default_tex_anisotropy(1.0f),
srgb_conversion(false),
.notify(&Resources::set_debug_name<Texture2DArray>);
add_source(get_builtins());
.notify(&Resources::set_debug_name<Texture2DArray>);
add_source(get_builtins());
+
+ if(set_as_global && !global_resources)
+ global_resources = this;
+}
+
+Resources::~Resources()
+{
+ if(this==global_resources)
+ global_resources = 0;
+}
+
+Resources &Resources::get_global()
+{
+ if(!global_resources)
+ throw invalid_operation("no global resources");
+ return *global_resources;
}
const DataFile::CollectionSource &Resources::get_builtins()
}
const DataFile::CollectionSource &Resources::get_builtins()
bool srgb_conversion;
ResourceManager *resource_manager;
bool srgb_conversion;
ResourceManager *resource_manager;
+ static Resources *global_resources;
+
+ Resources(bool = true);
+ virtual ~Resources();
+ static Resources &get_global();
static const DataFile::CollectionSource &get_builtins();
void set_default_texture_filter(TextureFilter);
static const DataFile::CollectionSource &get_builtins();
void set_default_texture_filter(TextureFilter);