InitGraph-Procedure
Declaration
Procedure InitGraph(var gd,gm : integer;const path : string);
Function:
initializes the graph package
Description:
Before the graph unit can be used, be sure your graphicsadapter supports
the VESA-Standart. Otherwise in the most cases you can try to use a vesa-tsr
to make your adapter vesacompatible (e.g. UNIVBE).
Graphdriver has two valid values: Graphdriver=0 which performs an auto
detect and inits the highest possible mode with the most colors. 1024x768x64K
is the highest possible resolution supported by the driver, if you need
a higher resolution, you must edit MODES.PPI. If you need another mode,
then set Graphdriver to a value unequal zero and Graphmode to the mode
you wish (VESA modes where 640x480x256 is $101 etc.). PathToDriver is only
needed, if you use the BGI fonts from Borland.
Example:
var gd,gm
: Integer;
pathtodriver : string;
begin
gd:=detect; {
highest possible resolution }
gm:=0; {
not needed, auto detection }
pathtodriver:='C:\PP\BGI'; {
path to BGI fonts, drivers aren't needed }
initgraph(gd,gm,PathToDriver);
if GraphResult <> grOK then Halt;
.....
{ whatever you need }
CloseGraph; {
restores the old graphics mode }
end.
Systems:
Dos, Turbo Pascal
back to Graph.ppu Index
back to index