Hi Enrico,

well, I'm not quite sure if the problem applies with you exactly, but if you're about to use floating-point textures with nVidia boards (and their extension), you can use _rectangular_ textures only (and remember the different approach to texture coordinates then: the need [0...dim-1] instead of [0...1]). So I doubt that using CUBE in your fp might work at all... Additionally the min/mag-filters are limited to GL_NEAREST and, especially for geforceFX-boards, only the GL_CLAMP_TO_EDGE wrapping exploits the acceleration - all others are slower (according to the extension specification).


So this is the way I got it going - but as I've already written before with my "extended" OpenSG using half...;-)
...
beginEditCP( img );
img->set( Image::OSG_RGBA_PF, width, height, 1, 1, 1, 0.0, (UInt8*) hdrpixels, Image::OSG_HALF16_IMAGEDATA );
endEditCP( img );

TextureChunkPtr tc = TextureChunk::create();
beginEditCP( tc );
tc->setTarget( GL_TEXTURE_RECTANGLE_NV );
tc->setInternalFormat( GL_FLOAT_RGBA16_NV );
tc->setMinFilter( GL_NEAREST );
tc->setMagFilter( GL_NEAREST );
tc->setWrapS( GL_CLAMP_TO_EDGE );
tc->setWrapT( GL_CLAMP_TO_EDGE );
tc->setImage( img );
endEditCP( tc );


However, if anybody has different experiences (esp. using floating-point cubemaps directly), I'd be glad to hear about that...


bye,
Matthias



On 21 May 2004 12:03:39 +0200, Enrico Borrione <[EMAIL PROTECTED]> wrote:

I am trying to make it work,
using both the hints that i've got here and those ones Mathias gave me.
Actually my code looks like:


// this is the 16 bit real image
LoadImg("3.raw",pixels);
Int16 data2[256*256*3];
RGBme(pixels,256,256,data2);
immagine[3]->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0,(UInt8*) data2,
Image::OSG_UINT16_IMAGEDATA);
cubemap->setNegYImage(immagine[3]) ;

.
.
.

cubemap->setMinFilter(GL_LINEAR_MIPMAP_LINEAR);
cubemap->setMagFilter(GL_LINEAR);
cubemap->setWrapS(GL_CLAMP);
cubemap->setWrapT(GL_CLAMP);
cubemap->setEnvMode(GL_MODULATE);
cubemap->setExternalFormat(GL_RGB16);

i am getting no compilation errors,
but neither any output: my sphere is constantly black.

my fp should parse the real16 data all by himself. As for now
is it just a stupid:

TEMP texelcolor;
TEX texelcolor, inTexCoord, texture[0], CUBE;

MUL outColor, inColor, texelcolor;

so my idea is that the cube map is just an array of zeroes...
any clues?




Il gio, 2004-05-20 alle 18:52, Dirk Reiners ha scritto:
On Tue, 2004-05-18 at 04:19, Matthias Biedermann wrote:
> Hi Enrico,
>
>
> actually I've asked for that some time ago, but I guess due to
> sourceforge's archive delay you won't able to find it.
>
> There are basically two ways to do that (Dirk told me the easier one
> afterwards...;)):
> For simply using that 16 Bit datatype - I suppose we're talking about
> "half" in NVidia-lingo - for images/textures only, you can get away with > building an already supported Int16-image and put the half data into it.

One additional detail: to use that right you'll have to set the
externalFormat of the Texture to tell OpenGL what format your data
really is.

Adding a real Real16 would make the current Image class explode, so
we'll have to put some effort into redesigning the conversion methods
before that makes sense. Until then using Int16 for storage is hopefully
ok.

Yours

        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to