OpenGL.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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
  14. <keyword>Delphi GL</keyword> (<icode>dglOpenGL.pas</icode>),
  15. <keyword>JEDI-SDL</keyword> (<icode>gl.pas</icode>), and
  16. <keyword>GLScene</keyword> (<icode>gl.pas</icode>)
  17. were tested and they work.
  18. Extension is implemented in <ref>ImagingOpenGL.pas</ref> unit located
  19. in <keyword>(ImagingRoot)\Source\Extensions</keyword> directory.
  20. To use it simply add this unit to <icode>uses</icode> list of your program.
  21. Currently only 2D textures are supported, DXTC/S3TC and 3Dc compressed, and
  22. floating point textures are created if supported by hardware.
  23. </par>
  24. <par>
  25. Here is the table with <keyword>OpenGL</keyword> functions
  26. currently available.
  27. There is also Imaging <keyword>OpenGL</keyword> demo you can look at
  28. for inspiration <link url="../Demos/Pascal.xml#opengldemo">Object Pascal OpenGL Demo</link>.
  29. </par>
  30. <table>
  31. <title>Imaging OpenGL extension functions</title>
  32. <row><th>Loading Functions</th></row>
  33. <row><td><ref>LoadGLTextureFromFile</ref></td></row>
  34. <row><td><ref>LoadGLTextureFromStream</ref></td></row>
  35. <row><td><ref>LoadGLTextureFromMemory</ref></td></row>
  36. <row><th>Saving Functions</th></row>
  37. <row><td><ref>SaveGLTextureToFile</ref></td></row>
  38. <row><td><ref>SaveGLTextureToStream</ref></td></row>
  39. <row><td><ref>SaveGLTextureToMemory</ref></td></row>
  40. <row><th>Conversion Functions</th></row>
  41. <row><td><ref>CreateGLTextureFromImage</ref></td></row>
  42. <row><td><ref>CreateGLTextureFromMultiImage</ref></td></row>
  43. <row><td><ref>CreateImageFromGLTexture</ref></td></row>
  44. <row><td><ref>CreateMultiImageFromGLTexture</ref></td></row>
  45. <row><th>Other Functions</th></row>
  46. <row><td><ref>GetGLTextureCaps</ref></td></row>
  47. <row><td><ref>GetGLProcAddress</ref></td></row>
  48. <row><td><ref>IsGLExtensionSupported</ref></td></row>
  49. <row><td><ref>ImageFormatToGL</ref></td></row>
  50. </table>
  51. <note>
  52. All <keyword>OpenGL</keyword> textures created by Imaging functions
  53. have default parameters set - that means that no
  54. <icode>glTexParameter</icode> calls are made so default filtering,
  55. wrapping, and other parameters are used. Created textures
  56. are left bound by <icode>glBindTexture</icode> when function is exited.
  57. </note>
  58. </chapter>
  59. </doc>