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

Direct3D9 drawing problem

Started by Yosepp Nov 24, 2003 at 9:44 AM 3 replies 300+ views
Original Post
Yosepp
Yosepp
Hi, I was having problems with my code: i can't find the right coordinates for the triangle so it would be on screen. If i add the RWH component to FVF, i can draw it, but its really strange.When i remove it, i see nothing. I've tried some tutorials but they don't seem to work for me. Try it out: download www.hot.ee/horizonsoft/D3DL1.zip (Visual c++ 6.0 and DirectX SDK 9 required) Thanks for help! [edited by - Yosepp on November 24, 2003 10:46:48 AM]
Castaway
Castaway
Try adding a projection transformation.

[edited by - Castaway on November 27, 2003 12:44:17 PM]
http://www.codeflow.fi/
PlayGGY
PlayGGY
RHW just means that you have transformed the vertices yourself, so Direct3D just sends them to the driver without doing anything to them.

[edited by - PlayGGY on November 27, 2003 1:25:39 PM]
And the rockets' red glare, the bombs bursting in air,gave proof through the fight that our flag was still there.Oh say, does that star-spangled banner yet waveover the land of the free and the home of the brave?
Night Elf
Night Elf
Having an RHW tells Direct3D your vertex data is already in screen space (screen coords), so if you are making some sort of 2D program, you should leave the RHW component.

If you''re making a 3D app, read about world, view and projection tranforms. They''re all explained on the SDK''s tutorials.

Good Luck!

Mariano Ruggiero
Lead Programmer
ONIRIC GAMES
Yosepp
Yosepp
Thx, i got it solved! Forgot the projection/view matrix thingie.

Topic Locked

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

Sign in to reply to this topic.