};
private:
+ struct BoundTexture
+ {
+ Tag tag;
+ mutable int unit;
+ const Texture *texture;
+ const Sampler *sampler;
+ int replaced;
+
+ BoundTexture();
+ };
+
struct State
{
const Camera *camera;
Matrix modelview_matrix;
- const Texture *texture;
- const Sampler *sampler;
- const Texturing *texturing;
+ unsigned texture_count;
unsigned lowest_effect_texunit;
const Material *material;
const Lighting *lighting;
unsigned char changed;
std::vector<State> state_stack;
State *state;
+ std::vector<BoundTexture> texture_stack;
ProgramData standard_shdata;
std::vector<const ProgramData *> shdata_stack;
std::set<const Renderable *> excluded;
/** Returns the current modelview matrix. */
const Matrix &get_matrix() const { return state->modelview_matrix; }
- void set_texture(const Texture *, const Sampler * = 0);
- void set_texturing(const Texturing *);
- unsigned allocate_effect_texunit();
+ void set_texture(Tag, const Texture *, const Sampler * = 0);
+private:
+ void set_texture(Tag, int, const Texture *, const Sampler *);
+ void flush_textures();
+public:
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ DEPRECATED void set_texture(const Texture *, const Sampler * = 0);
+ DEPRECATED void set_texturing(const Texturing *);
+ DEPRECATED unsigned allocate_effect_texunit();
+#pragma GCC diagnostic pop
void set_material(const Material *);
void set_lighting(const Lighting *);