- void finalize();
-
- std::string output_fragment_shader();
-
- // Uploads the texture if it has changed since last time.
- void set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num);
-
- // Tells the input where to fetch the actual pixel data. Note that if you change
- // this data, you must either call set_pixel_data() again (using the same pointer
- // is fine), or invalidate_pixel_data(). Otherwise, the texture won't be re-uploaded
- // on subsequent frames.
- void set_pixel_data(const unsigned char *pixel_data)
- {
- this->pixel_data = pixel_data;
- invalidate_pixel_data();
- }
-
- void invalidate_pixel_data()
- {
- needs_update = true;
- }
-
- const unsigned char *get_pixel_data() const
- {
- return pixel_data;
- }
-
- void set_pitch(unsigned pitch) {
- assert(!finalized);
- this->pitch = pitch;
- }