Hi,
How can we implement the flip functionality completly
in software. I was thinking if somehow we can copy the
contents of current surface on video memory where the
suface should be displayed.
Any comments, suggestion. Thanks in advance
Regards
Mudeem
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
mudeem siddiqui wrote:
How can we implement the flip functionality completly
in software. I was thinking if somehow we can copy the
contents of current surface on video memory where the
suface should be displayed.
Why would you do that? The whole POINT of DirectDraw is that the driver
exposes only those things that the hardware can actually do. If your
hardware cannot do flipping overlays, then for goodness sakes just say
so in the driver capabilities. It is up to the APPLICATION to decide
that it wants to simulate flipping when you don’t support it.
There is a major philosophical difference between GDI and DirectDraw.
With GDI, applications can rely on feature X always being available,
whether it is simulated or accelerated. With DirectDraw, an application
finds out from the driver which features are accelerated, and from that
list IT makes the decisions on which features to use.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
I am not in a conventional situation. Actually there
is no hardware. Yet I have to show that the driver is
supporting DirectDraw. Therefore I’ll have to emulate
flipping in the software.
The best place to do that would be the ddFlip function
where I can copy the data to the video memeory apart
from updating the surface pointers. The confusion what
should be the destination and source of the data.
Regards
Mudeem
— Tim Roberts wrote:
> mudeem siddiqui wrote:
>
> >How can we implement the flip functionality
> completly
> >in software. I was thinking if somehow we can copy
> the
> >contents of current surface on video memory where
> the
> >suface should be displayed.
> >
> >
>
> Why would you do that? The whole POINT of
> DirectDraw is that the driver
> exposes only those things that the hardware can
> actually do. If your
> hardware cannot do flipping overlays, then for
> goodness sakes just say
> so in the driver capabilities. It is up to the
> APPLICATION to decide
> that it wants to simulate flipping when you don’t
> support it.
>
> There is a major philosophical difference between
> GDI and DirectDraw.
> With GDI, applications can rely on feature X always
> being available,
> whether it is simulated or accelerated. With
> DirectDraw, an application
> finds out from the driver which features are
> accelerated, and from that
> list IT makes the decisions on which features to
> use.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
__________________________________
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
mudeem siddiqui wrote:
I am not in a conventional situation. Actually there
is no hardware. Yet I have to show that the driver is
supporting DirectDraw. Therefore I’ll have to emulate
flipping in the software.
The best place to do that would be the ddFlip function
where I can copy the data to the video memeory apart
from updating the surface pointers. The confusion what
should be the destination and source of the data.
Before the application can do a flip, it will have created an overlay
surface, which you will have to allocate from whatever fake frame buffer
memory you have. The application draws directly into that overlay
memory. The DD_FLIPDATA structure contains the new surface to display,
lpSurfTarg. The destination address was given to you in DdUpdateOverlay
or DdSetOverlayPosition. You have to remember where it goes; it isn’t
in the DD_FLIPDATA.
Have you checked the samples?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Tim,
This seems to be working. By the way, about
lpSurfTarg, MSDN say that this is the surface to which
the driver should flip. Does this means that this is
the surface on which the data has been written and
this has to be displayed?
Do you have some idea how we can implement DDFLIP_EVEN
and DDFLIP_ODD. MSDN say that incase of DDFLIP_EVEN
lpSurfTarg contains only the even fields. What does
fields mean hear. Does it mean the rows?
Mudeem
— Tim Roberts wrote:
> mudeem siddiqui wrote:
>
> >I am not in a conventional situation. Actually
> there
> >is no hardware. Yet I have to show that the driver
> is
> >supporting DirectDraw. Therefore I’ll have to
> emulate
> >flipping in the software.
> >
> >The best place to do that would be the ddFlip
> function
> >where I can copy the data to the video memeory
> apart
> >from updating the surface pointers. The confusion
> what
> >should be the destination and source of the data.
> >
> >
>
> Before the application can do a flip, it will have
> created an overlay
> surface, which you will have to allocate from
> whatever fake frame buffer
> memory you have. The application draws directly
> into that overlay
> memory. The DD_FLIPDATA structure contains the new
> surface to display,
> lpSurfTarg. The destination address was given to
> you in DdUpdateOverlay
> or DdSetOverlayPosition. You have to remember where
> it goes; it isn’t
> in the DD_FLIPDATA.
>
> Have you checked the samples?
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
__________________________________
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
mudeem siddiqui wrote:
Tim,
This seems to be working. By the way, about
lpSurfTarg, MSDN say that this is the surface to which
the driver should flip. Does this means that this is
the surface on which the data has been written and
this has to be displayed?
Yes.
Do you have some idea how we can implement DDFLIP_EVEN
and DDFLIP_ODD. MSDN say that incase of DDFLIP_EVEN
lpSurfTarg contains only the even fields. What does
fields mean hear. Does it mean the rows?
This is talking about interlaced content, such as an analog television
stream, where a single frame consists of two fields which are
interleaved row by row. Unless your (eventual) target hardware will
have the ability to interleave two overlays, you should forget about
this one.
I doubt this is used very much, even on hardware that implements it.
Interlaced content is just not that common.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Yes you are right. but just for my information if
ddflip is called with the flag DDFLIP_EVEN then the
lpSurfTarg would have the even rows. meaning that only
even rows should be updated. Am i correct.
Mudeem
— Tim Roberts wrote:
> mudeem siddiqui wrote:
>
> >Tim,
> >
> >This seems to be working. By the way, about
> >lpSurfTarg, MSDN say that this is the surface to
> which
> >the driver should flip. Does this means that this
> is
> >the surface on which the data has been written and
> >this has to be displayed?
> >
> >
>
> Yes.
>
> >Do you have some idea how we can implement
> DDFLIP_EVEN
> >and DDFLIP_ODD. MSDN say that incase of DDFLIP_EVEN
> >lpSurfTarg contains only the even fields. What does
> >fields mean hear. Does it mean the rows?
> >
> >
>
> This is talking about interlaced content, such as an
> analog television
> stream, where a single frame consists of two fields
> which are
> interleaved row by row.
>
> I doubt this is used very much, even on hardware
> that implements it.
> Interlaced content is just not that common.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
mudeem siddiqui wrote:
Yes you are right. but just for my information if
ddflip is called with the flag DDFLIP_EVEN then the
lpSurfTarg would have the even rows. meaning that only
even rows should be updated. Am i correct.
Yes, BUT remember that CCIR601 starts counting lines at 1, not 0. The
first scanline displayed will be the top scan in the odd field. The
second scanline will be the top scan in the even field. The third
scanline is the second scan in the odd field.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Thanks alot Tim.
— Tim Roberts wrote:
> mudeem siddiqui wrote:
>
> >Yes you are right. but just for my information if
> >ddflip is called with the flag DDFLIP_EVEN then the
> >lpSurfTarg would have the even rows. meaning that
> only
> >even rows should be updated. Am i correct.
> >
> >
>
> Yes, BUT remember that CCIR601 starts counting lines
> at 1, not 0. The
> first scanline displayed will be the top scan in the
> odd field. The
> second scanline will be the top scan in the even
> field. The third
> scanline is the second scan in the odd field.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com