DiveCalcFrameBufferAddress: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:DiveCalcFrameBufferAddress}} This is a helper function that allows applications to calculate the linear frame-buffer address. This function can be used only if DiveQueryCaps indicates that DIVE is available and an *fNonScreenInstance* DIVE instance has been opened. ==Syntax== _DiveCalcFrameBufferAddress(hDiveInst, prectlDest, ppDestinationAddress, pulBankNumber, pulRemLinesInBank) ==Parameters== ;''hDiveInst'' (HDIVE) - input :Display engine DIV..." |
No edit summary |
||
| Line 12: | Line 12: | ||
:Destination rectangle in screen coordinates (0,0 bottom left). The *xLeft*, *yTop* point indicates the point for which the address is required. In addition, the width of this rectangle is used to calculate the remaining scan lines in this aperture (useful on bank-switched displays). | :Destination rectangle in screen coordinates (0,0 bottom left). The *xLeft*, *yTop* point indicates the point for which the address is required. In addition, the width of this rectangle is used to calculate the remaining scan lines in this aperture (useful on bank-switched displays). | ||
;''ppDestinationAddress'' ([[PBYTE | ;''ppDestinationAddress'' ([[PBYTE]] *) - output | ||
:Indicates the calculated linear address within the frame buffer/aperture bank. | :Indicates the calculated linear address within the frame buffer/aperture bank. | ||
Latest revision as of 01:12, 26 November 2025
This is a helper function that allows applications to calculate the linear frame-buffer address. This function can be used only if DiveQueryCaps indicates that DIVE is available and an *fNonScreenInstance* DIVE instance has been opened.
Syntax
_DiveCalcFrameBufferAddress(hDiveInst, prectlDest, ppDestinationAddress, pulBankNumber, pulRemLinesInBank)
Parameters
- hDiveInst (HDIVE) - input
- Display engine DIVE instance.
- prectlDest (PRECTL) - input
- Destination rectangle in screen coordinates (0,0 bottom left). The *xLeft*, *yTop* point indicates the point for which the address is required. In addition, the width of this rectangle is used to calculate the remaining scan lines in this aperture (useful on bank-switched displays).
- ppDestinationAddress (PBYTE *) - output
- Indicates the calculated linear address within the frame buffer/aperture bank.
- pulBankNumber (PULONG) - output
- Indicates the bank number containing the top-left pel in the image.
- pulRemLinesInBank (PULONG) - output
- Indicates the number of lines in the bank, beginning with the first line of the destination rectangle.
Returns
- rc (ULONG) - returns
- Return codes indicating success or type of failure:
- DIVE_SUCCESS If the function succeeds, 0 is returned.
- DIVE_ERR_INVALID_INSTANCE The DIVE instance handle specified in the hDiveInst parameter is invalid.
- DIVE_ERR_NO_DIRECT_ACCESS The display adapter, display driver, or current video mode does not support direct-to-screen access.
Remarks
This section has no remarks.
Example Code
#include <dive.h>
HDIVE hDiveInst; /* Display engine DIVE instance. */
PRECTL prectlDest; /* Destination rectangle. */
PBYTE *ppDestinationAddress; /* Calculated linear address. */
PULONG pulBankNumber; /* Bank number. */
PULONG pulRemLinesInBank; /* Number of lines in bank. */
ULONG rc; /* Return codes. */
rc = DiveCalcFrameBufferAddress(hDiveInst,
prectlDest, ppDestinationAddress, pulBankNumber,
pulRemLinesInBank);