Drawing a Console
I how would I draw a console similar to the one in Q3. I think I could do it using transformed coordinates, like x,y,z,rhw. But Im currently using un-transformed vertices for my world and clearing the z-buffer everyframe. To use transformed vertices you cant clear the z-buffer. How would I get around of this problem.
Go on an Intense Rampage
If you''re just tryiny to render a console, I would imagine that you could just render everything to a texture, and then place that on a square a render that, just render the square before you set the view matrix, and you''ll always be able to set it a predictable distance from the screen. Also, you could get a pointer to the back buffer, lock it, and just draw directly to that, after you''ve done your rendering, just some thoughts.
quote:
If you're just tryiny to render a console, I would imagine that you could just render everything to a texture, and then place that on a square a render that, just render the square before you set the view matrix...
That is not going to work because the square "Quad" is using world space coordinates. Therefore, when you set the view matrix, the Camera will not longer be facing the Quad. If you want to use a World Space Quad then you will have to render it as a billboard.
Depending on the shape of your console, you may also want to look creating multiple viewports with the SetViewport function. I have never used them, but I believe that you could also use a Stencil Buffer?
_______________________________________
Understanding is a three edged sword...
[edited by - Sean Doherty on November 11, 2003 7:20:50 PM]
Why don''t you just draw the whole world then switch to ortho mode and draw a quad where you want the console to be, texture it, write text on top of it..etc?
"Why don''t you just draw the whole world then switch to ortho mode and draw a quad where you want the console to be, texture it, write text on top of it..etc? "
How can you switch to ortho mode, like you suggest. I am thinking that the D3DXSprite would be easiest. But would is support the transparency effects that the Q3 console has.
How can you switch to ortho mode, like you suggest. I am thinking that the D3DXSprite would be easiest. But would is support the transparency effects that the Q3 console has.
Im using ID3DXSprite::Draw() but the image drawn in always slightly stretched horizontally and vetically even though I use NULL for the strretch paramater. When I make the stretch values 1 and 1, it is still stretched. Anyone else have problems like this using D3DXSPRITE.
The Texture Im drawing is 1024 by 272. Is the error caused by the dimensions.?
[edited by - Graham on November 11, 2003 10:07:59 PM]
The Texture Im drawing is 1024 by 272. Is the error caused by the dimensions.?
[edited by - Graham on November 11, 2003 10:07:59 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement