- var temp : PByte;
- i,j : integer;
- bmp : TBitmap;
- pixelData : array of array of gluByte;
- begin
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity;
- gluPerspective(45.0, ClientWidth/ClientHeight, NearClipping, FarClipping);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity;
- glTranslatef(0, 0, -5);
- setlength(pixeldata,200,200);
- for i:=0 to 200-1 do
- begin
- for j:=0 to 200-1 do
- begin
- pixeldata[i,j] := Random(255*255*255);
- end;
- end;
- glDrawPixels(100,100,GL_RGB,GL_UNSIGNED_BYTE,pixeldata); //Das funktioniert
- // glDrawPixels(199,199,GL_RGB,GL_UNSIGNED_BYTE,pixeldata); //Das funktioniert nicht
- glFlush();
- SwapBuffers(DC);