OpenGL.xml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>OpenGL Textures</title>
  5. <chapter>
  6. <title>OpenGL Textures</title>
  7. <par>
  8. This extensions contains functions for loading and saving
  9. <keyword>OpenGL</keyword> textures
  10. using Imaging and for converting images to textures and vice versa.
  11. You need <keyword>OpenGL</keyword> headers for
  12. <keyword>Object Pascal</keyword> to be able to compile this extension.
  13. Headers from <keyword>JEDI-SDL</keyword> (<icode>gl.pas</icode>)
  14. and <keyword>Delphi GL</keyword> (<icode>dglOpenGL.pas</icode>) were
  15. tested and they work.
  16. Extension is implemented in <ref>ImagingOpenGL.pas</ref> unit located
  17. in <keyword>(ImagingRoot)\Source\Extensions</keyword> directory.
  18. To use it simply add this unit to <icode>uses</icode> list of your program.
  19. Currently only 2D textures are supported, DXTC (S3TC) compressed and
  20. floating point textures are created if supported by hardware.
  21. </par>
  22. <par>
  23. Here is the table with <keyword>OpenGL</keyword> functions
  24. currently available.
  25. There is also Imaging <keyword>OpenGL</keyword> demo you can look at
  26. for inspiration <link url="../Demos/Pascal.xml#opengldemo">Object Pascal OpenGL Demo</link>.
  27. </par>
  28. <table>
  29. <title>Imaging OpenGL extension functions</title>
  30. <row><th>Loading Functions</th></row>
  31. <row><td><ref>LoadGLTextureFromFile</ref></td></row>
  32. <row><td><ref>LoadGLTextureFromStream</ref></td></row>
  33. <row><td><ref>LoadGLTextureFromMemory</ref></td></row>
  34. <row><th>Saving Functions</th></row>
  35. <row><td><ref>SaveGLTextureToFile</ref></td></row>
  36. <row><td><ref>SaveGLTextureToStream</ref></td></row>
  37. <row><td><ref>SaveGLTextureToMemory</ref></td></row>
  38. <row><th>Conversion Functions</th></row>
  39. <row><td><ref>CreateGLTextureFromImage</ref></td></row>
  40. <row><td><ref>CreateGLTextureFromMultiImage</ref></td></row>
  41. <row><td><ref>CreateImageFromGLTexture</ref></td></row>
  42. <row><td><ref>CreateMultiImageFromGLTexture</ref></td></row>
  43. <row><th>Other Functions</th></row>
  44. <row><td><ref>GetGLTextureCaps</ref></td></row>
  45. <row><td><ref>GetGLProcAddress</ref></td></row>
  46. <row><td><ref>IsGLExtensionSupported</ref></td></row>
  47. <row><td><ref>ImageFormatToGL</ref></td></row>
  48. </table>
  49. <note>
  50. All <keyword>OpenGL</keyword> textures created by Imaging functions
  51. have default parameters set - that means that no
  52. <icode>glTexParameter</icode> calls are made so default filtering,
  53. wrapping, and other parameters are used. Created textures
  54. are left bound by <icode>glBindTexture</icode> when function is exited.
  55. </note>
  56. </chapter>
  57. </doc>