func_graphics_setgraphicsdriver.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. _func_graphics_setgraphicsdriver:
  2. =================
  3. SetGraphicsDriver
  4. =================
  5. SetGraphicsDriver -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. SetGraphicsDriver( driver:TGraphicsDriver,defaultFlags=GRAPHICS_BACKBUFFER )
  10. Set current graphics driver
  11. The current graphics driver determines what kind of graphics are created when you use
  12. the #CreateGraphics or #Graphics functions, as well as the graphics modes available.
  13. The #GLGraphicsDriver, #GLMax2DDriver and #D3D7Max2DDriver functions can all be used to
  14. obtain a graphics driver.
  15. The @defaultFlags parameter allows you to specify graphics flags that will be applied to any
  16. graphics created with #CreateGraphics or #Graphics.
  17. Parameters
  18. ==========
  19. Return Values
  20. =============
  21. Nothing.
  22. Examples
  23. ========
  24. .. code-block:: blitzmax
  25. SetGraphicsDriver GLMax2DDriver()
  26. Graphics 640,480
  27. DrawText "OpenGL Max2D Graphics! Hit any key (next to the whatever key)...",0,0
  28. Flip
  29. WaitKey
  30. EndGraphics
  31. SetGraphicsDriver GLGraphicsDriver()
  32. Graphics 640,480
  33. glClear GL_COLOR_BUFFER_BIT
  34. GLDrawText "'Raw' OpenGL Graphics! Hit any key...",0,0
  35. Flip
  36. WaitKey
  37. See Also
  38. ========