Get yer Render 2 Texture Module Here!!

BlitzMax Forums/BlitzMax Programming/Get yer Render 2 Texture Module Here!!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

in the interests of knowing if i'm using this right, does this make effective use of what the module can achieve?



Strict
Import Indiepath.Render2Texture

Graphics 512,512,0

tRender.Initialise()

Local particleX#[36,100]
Local particleY#[36,100]
Local particleVelocity#=2
Local particleRadius#[36,100]
Local particleAngle#[36,100]
Local particleExists[36,100]
Local i=0
Local o=0
Local ms=MilliSecs()


Local image1:TImage = tRender.Create(512,512)


Global Milisegundos:Int=MilliSecs() 
    Global Fps_Contador:Int=0 
    Global Fps:Int=0 

'set particles into a number of rings

For  i=0 To 35
	For  o=0 To 99
	
	'angle is set so one particle is placed every 10 degrees
	particleAngle[i,o] = i*10
	'and each ring is place ten pixels behing the one in front
	particleRadius[i,o] = -o*10
	
	Next
Next

While Not KeyHit(key_escape)
	
tRender.TextureRender_Begin(image1)
	tRender.BackBufferRender_Begin()
		SetAlpha 0.99
		SetColor 255,0,255
		SetBlend lightblend
	  	DrawImage image1,-10,0
		
		
		For i=0 To 35
			For o=0 To 99
					particleRadius[i,o]=particleRadius[i,o]+particleVelocity
				
					particleAngle[i,o]:+0.1'particleAngle[i,o]+particleVelocity*o/2
				
					particleX[i,o]=(Cos(particleAngle[i,o])*particleRadius[i,o])+320
					particley[i,o]=(Sin(particleAngle[i,o])*particleRadius[i,o])+240
				
					If particleRadius[i,o]>=320
						particleRadius[i,o] = -particleRadius[i,o]
					End If 
				
					If particleRadius[i,o]>=0
						DrawOval particleX[i,o],particley[i,o],3,3
					End If
			Next
		Next
	
	tRender.BackBufferRender_End()
tRender.TextureRender_End()	

Flip 0
Cls
Wend