Direct3D viewport problems

Stefan Dösinger stefan at
Tue May 1 12:44:04 CDT 2007

Am Dienstag 01 Mai 2007 13:17 schrieb H. Verbeet:
> On 01/05/07, Robert Fairlie <rfairlie at> wrote:
> > Since iSize is only about a fifth of the window height, I would expect
> > the arrow to be displayed at the bottom left of the window. but it's
> > actually being displayed at the top left. The main part of the scene
> > rendered with the first viewport settings is fine.
> >
> > The code does as expected in Windows, so I was wondering if anyone knows
> > of any problems in this area. I'm also having problems with CD3DFont
> > which I think might be related to this.
> Direct3D coordinates are flipped compared to GL coordinates, so it
> certainly sounds like a something that could go wrong. You didn't
> explicitly mention if you are rendering offscreen with the second
> viewport as well, but I'm assuming you are.
I corrected a number of problems with the viewport setup some time ago for 
shadow rendering in Half-Life 2 and Final Fantasy XI, but the shadows in hl2 
aren't perfect yet, so I suspect some remaining problems. To narrow the issue 
down I need some more information: Are you using a vertex shader or not? Are 
you using pretransformed geometry? (D3DFVF_XYZRHW, or the equivalent vertex 
declaration flag). Are you using vertex blend weights? Those parameters 
affect the way the opengl transforms and the viewport is set up.

A test case would be useful, we could commit it to our wine test suit to avoid 
regressions once the problem is fixed. Otherwise I want to get detailed 
shadows in half-life 2 working properly soon, if you're lucky that fixes your 
bug too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the wine-devel mailing list