Re: windowed mode

From: Teis Draiby (
Date: 10/27/04

Date: Thu, 28 Oct 2004 01:44:48 +0200

You got to change your FOV (field of view) to match your new form
dimensions. If you enlarge your window your FOV gets larger.
If you have somthing like a 'base' baseWidth and a corresponding baseFOV you
can calculate the FOV for a corresponding render surface width like this:

const = Tan( baseFOV / 2 ) / baseWidth
(calculated when setting the projection matrix the first time)

newFOV = Atan( newWidth / const )
(calculated each time the form resizes)

Do also change the aspect ration according to the form proportions. The
height of the form doesn't have an influence on the size of the rendered
The rendered elements will keep their sizes and appearance but the scene
will realign relative to the center of the form.

Hope it works!

regards, Teis

"godot" <> wrote in message
> Hello,
> I render a direct3D scene in a form and I want tje 3D objects to keep a
> constant size in the form while resizing the form.
> In other words, what I want is to disclose the scene when the form gets
> greater and hide part of the scene when it gets more little.
> thanks