X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcsynchronous.h;h=db81a20ccf4bcf28cf2c557d6adf30ec232321a3;hp=26d6e7f474312db44c8fc9216062ae822afa6819;hb=7ead9f7382846e81c2f8efb25780014e5f8834c3;hpb=2f5f5847bfeea491f69f5314dcbccaf6de4b22e4 diff --git a/cinelerra-5.1/guicast/bcsynchronous.h b/cinelerra-5.1/guicast/bcsynchronous.h index 26d6e7f4..db81a20c 100644 --- a/cinelerra-5.1/guicast/bcsynchronous.h +++ b/cinelerra-5.1/guicast/bcsynchronous.h @@ -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);