Good afternoon, I am still green in Opengl and maybe I don’t understand everything, but my model blinks when it is animated with double buffering enabled. Below I will provide a link to the code, because the whole will not fit here. I have a tanchik drawn here and its turns, but so far they are not fully working, and also the tanchik shoots and this is the problem described above. Help me please. http://qtxt.ru/tanks
1 answer
procedure TfrmGL.FormPaint(Sender: TObject);
if you have this attached to the onPaint
event, then this is incorrect ...
It is necessary to draw on the timer (in your case).
procedure TfrmGL.Timer1Timer(Sender: TObject); begin y:=y+z; refresh; <---- неверно FormPaint(self);<---- верно end;
Well, respectively, remove this event from onPaint
- Thanks now no longer blinks
- oneaccept the answer if it is correct)) and it is not worth it to scatter points like that .. a lot of things depend on them (oo where I already saw this phrase) - Vladimir Klykov
|