/[libvob]/libvob/include/vob/vobs/Texture.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Texture.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Sat Jun 28 14:35:39 2003 UTC revision 1.4 by tjl, Sun Jun 29 08:13:15 2003 UTC
# Line 77  struct CopyTexSubImage2D { Line 77  struct CopyTexSubImage2D {
77  };  };
78  VOB_DEFINED(CopyTexSubImage2D);  VOB_DEFINED(CopyTexSubImage2D);
79    
80    /** Call CopyTexSubImage from a ByteVector.
81     */
82    struct TexSubImage2D {
83        enum { NTrans = 0 };
84        Token target;
85        int level;
86        int x, y, w, h;
87        Token format;
88        Token type;
89        GLubyte *pixels;
90    
91        template<class F> void params(F &f) {
92            f(target, level, x, y, w, h, format, type, pixels);
93        }
94        void render() const {
95            GLERR
96            glPushAttrib(GL_PIXEL_MODE_BIT);
97            glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
98            glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
99            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
100    
101            glTexSubImage2D(target, level, x, y, w, h, format, type, pixels);
102    
103            glPopClientAttrib();
104            glPopAttrib();
105            GLERR
106        }
107    
108    };
109    VOB_DEFINED(TexSubImage2D);
110    
111  }  }
112  }  }
113    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26