Sign in to follow this  
ProgrammerDX

Old Game no SetTransform

Recommended Posts

I've seen an old game (10 years) which never uses SetTransform (for Projection / View / World) and still renders perfectly on the screen.

Is it possible? To render something on the screen using only SetRenderState & SetTextureStageState & SetTexture & DrawPrimitive ? No SetTransform at all.

[Edited by - ProgrammerDX on October 10, 2010 9:23:39 AM]

Share this post


Link to post
Share on other sites
Yep,

the game can do all the translations itself on the cpu and pass vertex data directly to the graphics api that has already been fully transformed. It would have been common to do it that way back when we didnt have hardware transform and lighting engines on graphics cards

Share this post


Link to post
Share on other sites
Hehe yeah, but that time it was with PROJECTION only, now I noticed even with completely zero SetTransform's it still works.

Even if I put in SetTransforms by hacking code in to it it will still pretend as if I never put a SetTransform, it's crazy!


(I'm trying to convert an old game written in DirectX 6 to DirectX 9 by just hooking the 4 main functions it uses from the device (DrawPrimitive, SetTexture, SetTextureStageState and SetRenderState), and completely removing all the DirectX 6 initializations, and then putting my own DirectX 9 initialization with my own BeginScene, EndScene, Present etc.

I'm pretty far and it works, but it still has some graphical bugs.

I even made sure old RenderStates are ignored, and some that are changed to use to their new way (I noticed some SetRenderStates are now SetSamplerState). But anyway, I'm not done yet, but it will be nice to have this done, so I can put in my own graphics to the game without learning almost undocumented DirectX 6.

I'll get there..

Offtopic: I even put the ground grid from your Particle Engine tutorial in the game to see what happens, EvilSteve, I could show a ss.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this