🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DeleteVertexShader dx8 to dx9 conversion

Started by
1 comment, last by frob 2 years, 6 months ago

Hello,

i am currently trying to convert a game to use dx9 instead of dx8. I would say that i'm rather close to completing it, but I have a few errors that I don't exactly know how to deal with atm.

  1. DeleteVertexShader and DeletePixelShader do not exist anymore in directx 9. What do I do with those? I could not find any equivalent to them in dx9 so far.
  2. SetRenderState( D3DRS_PATCHSEGMENTS, *((DWORD*)&fSegments));
    Render state D3DRS_PATCHSEGMENTS does not exist anymore, it was used for the number of segments per edge when drawing patches. Do I need to replace it with something? I could not find any equivalent for this either.

I have like 5 more errors but I feel like these are the 2 issues I have the most struggles with, so any help would be appreciated.

Thanks in advance!

Advertisement

Moving from 2001's technology to 2003's technology? You won't find many people on the site who are familiar with that age of tech.

DX9 made the shift from fixed function rendering (what those old shaders used) to a programable pipeline (the stuff in HLSL today). Those old fixed function pipelines had an array of operations that you had to generate. You'd build a list of instructions (aka the token array) and those were the ones that were executed. You might switch to vertex fog, set the fog density, draw, clear the fog, switch to alpha blending, render the transparent things, etc. Each was represented with a token in the stream.

I remember NVidia had some resources that implemented most of the old fixed-function operations in HLSL and GLSL, but that was nearly 20 years ago. Good luck hunting that kind of thing down, but somebody somewhere probably has a copy…

This topic is closed to new replies.

Advertisement