Test MP4-video
Test MP4-video2
Test MP4-video3
Needed software components are:
- VisualStudioCommunity. It installs both IDE and command line compillation tools and environment. For VSC you need to download some libraries shown in screenshot:
- For command line compillation you need text editor, Notepad at minimum (which I was using for developing time over 90% of the library).
Command line compiling or IDE compiling
1. 3D11CLANG.lib -interface is for C programmers.
Library is to be included in the graphical C program (not C++) to enable 3D-graphics in Windows.
As only to mention some property, library supports at maximum 5 automatically selected dynamic "most significant" light sources per object and their shadows. The total amount of scene light sources can be high. Objects are automatically sorted.
2. Compillation environment
3. Basics of usage
Everything is based on handles (HMESH, HTEXTURE, HMATERIAL, HOBJECT). NOTE: In many cases one handle can be used in many consumers; such as one texture is usable in different materials. Objects can be individually located, rotated and scaled.
3.1 Init/Deinit 3D-interface at nutshell:
Direct3D11HardwareInit()
Direct3D11SoftwareInit()
SetDepthClearColor()
SetEyeTargetAndUp()
Texture loading, Material, Mesh and ObjectCreation...
MessageLoop with PeekMessage() updating scene and calling finally RenderScene() for direct3d to draw internally
DeinitializeDirect3D11()
3.2 Example flow
- CreatePrimitiveMesh( &hMesh ) is the heart of the interface. Through it all meshes whether preset or user defined are created.
- LoadTextureFromFile/Memory( &hTexture ). Memory loading is handy if you plan to construct centralized file containing numerous textures to load.
Geometry0---------------------+ | Texture0---->| | Texture1---->|Material0---->Mesh0---->Object0 TextureN---->| Geometry0----------------------+ Geometry1--------------------+ | | | Texture0---->| | | Texture1---->|Material1---->Mesh1---->Object1 TextureN---->| |Material2----->| | Texture0------>|- create light(s)
3.3 Movements
Handle3DView() or SetEyeTargetAndUp()
3.4. Resizing:
ResizeGraphicsWindow()
3.5. Screenshot or other processing of swapbuffer
ReadSwapBufferPixels()
4. Listing of interface functions and some other headers
- Interface functions are located in cinterface.h.
- Primitive-level structs are in primitives.h
- vectormin.h is a part of my very old C mathematics routine set (mainly OpenGL right-handed functions). Since you are most likely to use your own mathematics library, I left vectormin as it was.
- defsmin.h is an old relict for error codes and small miscellaneous items
d3d11toCLANG.lib Library and PDF-manual downloading
TestApp_05082024.zip release v2.0 (5.8.2024) First actual release.
TestApp1_21072024.zip early release v1.9 (21.7.2024) Minor code fixes in shadowing.
TestApp1_18072024.zip early release v1.8 (18.7.2024) Manual draft. Minor code fixes.
TestApp1_13072024.zip early release v1.7 (13.7.2024) Multimaterial mesh draft. Environment and shadow map optimizations.
TestApp1_10072024.zip early release v1.6 (10.7.2024) Environment reflection rewriting. Reflection optimizations.
TestApp1_05072024.zip early release v1.5 (5.7.2024) Shadow biasing theory, many shadow fixes done.
TestApp1_29062024.zip early release v1.4 (29.6.2024) I had to rewrite majority of the code. New optimization algorithms are under development.
TestApp1_16062024.zip early release v1.3 (16.6.2024) Resizing practically solved. Texture coordinate fixing due to corrected matrices.
TestApp1_13062024.zip early release v1.2 (13.6.2024) Matrices and moving are corrected and almost synchronized. Minimum functionality.
TestApp1_11062024.zip early release v1.1 (11.6.2024) Most of the cascading matrix errors fixed. Still minimum functionality until major faults have been corrected.
TestApp1_07062024.zip early release v1.0 (7.6.2024) Found severe cascading matrix error; will be fixed propably in v1.2.
Roadmap to D3DtoC library project:
- v1.x majorily my tests and learning with D3D11 limitations. Not really yet usable library. Changes are made to interface layer.
- v2.x should be the first usable versioning although still tests and limitations.
- v3.x should be usable and stable enough with new properties like particles under development. Strongly fixing API to C-programmers.
- v4.x development of D-BSP, areal subloading or some other mechanisms enabling buildings and larger geometric structures at some point.
- v5.x new properties such as post processing buffers.
NOTE: This project has just been started and is at demo phase, so there are numerous errors. When I manage to move forward, errors will diminish and functionality will improve. Also using of this library might be a bit easier when I polish major programming paradigms.
NOTE: After downloading, main.exe cannot be run due to virusscan. That is normal behaviour. Instead remake main.exe by running appmk.bat. After that the new main.exe is runnable.
Skybox in the example is from https://www.humus.name.
NOTE: Remember to always virusscan executable files or packed files containing exefiles (or libraries)!