Archived

This topic is now archived and is closed to further replies.

farhanx

How to Shrink the screen?????Need experts help

Recommended Posts

farhanx    122
hi guys, is it possible that on Full screen d3d8 mode i display everything on the specific width and height ... i mean whole scene should get shrink on the screen, with any X axis and Y axis position of the screen. while half of the screen should be black it doesnt matter... please help... Thanks and regards

Share this post


Link to post
Share on other sites
DrGUI    402
For render to texture, check caps first, but if supported you can just set the texture to the render target. Look at the D3D DepthStencil sample to see how to do a screen space quad.

What are you actually trying to achieve? You could just set the viewport to half the screen perhaps?

Share this post


Link to post
Share on other sites
VolkerG    151
Why don''t you just modify the viewport? SetViewport method in DX9, but should be something like that in DX8, too.

Share this post


Link to post
Share on other sites
psykr    295
Use scissor tests while rendering. Or clear part of the scene before you present the back buffer.

Share this post


Link to post
Share on other sites
farhanx    122
Thanks alot every one , i never knew that view port could shrink the screen the way i want i always thought it is just a clipping type thing which clips screen and cut the scenes from sides which differ from shrink... anyway now its workng the way i want but i am watching strange white lines on the background area which is not inside the viewport range. how can i clear the whole background???
in clear function i am clearing Zbuffer and Target...

any ideas
Thanks again..

Share this post


Link to post
Share on other sites
farhanx    122
Sorry guys , it was my mistake i was setting the viewport before cleaning the whole screen that was my mistake but now after cleaning the whole screen i am setting its working correctly

///////////////////////////////////////////////////////////
if(FAILED(dDevice->Clear(0,0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0)))
{MessageBox(hwnd,"Clearing buffer CLASS HAS PROBLEM","WARN",MB_OK);
return 0;}

if(SUCCEEDED(dDevice->BeginScene()))
{
if(input)
{
RenderInputScene();
}
else
{
dDevice->SetViewport(&viewData);
RenderScene();
}
dDevice->EndScene();
}
//////////////////////////////////////////////////////////////

Thanks again..

Share this post


Link to post
Share on other sites