ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/shader.h
(Generate patch)

Comparing libgender/shader.h (file contents):
Revision 1.19 by root, Fri Oct 29 22:32:49 2004 UTC vs.
Revision 1.20 by root, Fri Oct 29 23:19:08 2004 UTC

211 211
212 struct shader_builder 212 struct shader_builder
213 { 213 {
214 vector<uniform> refs; // uniform parameters 214 vector<uniform> refs; // uniform parameters
215 vector<var> temps; // temporary variables 215 vector<var> temps; // temporary variables
216 vector<var> streams; // varying inputs & outputs
217 216
218 ostringstream source; 217 ostringstream source;
219 218
220 template<typename type> 219 template<typename type>
221 shader_builder &operator <<(const type &t) 220 shader_builder &operator <<(const type &t)
512 template<GLenum gltype, const char *strtype> 511 template<GLenum gltype, const char *strtype>
513 struct sampler_i : uniform_i, texture_units 512 struct sampler_i : uniform_i, texture_units
514 { 513 {
515 int unit; 514 int unit;
516 GLuint name; 515 GLuint name;
517
518 void update ()
519 {
520 if (dirty)
521 {
522 //cgGLSetTextureParameter (param, texture);
523 dirty = false;
524 }
525 }
526 516
527 void enable () 517 void enable ()
528 { 518 {
529#if DEBUG 519#if DEBUG
530 assert (unit < 0); 520 assert (unit < 0);
726 program_object (); 716 program_object ();
727 ~program_object (); 717 ~program_object ();
728 718
729 void link (); 719 void link ();
730 720
731 void enable () 721 void enable ();
732 {
733 glUseProgramObjectARB (id);
734 cur = this;
735 }
736
737 void disable () 722 void disable ();
738 {
739 glUseProgramObjectARB (0);
740 cur = 0;
741 }
742 }; 723 };
743 724
744 template<typename T> 725 template<typename T>
745 struct sl_append 726 struct sl_append
746 { 727 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines