Double buffering implemented
Double buffering is now enabled with the use of the new large alloc (klalloc).
This commit is contained in:
parent
d057bfc3ff
commit
2815dd9e4d
@ -41,7 +41,7 @@ function allocateBackBuffer(Width : uint32; Height : uint32; BitsPerPixel : uint
|
|||||||
begin
|
begin
|
||||||
Outputln('VIDEO','Start Kalloc Backbuffer');
|
Outputln('VIDEO','Start Kalloc Backbuffer');
|
||||||
//This doesn't currently work... Needs a rework of lmemorymanager
|
//This doesn't currently work... Needs a rework of lmemorymanager
|
||||||
allocateBackBuffer:= uint64(kalloc((Width * Height) * BitsPerPixel));
|
allocateBackBuffer:= uint64(klalloc((Width * Height) * BitsPerPixel));
|
||||||
Outputln('VIDEO','End Kalloc Backbuffer');
|
Outputln('VIDEO','End Kalloc Backbuffer');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ begin
|
|||||||
console.Outputln('VIDEO', 'Init VESA Framebuffer');
|
console.Outputln('VIDEO', 'Init VESA Framebuffer');
|
||||||
initVESAFrameBuffer(@VESA, multiboot.multibootinfo^.framebuffer_addr, multiboot.multibootinfo^.framebuffer_width, multiboot.multibootinfo^.framebuffer_height, multiboot.multibootinfo^.framebuffer_bpp);
|
initVESAFrameBuffer(@VESA, multiboot.multibootinfo^.framebuffer_addr, multiboot.multibootinfo^.framebuffer_width, multiboot.multibootinfo^.framebuffer_height, multiboot.multibootinfo^.framebuffer_bpp);
|
||||||
console.Outputln('VIDEO', 'Init VESA Backbuffer');
|
console.Outputln('VIDEO', 'Init VESA Backbuffer');
|
||||||
//initBackBuffer(@VESA, multiboot.multibootinfo^.framebuffer_width, multiboot.multibootinfo^.framebuffer_height, multiboot.multibootinfo^.framebuffer_bpp);
|
initBackBuffer(@VESA, multiboot.multibootinfo^.framebuffer_width, multiboot.multibootinfo^.framebuffer_height, multiboot.multibootinfo^.framebuffer_bpp);
|
||||||
|
|
||||||
console.Outputln('VIDEO', 'Start Test Draw Loop');
|
console.Outputln('VIDEO', 'Start Test Draw Loop');
|
||||||
srand(98354754397);
|
srand(98354754397);
|
||||||
@ -106,10 +106,8 @@ begin
|
|||||||
Inc(RGB.B);
|
Inc(RGB.B);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
console.Outputln('VIDEO', 'Call flush');
|
|
||||||
Flush();
|
Flush();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tracer.push_trace('video.init.exit');
|
tracer.push_trace('video.init.exit');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -130,7 +128,6 @@ var
|
|||||||
Back,Front : PuInt32;
|
Back,Front : PuInt32;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
writestringln('Flush Start');
|
|
||||||
if not(VESA.BackBuffer.Initialized) then exit;
|
if not(VESA.BackBuffer.Initialized) then exit;
|
||||||
Back:= PUint32(VESA.BackBuffer.Location);
|
Back:= PUint32(VESA.BackBuffer.Location);
|
||||||
Front:= PuInt32(VESA.Framebuffer.Location);
|
Front:= PuInt32(VESA.Framebuffer.Location);
|
||||||
@ -139,7 +136,6 @@ begin
|
|||||||
Front[(Y * VESA.Framebuffer.Width)+X]:= Back[(Y * VESA.Framebuffer.Width)+X];
|
Front[(Y * VESA.Framebuffer.Width)+X]:= Back[(Y * VESA.Framebuffer.Width)+X];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
writestringln('Flush End');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
Loading…
x
Reference in New Issue
Block a user