87 |
*/ |
*/ |
88 |
TexGen(const float *tex_mat) ; |
TexGen(const float *tex_mat) ; |
89 |
virtual void setUp(LightParam *param) ; |
virtual void setUp(LightParam *param) ; |
90 |
|
|
91 |
|
|
92 |
|
virtual void TexGen::setUpVP(int unit); |
93 |
|
|
94 |
|
virtual string TexGen::getVPCode(int unit); |
95 |
}; |
}; |
96 |
|
|
97 |
/** TexGen for embossing. |
/** TexGen for embossing. |
176 |
void tearDown() { |
void tearDown() { |
177 |
teardowncode(); |
teardowncode(); |
178 |
} |
} |
179 |
|
|
180 |
|
|
181 |
|
/** Vertex Program Version of the rendering interface |
182 |
|
* XXX: currently only plain TexGens are implemented |
183 |
|
* Note: most fields of *param will be ignored |
184 |
|
*/ |
185 |
|
void setUpVP(LightParam *param); |
186 |
|
void tearDownVP(); |
187 |
|
|
188 |
|
/** Paperpass vertex |
189 |
|
* @param pos vertex position (vector of 4 floats) |
190 |
|
* @param ppos position within paper (vector of 4 floats) |
191 |
|
*/ |
192 |
|
void vertex(float *pos, float *ppos) { |
193 |
|
glTexCoord4fv(ppos); |
194 |
|
glVertex4fv(pos); |
195 |
|
} |
196 |
|
|
197 |
|
/** Generate and load the texgen vertex program |
198 |
|
* Automatically called on first setUpVP unless already loaded */ |
199 |
|
void loadVP(); |
200 |
|
|
201 |
|
protected: |
202 |
|
VPCode texgenvp; |
203 |
}; |
}; |
204 |
|
|
205 |
/** A paper is simply a vector of passes. |
/** A paper is simply a vector of passes. |