[info-performer] floating point textures

Date view Thread view Subject view Author view

From: Andre Schollmeyer (andre.schollmeyer++at++medien.uni-weimar.de)
Date: 05/27/2005 07:14:03


hello,
Since OpenGL Performer 3.1 floating point textures are expected work.
Is it possible to generate a floating-point pfTexture with an own data source?
following example leads to an unexpected result:

...
pfTexture *tmp = new pfTexture();

// fill data array
std::vetctor<float> tmp_data;
for ( int i = 0; i < 3*16*16; ++i) {
    tmp_data.push_back(1.0);
}

// configure texture
tmp->setFormat( PFTEX_IMAGE_FORMAT, PFTEX_RGB);
tmp->setFormat( PFTEX_INTERNAL_FORMAT, GL_FLOAT_RGB_NV);
tmp->setFormat( PFTEX_EXTERNAL_FORMAT, PFTEX_FLOAT);

// set data source
tmp->setImage((unsigned int*)&(*tmp_data.begin()), 3, 16, 16, 1);

// save result
tmp->saveFile("test.rgb");

Is there something to pay attention to? or is it not possible to fill a
pfTexture with arbitrary floating point values?
And another question, is there any support for GL_TEXTURE_RECTANGLE_ARB extension?


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri May 27 2005 - 07:14:22 PDT