From: Andre Schollmeyer (andre.schollmeyer++at++medien.uni-weimar.de)
Date: 06/02/2005 15:00:45
I found the problem.
Memory for floating-point texture has to be reserved with pfMalloc().
...
pfTexture *texHull = new pfTexture();
float * m_hull = (float *)pfMalloc(3 * height * width * sizeof(float),
pfGetSharedArena());
float *tmp_hull = m_hull;
for ( int i = 0; i < size; ++i) {
float r = n ->getUknot();
*(tmp_hull++) = r;
*(tmp_hull++) = 0.0;
*(tmp_hull++) = 0.0;
}
texHull->setFormat( PFTEX_IMAGE_FORMAT, GL_RGB);
texHull->setFormat( PFTEX_INTERNAL_FORMAT, PFEX_RGB_F16);
texHull->setFormat( PFTEX_EXTERNAL_FORMAT, PFTEX_FLOAT);
texHull->setImage( (unsigned int*)m_hull, 3, width, height, 1);
...
But I still have the question, if GL_TEXTURE_RECTANGLE_ARB is available,
especially in combination with texture-lookups with GLSL-shader-program. Has
GL_TEXTURE_RECTANGLE_ARB to be enabled explicitly? Any experiences?
This archive was generated by hypermail 2b29 : Thu Jun 02 2005 - 15:00:54 PDT