]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Use UBOs instead of glUniform. Work in progress; no clear wins seen yet.
[movit] / effect_chain.h
index 22f0b96c6e4eabc807c8bf57a75b70516c3a8cda..de50512f204b7f15fd67f9620307026c44fad528 100644 (file)
@@ -179,6 +179,10 @@ struct Phase {
        std::vector<Uniform<float> > uniforms_vec4;
        std::vector<Uniform<Eigen::Matrix3d> > uniforms_mat3;
 
+       GLuint ubo;  // GL_INVALID_INDEX if not using UBOs.
+       GLuint uniform_block_index;
+       std::vector<char> ubo_data;
+
        // For measurement of GPU time used.
        std::list<GLuint> timer_query_objects_running;
        std::list<GLuint> timer_query_objects_free;
@@ -194,7 +198,7 @@ public:
        // will create its own that is not shared with anything else. Does not take
        // ownership of the passed-in ResourcePool, but will naturally take ownership
        // of its own internal one if created.
-       EffectChain(float aspect_nom, float aspect_denom, ResourcePool *resource_pool = NULL);
+       EffectChain(float aspect_nom, float aspect_denom, ResourcePool *resource_pool = NULL, GLenum intermediate_format = GL_RGBA16F);
        ~EffectChain();
 
        // User API:
@@ -438,6 +442,7 @@ private:
        std::vector<Input *> inputs;  // Also contained in nodes.
        std::vector<Phase *> phases;
 
+       GLenum intermediate_format;
        unsigned num_dither_bits;
        OutputOrigin output_origin;
        bool finalized;