Skip to main content
GameDev.net gamedev.net
🔒 Locked

Proper texture mapping.

Started by hksduhksdu Nov 17, 2004 at 6:10 PM 0 replies 450+ views
Original Post
hksduhksdu
hksduhksdu
I am following the some books and tutorials online to create just a cube with a 64x64 pixels JPG. I use the following RenderingStates: // Default rendering state pdxdevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); pdxdevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); pdxdevice->SetRenderState(D3DRS_LIGHTING, FALSE); pdxdevice->SetRenderState(D3DRS_NORMALIZENORMALS, FALSE); pdxdevice->SetRenderState(D3DRS_ZENABLE, TRUE); pdxdevice->SetRenderState(D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL); pdxdevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pdxdevice->SetRenderState(D3DRS_DITHERENABLE, FALSE ); pdxdevice->SetRenderState( D3DRS_COLORVERTEX, FALSE); pdxdevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); pdxdevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); When my camera looks at the cube, it renders with 93FPS on my laptop. But when I change the UV coordinate from 0.0, 1.0 to 0.0, 100.0 (repeating 100 times), it drops to 31FPS. I found that there are tons of games or applications are using very tiny textures but just WRAP and repeating, but they don't see like having this problem, any clue my friend? Thanks in advance, Andy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.