fRenderToTexD.dfm 5.1 KB

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