<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>

<!--
Particle simulation with compute shaders.

Adapted from the OpenGL Programming Book 8th Edition
Pages 637 - 642
-->

<geexlab>
	
  <window name="win3d01" title="Particle Simulation: Compute Shaders + SSBO" 
          width="1280" height="720" 
          gl_version_major="4" gl_version_minor="3" gl_core_profile="1" gl_debug_profile="0" />



<gpu_program name="particle_prog" filename_vs="shaders/particle_vs.glsl" livecoding_vs="0" filename_ps="shaders/particle_ps.glsl" livecoding_ps="0" />          
<gpu_program name="color_prog" filename_vs="shaders/color_vs.glsl" livecoding_vs="0" filename_ps="shaders/color_ps.glsl" livecoding_ps="0" />          

<!--
http://www.opengl.org/registry/specs/ARB/compute_shader.txt
-->
<!--
<gpu_program name="compute_prog" filename_cs="shaders/compute.glsl" livecoding_cs="0"  />          
-->
  
<script name="init_scene" run_mode="INIT" filename="init.lua" />

<script name="update_scene" run_mode="FRAME" filename="frame.lua" livecoding="1" />
	

<script name="resize_scene" run_mode="SIZE" >
		<raw_data><![CDATA[	

winW, winH = gh_window.getsize(0)

local aspect = 1.333
if (winH > 0) then
  aspect = winW / winH
end  

gh_camera.update_persp(camera, 60, aspect, 0.1, 1000.0)
gh_camera.set_viewport(camera, 0, 0, winW, winH)

gh_camera.update_ortho(camera_ortho, -winW/2, winW/2, -winH/2, winH/2, 1.0, 10.0)
gh_camera.set_viewport(camera_ortho, 0, 0, winW, winH)

ResetParticles()


		]]></raw_data>
	</script> 
  
  
</geexlab>
