fRenderToTexD.dfm 5.6 KB

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