[MPlayer-dev-eng] Direct3D OSD discussion

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Nov 28 19:06:46 CET 2008


On Fri, Nov 28, 2008 at 05:23:53PM +0000, Jim Hauxwell wrote:
> 3)
> 
> took the comments about the setup of the blending, but I think it's
> clearer to do this stuff together.  It should have very little cost
> (some api overhead) as most drivers will detect when you are trying to
> set the same state as the previous value.

That wasn't a performance point, I just would consider setting variables
that never change and make sense for all the rendering (even taking into
account future development) part of the "setup", and not of the OSD
rendering. Not that it really matters.

> 5)
> 
> the vertex_t casting has been changed, the pointer is now a vertex_t,
> but the reason it didn't make any difference is that I now have to cast
> to (void *) in two places.

No, you do not have to cast it at all. The cast in the function call is
a good idea since it suppresses a warning, the one in the memcpy is just
pointless.
You don't like DrawPrimitiveUP? It would get rid of all that code...

> That should be it (I hope)

Casting pointers to int is still there.
Also there is the issue that Clear needs to be called for fullscreen.
I'd really suggest to call Clear always when in fullscreen mode, since
it makes _no_ performance difference at all, neither under Linux/Wine
with an Intel 945 nor on my desktop system, but Georgi said it caused
issues for him...

> P.S.  Are you using a tool of some sort to spot tab->space etc
> formatting issues in the patch? (or just your eyes)

View the patch with diff and vi, when it uses spaces it will look just
horrible in at least one of them.
You could just set the tab width in you favourite editor to 32 and you
will notice it very quickly, too...

> +vertex_t osd_quad_vb[] = {

This should be static const btw...



More information about the MPlayer-dev-eng mailing list