opengl upgrade to 4.3 for masks, mask function/layout rework, make_shader rework
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcsynchronous.h
index 26d6e7f474312db44c8fc9216062ae822afa6819..db81a20ccf4bcf28cf2c557d6adf30ec232321a3 100644 (file)
@@ -72,11 +72,12 @@ public:
 class ShaderID
 {
 public:
-       ShaderID(int window_id, unsigned int handle, char *source);
+       ShaderID(int window_id, unsigned int handle,
+                const char *vert, const char *frag);
        ~ShaderID();
 
 // Should really use an MD5 to compare sources but this is easiest.
-       char *source;
+       char *vert, *frag;
        int window_id;
        unsigned int handle;
 };
@@ -182,13 +183,9 @@ public:
 // Can be called outside synchronous loop.
        void release_texture(int window_id, int id);
 
-// Get the shader by window_id and source comparison if it exists.
-// Not run in OpenGL thread because it has its own lock.
-// Sets *got_it to 1 on success.
-       unsigned int get_shader(char *source, int *got_it);
-// Add a new shader program by title if it doesn't exist.
-// Doesn't check if it already exists.
-       void put_shader(unsigned int handle, char *source);
+// Get the shader by window_id and vertex/fragment source comparison
+       int get_shader(unsigned int *handle, const char *vert, const char *frag);
+       void put_shader(unsigned int handle, const char *vert, const char *frag);
        void dump_shader(unsigned int handle);