VividGL 2D Stress test.

Community Forums/Showcase/VividGL 2D Stress test.

AntonyWells(Posted 2004) [#1]
This is a little 2d stress test, with fps counter.
Install to any dir and run the .exe, all media is included.

[Link fixed. Thanks Amon. :)]
http://www.excess.eclipse.co.uk/V2D_StressTest.exe - 1.7mb, proper installer this time around.

Here's the same demo, but with masking on the texture quad.
http://www.excess.eclipse.co.uk/VividGL_2DExample8.zip (.exe only, needs demo 1)

Just copy the .exe and new image into the dir you installed the above demo.

It blits 1,000 32x32 2d(Rendered using 3d hardware)
per Frame. Also it blits a texture quad you can resize
with the mouse in real time.

On my p-800, budget 64bit g5, I get around 300fps. An average of 300,000 blits per second.

I did a quick rewrite in b3d, using regular b3d rects and it gets 63fps. And that's not including the textured real time scaling quad, which isn't possible with b3d's 2d funcs.

Also shows how textures in vivid are 2d and 3d, as the same texture could be used on a model without altering.

Source code for the demo is

;
;2D Stress test.
;
Include "Includes\VividGL_Lite.bb"
Graphics_Init(640,480,16,2)  ;-- [ Setup screen
Graphics_Setbuffer Graphics_Back() ;-- [ Set our backbuffer.

test=Texture_Load ("Test.Jpg")
If test=0 RuntimeError "Could not load test.jpg, please re-install"

Texture_Blend test,1
Texture_Rotate test,0,0,180 ;3D Rotation instead of 1d.
Const Rects_Per_Frame=1000 ;How many rects to render each frame.

While Not KeyDown(1)
Render_Cls(False)
	Lock_2D()
	Render_Color(200,200,200,1)
	Render_Begin()
	   j=0
           While j<Rects_per_Frame:j=j+1
	       Render_QuadFast(Rnd(640),Rnd(480),32,32)
	   Wend
	Render_End()
	Texture_Push()
	Texture_Activate test,0
			Render_Quad(100,100,MouseX()-100,MouseY()-100)
	Texture_Pop()
	Unlock_2D()
	;-Work out frames per second. You don't have to do this.
	If ms>ls
		ls=ms+1000
		fps=frames
		frames=0
	Else
		frames=frames+1
		ms=MilliSecs()
	EndIf
	;---
		Text_Out(1,1,fps,0,0)
	Render_Flip(False)
Wend



GameCoder(Posted 2004) [#2]
I get 790 fps fastest and 690 fps slowest.

Cool :)

[edit] on the link you have for the download, there is a minus after the .exe which brings you to a file not found error.


Mo(Posted 2004) [#3]
Works, 550-600 Fps(amd TB 1.2 ghz, g4ti-4400).


TartanTangerine (was Indiepath)(Posted 2004) [#4]
For some reason the FPS is capping out at the monitor refresh of 85Hz.. But yer code says flip false???

2.8Ghz P4(800Mhz FSB)- 2GB DDDR (Dual Channel RAM) - Asus P4P800 - fx5200 Ultra 128MB


AdrianT(Posted 2004) [#5]
Both work for me (I'm assuming its supposed to be lots of light grey overlapping rectangles behind the newsletter?

Anway 75fps with both versions

Vsynch off and its:

490 - 530 fps for the first exe and about the same for the second too.


dangerdave(Posted 2004) [#6]
I get around 700 for both.

But, it is supposed to be just flashing grey boxes in the background?

The BlitzNews picture shows up fine and is resizable.


Just curious.


dangerdave(Posted 2004) [#7]
Nevermind. just looked at the source.
It seems that what I am supposed to see.


AntonyWells(Posted 2004) [#8]
Yeah, they could easily be textured though, just the same as the blitz news one.

About the V-Sync, I think you'll have to disable it by driver, if vivid's not doing it. Gl/dx usually have seperate vsync settings(On nvidia cards anyway, dunno about ati) and gl is usually in 'force vsync' mode by default.(Driver settings overide app settings)


Shambler(Posted 2004) [#9]
750-900 here sir.


TartanTangerine (was Indiepath)(Posted 2004) [#10]
Well that is wierd, I've changed the nvidia setting and the thing is still running 85Hz in a desktop window.


mrtricks(Posted 2004) [#11]
locked to vsync here too - 72fps.


mongia2(Posted 2004) [#12]
769 fps


Picklesworth(Posted 2004) [#13]
first one runs a bit randomly in FPS terms at about 580 - 630. Second one is a nice smooth 608 - 638
I have a Radeon 9600 pro, with Athlon XP 2500+ and lots of ram.