PDA

View Full Version : Emulate directx wrapping with Opengl



joaopa
11-11-2010, 02:34 PM
Hello,

I would like to emulate the following wrapping mode of Directx:
http://msdn.microsoft.com/en-us/library/bb206256%28VS.85%29.aspx


Does anyone know a way to achieve this with Opengl in Linux?

Thanks in advance

ZbuffeR
11-11-2010, 03:18 PM
AFAIK it is not possible in OpenGL.
This has already been discussed on these forums, quite a long time ago. Try searching.

Do you have a practical use case for this ?

joaopa
11-11-2010, 03:24 PM
yes, to implement it in wine. Some games use that.

ZbuffeR
11-11-2010, 03:56 PM
I must admit I have no idea how to implement this with any efficiency.

Short of triplicating each texcoord (with shifts 0, -1, +1) then deciding in the fragment shader which one to use according to the smallest derivative ...

EDIT : scratch that, it should be in texcoord space instead of fragment space ... well no idea

Maybe some people here have better clever ideas ?