GuiPaint.dpr 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {: The Simple Paint Program using Gui components from GLScene.
  2. To use the Gui you must place a TGLGUILayout component on your form,
  3. this is a storage for Gui layouts within a single texture, each layout
  4. is identified by a name. All Layouts can be used with any Gui Component,
  5. however features like a forms title might look awkward on a checkbox...
  6. For correct usage a Material Library should be used.
  7. If a BitmapFont or WindowsFont is applied to a layout it is auto set to
  8. the components, however it is perfectly valid to set it to someother font.
  9. To Interface correctly, handlers must send the mouse and key events
  10. to a root gui component, this can be any of the keyboard aware gui
  11. components or a RootControl(a tramsparent component with no other purpose)
  12. Plus the root gui component should have its DoChanges invoked, this
  13. makes form movement and other mouse/key events changes fluintly
  14. match the rendering process, eg no flicker.
  15. All other Gui component must be below the root control in the GLScene
  16. hierachy, this is a rule which allows you to seperate gui from the
  17. rest of glscene and save some clock cycles on <tab> operations.
  18. Plus mouse events...
  19. For a more thorough look on the gui please check out my article on
  20. the caperaven site: http://caperaven.co.za
  21. under "Online documentation" called "Gui Interface"
  22. The two BMP's pen.bmp and brush.bmp have been published by Borland in the
  23. Doc/GraphEx demo that comes with Delphi.
  24. The rest is MPL as part of the GLScene project.
  25. NOTICE IS YOU HAVE A LOW FRAME RATE and you feel the drawing is lagging to
  26. far behind, try setting GLCanvas.MaxInvalidRenderCount to a lower value in
  27. the formcreate event.
  28. <b>History : </b><font size=-1><ul>
  29. <li>10/11/12 - PW - Changed FPS output to miFPS.Caption instead of Form1.Caption
  30. <li>01/05/03 - JAJ - Creation
  31. </ul></font>
  32. }
  33. program GuiPaint;
  34. uses
  35. Forms,
  36. fGuiPaint in 'fGuiPaint.pas' {FormGuiPaint};
  37. {$R *.RES}
  38. begin
  39. Application.Initialize;
  40. Application.CreateForm(TFormGuiPaint, FormGuiPaint);
  41. Application.Run;
  42. end.