Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: taj on February 10, 2008

Title: D3D equivalents for OpenGL
Post by: taj on February 10, 2008
Does anyone know what the equivalent D3D command of

glRecti(-1,-1,1,1);

would be? I'm hoping I dont have to use vertices but call some primitive instead...
Title: Re: D3D equivalents for OpenGL
Post by: benny! on February 10, 2008
Good question, taj.

I really do not know - had a search on the net. All I
found was the following thread saying what you do
not want to hear (using vertices) ...

http://www.msdner.net/dev-archive/130/20-106-1301547.shtm (http://www.msdner.net/dev-archive/130/20-106-1301547.shtm)

Sorry. Didnt find anything else...
Title: Re: D3D equivalents for OpenGL
Post by: Jim on February 11, 2008
ColorFill, I think
http://www.google.com.au/search?hl=en&q=IDirect3DDevice9%3A%3AColorFill&btnG=Google+Search&meta= (http://www.google.com.au/search?hl=en&q=IDirect3DDevice9%3A%3AColorFill&btnG=Google+Search&meta=)

Jim
Title: Re: D3D equivalents for OpenGL
Post by: taj on February 11, 2008
Thats interesting, I'll try it and see if it triggers the shaders to run.
Title: Re: D3D equivalents for OpenGL
Post by: Jim on February 11, 2008
I doubt it, but worth a try.  Otherwise it's probably necessary to draw an indexed primitive.  Look up DrawPrimitiveUP() which takes vertices as a parameter and doesn't need a vertex buffer.

Jim