211 |
int w = atoi(v[4].c_str()); |
int w = atoi(v[4].c_str()); |
212 |
int h = atoi(v[5].c_str()); |
int h = atoi(v[5].c_str()); |
213 |
vector<GLfloat> pixels = getfv(v, 8, w * h); |
vector<GLfloat> pixels = getfv(v, 8, w * h); |
214 |
|
/* XXX: need to multiply with the number of components, too |
215 |
if (pixels.size() != (unsigned)(w * h)) { |
if (pixels.size() != (unsigned)(w * h)) { |
216 |
cerr << "TexImage2D dimensions " << w << "x" << h << " do not match the size " << pixels.size() << " of data\n"; |
cerr << "TexImage2D dimensions " << w << "x" << h << " do not match the size " << pixels.size() << " of data\n"; |
217 |
return false; |
return false; |
218 |
} |
} |
219 |
|
*/ |
220 |
glTexImage2D(getToken(v[1]), atoi(v[2].c_str()), getToken(v[3]), |
glTexImage2D(getToken(v[1]), atoi(v[2].c_str()), getToken(v[3]), |
221 |
w, h, atoi(v[6].c_str()), getToken(v[7]), |
w, h, atoi(v[6].c_str()), getToken(v[7]), |
222 |
GL_FLOAT, &pixels[0]); |
GL_FLOAT, &pixels[0]); |