156 |
* 2) using a vertex program |
* 2) using a vertex program |
157 |
* - call setUp_VP with LightParam to use |
* - call setUp_VP with LightParam to use |
158 |
* - call glTexCoord*() and glVertex*() directly from |
* - call glTexCoord*() and glVertex*() directly from |
159 |
* the context _or_ call vector_VP() with vertex and |
* the context, use vertex arrays _or_ call vector_VP() |
160 |
* texture coordinates in vector arrays of 4 floats. |
* with vertex and texture coordinates in arrays |
161 |
|
* of 4 floats. |
162 |
* - call teardown_VP() |
* - call teardown_VP() |
163 |
* |
* |
164 |
* 3) using explicit coordinates |
* 3) using explicit coordinates |
210 |
/** Vertex program version of the paperpass vertex |
/** Vertex program version of the paperpass vertex |
211 |
* Calling vertex_VP() is optional. It's possible to call |
* Calling vertex_VP() is optional. It's possible to call |
212 |
* glTexCoord*() and glVertex*() directly from the context |
* glTexCoord*() and glVertex*() directly from the context |
213 |
* and choose the best function variant (vertex_VP() forces |
* and choose the best function variant or use vertex arrays |
214 |
* to pass coordinates in vector arrays of 4 floats). |
* (vertex_VP() forces to pass coordinates in arrays of 4 floats). |
215 |
* |
* |
216 |
* @param pos vertex position (vector of 4 floats) |
* @param pos vertex position (array of 4 floats) |
217 |
* @param ppos position within paper (vector of 4 floats) |
* @param ppos position within paper (array of 4 floats) |
218 |
*/ |
*/ |
219 |
void vertex_VP(float *pos, float *ppos) { |
void vertex_VP(float *pos, float *ppos) { |
220 |
glTexCoord4fv(ppos); |
glTexCoord4fv(ppos); |