MainComputersProgrammingGraphics › Broadwell's SDL Trislam Benchmark

Broadwell's SDL Trislam Benchmark

Edit Page
Report
Scan day: 03 March 2014 UTC
93
Virus safety - good
Description: Source code for benchmarking SDL's OpenGL library. Compares triangles, tri-strips, quads, quad-strips and vertex arrays.
#!/usr/bin/perl # Copyright (c) 2004-2005, Geoff Broadwell; this script is released # as open source and may be distributed and modified under the terms # of either the Artistic License or the GNU General Public License, # in the same manner as Perl itself. These licenses should have been # distributed to you as part of your Perl distribution, and can be # read using `perldoc perlartistic` and `perldoc perlgpl` respectively. use strict; use warnings; use SDL::App; use SDL::Constants; use SDL::Event; use SDL::OpenGL; use Time::HiRes 'time'; our $VERSION = '0.1.17'; ### USER CONFIG # Primitive sizes (and therefore counts) are integer divisors of # (A^i * B^j * C^k ...) where good A, B, C, ... are relatively prime; # this number is used for the draw area height and width and defaults to # 2^4 * 3^2 * 5 = 720 my @max_powers = (2 => 4, 3 => 2, 5 => 1); # my @max_powers = (16 => 1, 9 => 1, 5 => 1); # Maximum quads along each axis for known slow versus usually fast tests; # chosen to be somewhat reasonable for most common settings of @max_powers my $max_count_slow = 60; my $max_count_fast = 154; # True to attempt to switch to in fullscreen mode my $full_screen = 0; # Frames to render per test run (== combination of method and primitive count) my $frames_per_run = 100; ### METHODS TO BENCHMARK my %va_types = ( quad => \&make_quads_va, tri => \&make_tris_va, qs => \&make_qs_va, ts => \&make_ts_va, ); my %dl_types = ( qs => \&draw_qs, ts => \&draw_ts, qs_va => \&draw_qs_va, ts_va => \&draw_ts_va, ); my @tests = ( [empty => \&draw_empty, \&stats_empty, 'single', [0 , 0 , 0 ]], [q => \&draw_quads, \&stats_quads, 'slow', [.5, 0 , 0 ]], [t => \&draw_tris, \&stats_tris, 'slow', [.6, .4, 0 ]], [qs => \&draw_qs, \&stats_qs, 's
Size: 2048 chars

Contact Information

Email:
Phone&Fax:
Address:
Extended:

WEBSITE Info

Page title:
Keywords:
Description:
IP-address:64.62.159.92

WHOIS Info

NS
Name Server:NS1.HE.NET
Name Server:NS2.HE.NET
Name Server:NS3.HE.NET
Name Server:NS4.HE.NET
Name Server:NS5.HE.NET
Name Server: Name Server: Name Server:
Name Server: Name Server: Name Server:
WHOIS
Status: clientTransferProhibited
Date
Creation Date: 1998-04-20T04:00:00Z
Expiry Date: 2014-04-19T04:00:00Z