Programming Microsoft Windows Ce Net 3Rd [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming Microsoft Windows Ce Net 3Rd [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Indirect Access to the Frame Buffer

On some systems, applications can't directly access the frame buffer using GAPI. For these systems, the display driver provides a phantom frame buffer for the application and then copies the data to the real frame buffer. Although this scheme hinders performance somewhat, it does provide compatibility for GAPI applications. One side effect is that it is difficult for GAPI applications to merge their directly written pixel data with the GDI's pixel data, which is natively written to the frame buffer.

Although many games just want to take over the entire display, some GAPI applications require that the system display GAPI data on one part of the display and paint standard Windows controls on the other part. To merge the two streams of data, GAPI provides a function called GXSetViewport to indicate what part of the screen the GAPI program controls. The display driver can then use the GAPI data for that area of the screen and the GDI data for the remainder of the frame buffer. The GXSetViewport function looks like this:

int GXSetViewport (DWORD dwTop, DWORD dwHeight, DWORD dwReserved1, 
DWORD dwReserved2);

The current implementation of GXSetViewport is somewhat limited in that it can describe only a band across the screen where the GAPI data will be written. The parameter dwTop specifies the first line on the display reserved for GAPI. Any lines above this value are written by the system. The dwHeight parameter is the height of the band of data, in lines, that the GAPI program will write. Any lines below dwTop+dwHeight will be written by GDI.

It's important to note that GXSetViewport doesn't clip data. It simply defines the area that GDI won't write. An errant GAPI application certainly can overwrite the screen area reserved for GDI.

To determine whether the system is exposing a phantom frame buffer to GAPI instead of the real frame buffer, an application can call

BOOL GXIsDisplayDRAMBuffer();

This function returns TRUE if the application is using a phantom frame buffer and FALSE if the application will be accessing the actual frame buffer. An application can do little with this information except to ensure that it's calling GXSetViewport if it's mixing GAPI and GDI data and to indicate somewhat reduced performance for the dual buffer systems.

/ 169