I have very fast 2D graphics working very nicely using the GLDirectOpengl, with anti-aliasing. I am drawing 800 000 pixels, and am getting very high frame rates, over 50 FPS.
procedure TForm1.GLDirectOpenGL1Render(Sender: TObject;
var rci: TRenderContextInfo);
var
i,j, x, y : Integer;
glc : TGLCanvas;
r : TRect;
color : TColor;
begin
glc:=TGLCanvas.Create(glsceneviewer1.width,glscene viewer1.height);
{ for x:=0 to 1000 do
for y:=0 to 800 do
begin
glc.PenColor:=clyellow;
glc.PlotPixel(x,y);
end;}
glc.Free;
end;
I have a few questions:
1. How would one do 2d Graphics using OpenGL and not glsscene? I like glscene, but am looking for something with minimal overhead.
2. With the code above, and without using PlotPixel, is there any way to bitblt a bmp to the screen? Or do I need to create a polygon and put a texture onto it?
Bookmarks