172 |
}, |
}, |
173 |
|
|
174 |
{ |
{ |
175 |
|
"Type": "2", |
176 |
|
"Name": "CopyPixels", |
177 |
|
"Data" : "GLenum type; int w,h; ", |
178 |
|
"Params" : "int w, int h, GLToken type", |
179 |
|
"ParamCode" : """ |
180 |
|
this->w = w; |
181 |
|
this->h = h; |
182 |
|
this->type = type; |
183 |
|
""", |
184 |
|
"RenderCode" : """ |
185 |
|
glPushAttrib(GL_PIXEL_MODE_BIT); |
186 |
|
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); |
187 |
|
glPixelStorei(GL_PACK_ROW_LENGTH, 0); |
188 |
|
glPixelStorei(GL_PACK_ALIGNMENT, 1); |
189 |
|
|
190 |
|
ZPt pfrom = coords1.transform(ZPt(0,0,0)); |
191 |
|
glRasterPos3f(pfrom.x, pfrom.y, pfrom.z); |
192 |
|
float ras[4]; |
193 |
|
glGetFloatv(GL_CURRENT_RASTER_POSITION, ras); |
194 |
|
|
195 |
|
ZPt p = coords2.transform(ZPt(0,0,0)); |
196 |
|
glRasterPos3f(p.x, p.y, p.z); |
197 |
|
|
198 |
|
glCopyPixels((int)ras[0], (int)ras[1], w, h, type); |
199 |
|
GLERR |
200 |
|
glPopClientAttrib(); |
201 |
|
glPopAttrib(); |
202 |
|
""", |
203 |
|
}, |
204 |
|
|
205 |
|
|
206 |
|
{ |
207 |
"Type": "1", |
"Type": "1", |
208 |
"Name" : "TextureMatrix", |
"Name" : "TextureMatrix", |
209 |
"RenderCode" : """ |
"RenderCode" : """ |