d3drs_wrap[0-7] ???
Raphael
fenix at club-internet.fr
Thu Oct 21 15:14:51 CDT 2004
On Thursday 21 October 2004 21:43, N. Dahn wrote:
> Hopefully this isnt the case, and according to this
> http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/dire
>ctx_cpp/graphics_using_9bn7.asp i have luck for this time i think. :)
> Comments?
Well it seems only an activation flag, so no specific code
So, i this it should a code like that:
case D3DRS_WRAP0:
TRACE("Wrap Activation Flag for TextureStage 0 to %04x (QRST)\n", (DWORD) Value);
break;
and in TSS wraping mngt (IDirect3DDevice8Impl_SetTextureStageState):
switch (Type) {
case D3DTSS_ADDRESSU:
if (D3DTADDRESS_WRAP != Value || (This->UpdateStateBlock->renderstate[D3DRS_WRAP0 + Stage] & D3DWRAPCOORD_0)) {
TRACE("Setting WRAP_S to %d for %x\n", wrapParm, This->StateBlock->textureDimensions[Stage]); glTexParameteri(This->StateBlock->textureDimensions[Stage], GL_TEXTURE_WRAP_S, wrapParm);
checkGLcall("glTexParameteri(..., GL_TEXTURE_WRAP_S, wrapParm)");
}
break;
case D3DTSS_ADDRESSV:
if (D3DTADDRESS_WRAP != Value || (This->UpdateStateBlock->renderstate[D3DRS_WRAP0 + Stage] & D3DWRAPCOORD_1)) {
TRACE("Setting WRAP_T to %d for %x\n", wrapParm, This->StateBlock->textureDimensions[Stage]);
glTexParameteri(This->StateBlock->textureDimensions[Stage], GL_TEXTURE_WRAP_T, wrapParm);
checkGLcall("glTexParameteri(..., GL_TEXTURE_WRAP_T, wrapParm)");
}
break;
case D3DTSS_ADDRESSW:
if (D3DTADDRESS_WRAP != Value || (This->UpdateStateBlock->renderstate[D3DRS_WRAP0 + Stage] & D3DWRAPCOORD_2)) {
TRACE("Setting WRAP_R to %d for %x\n", wrapParm, This->StateBlock->textureDimensions[Stage]);
glTexParameteri(This->StateBlock->textureDimensions[Stage], GL_TEXTURE_WRAP_R, wrapParm);
checkGLcall("glTexParameteri(..., GL_TEXTURE_WRAP_R, wrapParm)");
}
break;
default: /* nop */
break; /** stupic compilator */
}
But i don't know if its valid to call SetTextureStageState(...D3DTADDRESS_WRAP) before SetRenderState(...D3DWRAP_U...) (you should test)
If you look at http://if.dynsite.net/t-pot/program/28_bump/bg_cpp_ps.html
they do it
> Okay, i think i got one step further: on gamedev.net i found the
> suggestion to use glTexParameteri(GL_TEXTURE_2D, TEXTURE_WRAP_U/V/W,
> wrapParm). Besides, could this also be an 3D Texture?
Yes: 3 param U/V/W
> I think I worked it out and im going to try it out now, but theres one thing
> bothering me:
> as mentioned earlier in d3d there exists the d3dwrapcoord_3 flag
> which wraps textures through the 4th dimension (that should be time).
> However, i was unable to find _anything_ going into that direction in
> opengl so i stubbed it out for now. Does anybody know how to proceed
> with this?
I think its used for cube texture (need face selection)
but don't worry for now
> BTW, is there a way to figure out what an undocumented function does?
> (namely d3drs 172 and 173)
They seems deprecated since DX8.1 (maybe never implemented)
D3DRS_POSITIONORDER = 172,
D3DRS_NORMALORDER = 173,
> Cheers
> Nikolas
Regards,
Raphael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20041021/583e249c/attachment.pgp
More information about the wine-devel
mailing list