~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to tests/videoDriver.cpp

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2008-2011 Colin MacDonald, Christian Stehno
 
2
// No rights reserved: this software is in the public domain.
 
3
 
 
4
#include "testUtils.h"
 
5
 
 
6
using namespace irr;
 
7
using namespace core;
 
8
 
 
9
/** Test various things in video drivers. */
 
10
bool testVideoDriver(video::E_DRIVER_TYPE driverType)
 
11
{
 
12
        IrrlichtDevice *device =
 
13
                createDevice(driverType, dimension2d<u32>(160, 120));
 
14
 
 
15
        if (!device)
 
16
                return true;
 
17
 
 
18
        video::IVideoDriver* driver = device->getVideoDriver();
 
19
        logTestString("Testing driver %ls\n", driver->getName());
 
20
        logTestString("MaxTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxTextures"));
 
21
        logTestString("MaxSupportedTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxSupportedTextures"));
 
22
        logTestString("MaxLights: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxLights"));
 
23
        logTestString("MaxAnisotropy: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxAnisotropy"));
 
24
        logTestString("MaxUserClipPlanes: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxUserClipPlanes"));
 
25
        logTestString("MaxAuxBuffers: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxAuxBuffers"));
 
26
        logTestString("MaxMultipleRenderTargets: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxMultipleRenderTargets"));
 
27
        logTestString("MaxIndices: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxIndices"));
 
28
        logTestString("MaxTextureSize: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxTextureSize"));
 
29
        logTestString("MaxGeometryVerticesOut: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxGeometryVerticesOut"));
 
30
        logTestString("Version: %d\n", driver->getDriverAttributes().getAttributeAsInt("Version"));
 
31
        logTestString("ShaderLanguageVersion: %d\n\n", driver->getDriverAttributes().getAttributeAsInt("ShaderLanguageVersion"));
 
32
 
 
33
        device->closeDevice();
 
34
        device->run();
 
35
        device->drop();
 
36
        return true;
 
37
}
 
38
 
 
39
bool videoDriver()
 
40
{
 
41
        bool result = true;
 
42
        TestWithAllDrivers(testVideoDriver);
 
43
        return result;
 
44
}