texture upload.

Hello.

Is it possible to upload a texture without converting and clamping? If it isn’t, why? :slight_smile:

Thank you.

GL_RGB Each element is an RGB triple. The GL converts it
to floating point and assembles it into an RGBA
element by attaching 1 for alpha. Each component
is then multiplied by the signed scale factor
GL_c_SCALE, added to the signed bias GL_c_BIAS,
and clamped to the range [0,1] (see
glPixelTransfer).

GL_RGBA   Each element contains all four components.	Each
      component is multiplied by the signed scale	factor
      GL_c_SCALE,	added to the signed bias GL_c_BIAS,
      and	clamped	to the range [0,1] (see
      glPixelTransfer).

If you want unclamped values you have to use one of the texture formats provided by the extensions ARB_texture_float, EXT_texture_integer, EXT_packed_float, or EXT_texture_shared_exponent.

The normal fixed point texture formats simply can’t represent values outside the [0, 1] range.

This restriction may be understandable before programmable gpus, but right now isn’t it something OpenGL must support? DirectX supports this btw?

Didn’t know about EXT_texture_integer [Shipping for GeForce 8 Series (November 2006)], i think this is what i want. but my card doesn’t support, since it is quite new (and unpopular?).

This isn’t a feature, that you can just enable. Your hardware needs to support it. If your hardware does support it, it will also expose the needed extensions.

DirectX (i assume you mean D3D9 or at least D3D10) “supports” it, IF you have hardware that can handle it.

Jan.

If D3D9-10 support something, a hardware -have to- handle it, to be able to say that they support D3D9-10, i was thinking this idea is one of the main selling points of DX, which is possible another misinterpretation of mine :slight_smile:

right now isn’t it something OpenGL must support?

As everybody else pointed out, this is supported by OpenGL.
If your hardware is not able to do it, the graphic API (whether D3D or GL) will not allow you to use it anyway.

What is your card btw ?

BTW, this is a DX10 level feature. The extension was put forward by NV to go along with their 8800 when it came out.

This is something i don’t really get. To be able to claim such a thing, vendors should pay attention to OpenGL as they do for DX, since mostly my troubles come from what -implementation- can do, more than what hardware can do.

My card is X1950Pro.

I am not good at English, sorry :slight_smile:

GL implementation is the combination of driver and hardware.
D3D implementation is the combination of Microsoft spec+implem, driver, and hardware.
That allowed some D3D10 features to be available in GL even before Vista was out.

And if you have problems with your ATI card, complain to ATi/AMD, or buy nvidia.

EXT_texture_integer is not supported on that hardware. However, you can use GL_ATI_texture_float, which won’t clamp the values.

ARB_texture_rectangle could be a good solution, and it’s available from OpenGL 1.1

And it’s completely unrelated to this thread.

My bad, I’ve misunderstood the question.
ARB_texture_float and other similar extensions are the right solution.

Sorry for the wrong answer :stuck_out_tongue: