David Piuva's graphics engine

On this site, you can download my graphics engine for DirectX 11 with full DirectX 10 hardware support. The core of the engine is written in C++ and the tools are written in Visual Basic for safety and fast development.

System requirements:
Admin access to register the ActiveX component using a batch file.
Graphics card compatible with DirectX 10.0 and shader model 4.
The engine do not use detail tesselation because I have not yet seen

any game that looks any better with detail tesselation activated.

Normal based triangle patches are faster and easier to use.

DirectX 11 compatible version of Windows.

Dynamic dependencies: (Windows and DirectX 11)

KERNEL32.DLL

USER32.DLL

GDI32.DLL

MSIMG32.DLL

COMDLG32.DLL

WINSPOOL.DRV

ADVAPI32.DLL

SHELL32.DLL

COMCTL32.DLL

SHLWAPI.DLL

OLE32.DLL

OLEAUT32.DLL

WINMM.DLL

DSOUND.DLL

D3DX11_42.DLL

D3D11.DLL

OLEACC.DLL

GDIPLUS.DLL

IMM32.DLL

License:
The engine is given out under the zlib open source license. The source code is included in the packet.

Things you need to know:
Programming.Visual Basic 6, 2008 or newer is recomended to use for your projectsbut youneedVB6 formodifying the model editor since converting over 8000 lines would be a real pain.

C# is good if you already know C++ or Java.
Basic linear algebra.Matrix multiplication, cross product, dot product, normalizing...
3D modeling.
How to write HLSL shaders without deep understanding.
How to use MFC ActiveX components in your favourite language.

Design decisions:
Instead of having optimization for small static worlds, this engineis made for procedural generationof large worlds.
Instead of having a lot of obsoleted methods when the engine gets old, asmall list in Upgrade.html that usually is empty will tell you how toemulate old methods orwhat default value to add in a new argument.I only release major versions so that your application is callingthesame version of the engine that the application was tested with.Instead of having many redundant ways to rotate things in the engine, you areassumed to knowbasic linear algebra and just place things where you want them.This improves performance, stability, data visibility and model-view separation.The engine is not intrusive with any high level things that you can make yourselfbecause thatwould be like selling ahalf finished painting as canvas to an artist.Learning how to make games while having fun is more important than selling andthereforthe engine isavailable to multiple languages instead of multiple platforms.

If you prefer a language that is already depending on Windows then you might as well

use a graphics engine that also take advantage of a single deterministic framework.

Games that are both video games and computer games either have to take more than

twice the effort to be created or become another unplayable console port that does not

feel right nor perform fast on a computer. I rather make a game perfect on one platform.

Included:
Formal documentation with explaining images.Preconditions, postconditions and sideeffects are declared.Guides for upgrading, optimizing and debugging.
Examples in Visual Basic 6 that can be converted to newer versions of Visual Basic. The simple example is translated to Visual Basic.NET and C# to show how

It might not work with all applications claiming to support OBJ because every application

choose their own subset of features to support from the full specification.

The importer is an open VB6 module (Importer_WavefrontOBJ.bas) with

less than 400 lines of code that you can modify if your files can't be imported.

See the final result with your own shaders while editing.Create a skeleton and assign vertices to bones.Modify UV coordinates directly.
Modify the source code in Visual Basic 6 to create your own tools.

The SDK include a shader with edge sampling parallax occlusion mapping

that remove the layer artivacts completely at a high performance cost.

A sound encoder/decoder for converting 16 bit wave sounds to the engine's compressed format.The compression ratio and sound quality is near lossless because anything less sounds like crap.

Features:
Foolproof safety using reference numbers instead of pointers to things in the engine.This allow you to be more creative and spend less time on finding errors.
The engine is a self registering ActiveX component and easy to install using a batch file.
Easy to use post effect system for stereoscopic view, bloom and anything else that you canwrite in HLSL.
Draw surfaces with optional built in double buffering allow using the same image as input andoutput to a post effect.An optional copy of the depth buffer allow soft particles for smoke effects with volume light.Reading from the depth buffer in a draw surface makes it possible to make depth of field effects.System for rendering quads with userdefined shaders for drawing lines, rectangles, elipses, text... A built in "Mirrored" property in instances makes it easy to flip faces when you mirror the axis system.Then you can use the same model for left and right shoes and much more.
Transparency using alpha filtering.
Transparency by clipping pixels in HLSL that can be used with depth based shadows.
Native text based model format.
Built in multi resolution in the model gives more triangles close to the camera and fasterrendering speed at a distance.
Up to 16 textures can be used in each material and mixed as you want in HLSL.
Each texture in a model can be replaced by an instance texture so that you can render thesame model with multiple skins.
You can also assign a dynamic texture generated by a camera for monitors and special effects.

CPU buffers can copy data from the graphics card.

This feature was added to support image analysis and general

parallel computations on the GPU using post effect shaders.

Sky instance system that allow one instance to be drawn behind everything else.

Geometry shaders for manipulating the output of the vertex shader per triangle.

Dynamic light with depth based shadows and fully automated artifact removal.
Cutting plane for reflection and refraction by rendering to textures for realistic water andmirror effects.Precompiling shaders automatically allow a game to start in less than half a second.A built in bone animation system allow you to place each bone using your own code.Each vertex can be assigned to at most one bone to keep it fast, simple and memory efficient.Bone data in the model will help you to know how the bones should be aligned to their parents.

Quality assurance:

About 10% of the engine has been proven correct with methods used for safety critical systems.

This could only be done on pure functions that don't rely on undefined hardware behaviour.

This is not measured exactly in lines of code since the interface have lots of duplicated code.

About 20% of the engine has passed millions of automatically generated test cases.

This was done on the sound compression back end and the implementation of the

already known to be correct HeapSort.

The whole engine is scanned for common mistakes using automated static analysis.

The interface methods are inspected using checklists.

New components are module tested before integrated with the engine.

For a new version to be released, it must pass 14 days of testing without

finding any errors unless I have not added any new features.

Why I know how to make a graphics engine:I have made about 250 computer games since I was a child and one of the gameswas nominated for bestexecution at the "Swedish Game Awards" 2008.I have a 4 year master degree in computer science (Filosofie Magister) from Uppsala University.

ContactYou can send reports about bugs or usability problems on the Google code project.

One reported bug save 9 months of testing because they are few and hard to find.