fRenderToTexC.dfm 5.5 KB

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