Problem on Camera
I've got a problem on CFirstPersonCamera .
My desktop screen resolution is 1024x768 and if I create a application
using 800x600 in window mode,there is no problem about camera.But if the applicaiton use 800x600 in fullscreen mode,there seems to be some deviations.
(1024 x 768 in fullscreen mode is OK).I think there might be something about camera I do not know.
Here is my code:
//When app initialize
D3DXVECTOR3 Eye( 0, 10, -30.0f);
D3DXVECTOR3 At( 0, 0, 0);
m_Camera.SetViewParams( &Eye, &At );
m_Camera.SetProjParams( D3DX_PI/4, 800.0f/600.0f, 0.1f, 1000.0f );
//when app on Reset Device
m_Camera.SetProjParams( D3DX_PI/4, 800.0f/600.0f, 0.1f, 1000.0f );
what type of deviations you have?
can you post screensthots of the good state and the wrong one?
what parameters are you giving to the CreateDevice()?
did you change the BackBufferWidth and BackBufferHeight in your D3DPRESENT_PARAMETERS structure?
can you post screensthots of the good state and the wrong one?
what parameters are you giving to the CreateDevice()?
did you change the BackBufferWidth and BackBufferHeight in your D3DPRESENT_PARAMETERS structure?
use standard hmtl, like
>img src="http://imagedir.online" border="0" <
just change the < for a > and the < for a >
you can use imageshack.us to upload your screenshots online.
when you upload the pictures they give you the html link to use on the forum
>img src="http://imagedir.online" border="0" <
just change the < for a > and the < for a >
you can use imageshack.us to upload your screenshots online.
when you upload the pictures they give you the html link to use on the forum
I think the real problem is when eye is at (0,20,-5) and look at
point is at (0,0,0) if fullscreen resolution is the same as desktop,then I can see an object at (0,0,0) is in the center of screen,but if fullscreen resolution is not the same as desktop,then the object is not at the center of screen and I need to rotate the lookat point to find the object.
point is at (0,0,0) if fullscreen resolution is the same as desktop,then I can see an object at (0,0,0) is in the center of screen,but if fullscreen resolution is not the same as desktop,then the object is not at the center of screen and I need to rotate the lookat point to find the object.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement