Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: spitfire on September 24, 2007

Title: 2D geometry in directx
Post by: spitfire on September 24, 2007
Whats the best way to draw 2D interactive geometry? i.e. not just bitmaps. I know theres some kind of performance problem with drawing to or filling many quads over and over, but will it neccissarily be slower than software rendering (in an extreme case)?

To give an example, user selects a circle and drags it till its larger, then rotates 2 paralell tangents into position. There will be a TON of geometry like this.

Do you think pixel shaders would be usefull for this?
Title: Re: 2D geometry in directx
Post by: va!n on September 24, 2007
@spitfire:
if you code it correctly with DX, hardware based things will be always faster as software rendering. Btw, why using software rendering, when ppl having hardware accelated graphic cards? ^^  Btw, DX dont support any direct 2d drawing like circle and so on... you have to do it yourself...   If you only want display a lot of sprites (textures) and want to change the color of them, you dont need any PS stuff... btw, i dont know why so many ppl are using pixel shaders for things you dont really need them ^^

Btw, dont use DirectDraw its old and slow...
Title: Re: 2D geometry in directx
Post by: ninogenio on September 26, 2007
don`t know much about dx but in gl i would work with ortho projection getting rid of the z coord then its a matter of drawing shapes out of boxes,triangles and lines and rotating and scaling them with gl`s model view matrix. doing all this with a good engine that culls of objects falling out of the screen and that uses display lists/vertex buffers you could draw many thousands of objects rotating and moving on even modest hardware.