fRenderToTexture.dfm 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. object Form1: TForm1
  2. Left = 0
  3. Top = 0
  4. Caption = 'Render To Texture'
  5. ClientHeight = 480
  6. ClientWidth = 800
  7. Color = clBtnFace
  8. Font.Charset = DEFAULT_CHARSET
  9. Font.Color = clWindowText
  10. Font.Height = -11
  11. Font.Name = 'Tahoma'
  12. Font.Style = []
  13. OldCreateOrder = False
  14. OnCreate = FormCreate
  15. PixelsPerInch = 96
  16. TextHeight = 13
  17. object GLSceneViewer1: TGLSceneViewer
  18. Left = 0
  19. Top = 0
  20. Width = 696
  21. Height = 480
  22. Camera = GLCamera1
  23. Buffer.BackgroundColor = clGray
  24. FieldOfView = 156.463424682617200000
  25. PenAsTouch = False
  26. Align = alClient
  27. TabOrder = 0
  28. end
  29. object Panel1: TPanel
  30. Left = 696
  31. Top = 0
  32. Width = 104
  33. Height = 480
  34. Align = alRight
  35. TabOrder = 1
  36. object Label1: TLabel
  37. Left = 6
  38. Top = 8
  39. Width = 60
  40. Height = 19
  41. Caption = 'Options'
  42. Font.Charset = DEFAULT_CHARSET
  43. Font.Color = clWindowText
  44. Font.Height = -16
  45. Font.Name = 'Arial'
  46. Font.Style = [fsBold]
  47. ParentFont = False
  48. end
  49. object CheckBox1: TCheckBox
  50. Left = 6
  51. Top = 128
  52. Width = 57
  53. Height = 17
  54. Caption = 'VSync'
  55. TabOrder = 0
  56. OnClick = CheckBox1Click
  57. end
  58. object RadioGroup1: TRadioGroup
  59. Left = 6
  60. Top = 151
  61. Width = 91
  62. Height = 89
  63. Caption = 'Texture size'
  64. ItemIndex = 2
  65. Items.Strings = (
  66. '256x256'
  67. '512x512'
  68. '2048x2048')
  69. TabOrder = 1
  70. OnClick = SBClick
  71. end
  72. object RadioGroup2: TRadioGroup
  73. Left = 6
  74. Top = 33
  75. Width = 91
  76. Height = 89
  77. Caption = 'Texture frame'
  78. ItemIndex = 0
  79. Items.Strings = (
  80. '1:1'
  81. '1:2'
  82. '1:10')
  83. TabOrder = 2
  84. OnClick = RBClick
  85. end
  86. end
  87. object GLScene1: TGLScene
  88. Left = 32
  89. Top = 24
  90. object GLLightSource1: TGLLightSource
  91. Ambient.Color = {9A99993E9A99993E9A99993E0000803F}
  92. ConstAttenuation = 1.000000000000000000
  93. Position.Coordinates = {0000A0400000A0400000A0400000803F}
  94. Specular.Color = {0000803F0000803F0000803F0000803F}
  95. SpotCutOff = 180.000000000000000000
  96. end
  97. object GLDirectOpenGL1: TGLDirectOpenGL
  98. UseBuildList = False
  99. OnRender = GLDirectOpenGL1Render
  100. Blend = False
  101. end
  102. object GLFBORenderer1: TGLFBORenderer
  103. Active = False
  104. Width = 2048
  105. Height = 2048
  106. ColorTextureName = 'pong'
  107. MaterialLibrary = GLMaterialLibrary1
  108. BackgroundColor.Color = {0000803F00000000000000000000803F}
  109. ClearOptions = [coColorBufferClear, coDepthBufferClear]
  110. Camera = GLCamera1
  111. SceneScaleFactor = 512.000000000000000000
  112. RootObject = GLCube1
  113. EnabledRenderBuffers = [erbDepth]
  114. AfterRender = GLFBORenderer1AfterRender
  115. end
  116. object GLFBORenderer2: TGLFBORenderer
  117. Active = False
  118. Width = 2048
  119. Height = 2048
  120. ColorTextureName = 'ping'
  121. MaterialLibrary = GLMaterialLibrary1
  122. BackgroundColor.Color = {0000803F00000000000000000000803F}
  123. ClearOptions = [coColorBufferClear, coDepthBufferClear]
  124. Camera = GLCamera1
  125. SceneScaleFactor = 512.000000000000000000
  126. RootObject = GLCube1
  127. EnabledRenderBuffers = [erbDepth]
  128. AfterRender = GLFBORenderer2AfterRender
  129. end
  130. object GLCube1: TGLCube
  131. Material.MaterialLibrary = GLMaterialLibrary1
  132. Material.LibMaterialName = 'ping'
  133. CubeSize = {000000400000004000000040}
  134. end
  135. object GLCamera1: TGLCamera
  136. DepthOfView = 100.000000000000000000
  137. FocalLength = 50.000000000000000000
  138. TargetObject = GLCube1
  139. Position.Coordinates = {0000004000000040000000400000803F}
  140. end
  141. end
  142. object GLCadencer1: TGLCadencer
  143. Scene = GLScene1
  144. OnProgress = GLCadencer1Progress
  145. Left = 32
  146. Top = 72
  147. end
  148. object GLMaterialLibrary1: TGLMaterialLibrary
  149. Materials = <
  150. item
  151. Name = 'ping'
  152. Tag = 0
  153. Material.DepthProperties.DepthClamp = True
  154. Material.Texture.ImageClassName = 'TGLBlankImage'
  155. Material.Texture.Image.ColorFormat = 6408
  156. Material.Texture.TextureMode = tmModulate
  157. Material.Texture.FilteringQuality = tfAnisotropic
  158. Material.Texture.Disabled = False
  159. end
  160. item
  161. Name = 'pong'
  162. Tag = 0
  163. Material.Texture.ImageClassName = 'TGLBlankImage'
  164. Material.Texture.Image.ColorFormat = 6408
  165. Material.Texture.TextureMode = tmModulate
  166. Material.Texture.FilteringQuality = tfAnisotropic
  167. Material.Texture.Disabled = False
  168. end>
  169. Left = 160
  170. Top = 24
  171. end
  172. object Timer1: TTimer
  173. OnTimer = AsyncTimer1Timer
  174. Left = 160
  175. Top = 80
  176. end
  177. object GLSimpleNavigation1: TGLSimpleNavigation
  178. Form = Owner
  179. GLSceneViewer = GLSceneViewer1
  180. FormCaption = 'RenderToTexture - %FPS'
  181. KeyCombinations = <
  182. item
  183. ShiftState = [ssLeft, ssRight]
  184. Action = snaZoom
  185. end
  186. item
  187. ShiftState = [ssLeft]
  188. Action = snaMoveAroundTarget
  189. end
  190. item
  191. ShiftState = [ssRight]
  192. Action = snaMoveAroundTarget
  193. end>
  194. Left = 288
  195. Top = 24
  196. end
  197. end