d3drs_wrap[0-7] ???
N. Dahn
N.Dahn at gmx.de
Thu Oct 21 15:34:59 CDT 2004
> 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
Well... im really a noob (learning c since 3 days i think oO ) could you
please explain your code? Im not getting totally through it...
> case D3DRS_WRAP0:
> TRACE("Wrap Activation Flag for TextureStage 0 to %04x (QRST)\n", (DWORD) Value);
> break;
I dont understand what this is good for... and ive no idea what is done
in the different d3dtss calls... i really do what i can, but i think i
lack experience...
> > 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
*Dou* my fault...
> > 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
Alright.
> They seems deprecated since DX8.1 (maybe never implemented)
> D3DRS_POSITIONORDER = 172,
> D3DRS_NORMALORDER = 173,
Okay, they dont seem to break anything and i guess its quite painfull to
figure out what they do, so ill leave them for now.
Regards,
Nikolas
More information about the wine-devel
mailing list