Description
TextureMind Framework is written in C++ language and it has been designed for the development of a wide range of cross-platform applications in C++ language. The framework is composed by a set of classes to facilitate multi-threading, serialization, ipc, networking, graphics and computer vision. The framework comes along applications to speed-up the creation of images, animations, GUIs and videogames. It has been coded by me from scratch with the aim of reaching the highest standards after years of professional experience in the field of computer programming.
Background
TextureMind Framework derives from an old abandoned framework programmed by me that was called CJS Framework. The initial aim was to create an opensource project for multiple target languages, with a valid and interchangable architecture for data structure serialization. After years of development, the framework was renamed to TextureMind Framework and developed only in C++ in the form of a closed source project. The aim to cover multiple target languages has been abandoned for developing other aspects, like graphics with GPU rendering, shader programming, advanced GUI, audio, 3D engines and so on. TextureMind Framework integrates also another abandoned framework developed by me in 8 years (2004-2012) which is called Unrelated Framework, for a total of about 20 years of development. The framework is now so advanced and well structured (thanks to a super-modular architecture with a custom variant of serializable component object model) that can be used already to develop professional applications and video games with modern GPU graphics. It has been used to create DWorkSim for executing benchmark tests of GPU instances like g5 or g6 during my job experience in AWS / EC2.
Basic principles
- Few dependencies. Most modern applications are gigantic bundles of third-party dependencies. While the adage “avoid reinventing the wheel” may be true, it is also true that including myriads of external projects into a single one only complicates build maintenance, increasing build times and portability to other platforms. To avoid this, I set myself the goal of using as few external dependencies as possible, even at the cost of reinventing many little wheels within a single huge consistent project. As reward, the entire framework takes only 3 minutes and a half to build in release mode, while other similar projects may take hours.
- Robustness. Everything in the framework has been programmed from scratch to guarantee robustness in the basic operations, like memory management, containers, data structures, parsing and serialization. The framework has been used to create other applications for years and the basic functionalities have been stress-tested with billions of iterations. The serialization format used to save data never crashes even if you replace bytes with salt and pepper noise.
- Consistency. The framework has been entirely coded in C++ with the less number of external libraries possible. Not even the Standard Template Library has been used, to prefer a custom implementation with an higher degree of control. A modular architecture has been used to avoid monoliths and to create plugins: multiple executables in the same project can share code with dynamic libraries. On Windows, the CRT have been included in the build because the software architecture allows it, so you don't have to install Microsoft redistributables to make it work, You can run even in a clean Windows installation without having to install anything else.
- Simplicity. Complexity exists only when something is done badly or is poorly done. The entire framework was created with the goal of being simple and making life easier for those who use it. Everything must be about simplicity, from programming to projects building, installation, application usage and configuration.
- High performance. All the algorithms and solutions have been designed for working with the highest performance, without having to rely on expensive hardware.
- Low resources. The applications created with the framework must work at best with the minimum requirements possible in terms of hardware, memory and CPU usage. What can be executed with the GPU must provide always a via-software alternative to run on GPU-less machines: this is important to reduce the costs if you are dealing with paid virtual machines in a cloud service.
- Scalability. The framework could be used to create a wide range of software, from the pacman clone to client/server applications, interposition libraries or games with unreal engine 5 graphics. It can build on a wide range of platforms with different requirements, from the oldest to the latest operating systems. For example, an application could start on Windows 7 but also on Windows 11, or maybe it may have a build for Raspberry PI or, even more extremely, for AmigaOS 4.1.
- Hard-work. The entire framework has been developed over the years by one person (me), making difficult choices that would only pay off after a huge amount of effort and without ever compromising or taking shortcuts. This has paid off a lot over time, and will probably be the key to success for the entire project in the future, given that the modern trend tends in the opposite direction.
- Passion. The framework is not born with the purpose of making money, building fame and popularity, but with the purpose of creating something beautiful for the pure pleasure of doing it. Programming is not seen as a mere tool to achieve a goal but as a pure form of art, without giving up the highest standards of modern computer science.
- No greed for money. The framework will also be used for commercial projects but not for the greed of making money. If it works well, otherwise so be it. No big company will ever be able to get their hands on this project to make it their playground, so it will always be true to its basic principles. This project will never use clickbait, advertizing or clever gimmicks to attract users' attention: if it gets noticed it will only be thanks to the quality of the results obtained.
Systems
Current support:
- Windows
- Linux
Planned future support:
- MacOS
- Android
- iOS
- Raspberry PI
- Windows on Arm
- AmigaOS 4.1
Dependencies
- Cairo
- Vulkan
- AssImp
- OpenAL
- libOgg
- libVorbis
Applications
What are the best features of TextureMind Framework?
Architecture
- A modular object-oriented architecture based on a custom variant of serializable component object model
- A plugin system based on coherent component module dependencies
- Core functionalities with zero external dependencies
- Create a single exe application or split into multiple dll modules
Serialization
- An abstraction layer for extending serialization to a virtually unlimited number of formats
- Built-in serialization in raw, json and xml formats
- A proprietary binary format (similar to protobuf) for portable forward and backward compatible serialization of structured data
Script languages
- A custom parser to analyze and re-interpret different programming languages, like ansi c or javascript
- An abstraction layer to compile and execute at runtime (or jit) a virtually unlimited number of programming languages
- Built-in support for Ansi C through TinyC library
- Possibility to access framework's functionality through programming languages
Graphics
- An abstraction layer for 2D and 3D rendering
- Built-in implementation with Vulkan and Cairo libraries
- An extremely modular material system based on visual expression nodes
- Materials are dinamically converted into SPIR-V binaries with shaderc library
- Material nodes can be programmed in a GLSL variant compatible with ShaderToy
- Bitmap and outline font rendering
- Skinned mesh animated via GPU
- Particle system, Lighting, PBR, LOD
- Real-time raytracing with RTX technology
Audio
- An abstraction layer for 2D and 3D audio rendering
- Built-in implementation with OpenAL Soft
- GPU interoperability, support for audio shader
2D and 3D Engines
- Specialize engines into different directions (Graphics, Audio, Physics)
- A proprietary 3D mesh format fully compatible with all the existing formats
- Static and dynamic resources management for Textures, Materials and Templates
- 2D and 3D scene formats
- An animation system based on key-frames where every variable can be animated with linear and spherical interpolation
- A template system for supporting animated characters and to avoid redundancy
- An abstraction layer to import 3D models
- Import any 3D model with built-in assimp library implementation
GUI
- An advanced and fully skinnable widget system
- An abstraction layer for CPU and GPU rendering
- Full deterministic control over rendered frames
- Can be used to create both applications and games
- Built-in composed widgets like form windows, text editors, treeviews, comboboxes, menus, tabstrips and toolbars
- Support for display scaling on Windows and fractional scaling on Linux
Backlog
- Implement a script in python to download binaries considering CPU arch, OS and distro
- Use meson to build the entire framework and all the internal projects on Linux
- Build the external dependencies on Linux / Ubuntu, upload the binaries in the external database
- Fix all the build errors on Linux
- Implement the entire window and event system on Linux
- Fix glitches, segfaults and mistakes on Linux
- Refactor the entire font system to work on both Windows and Linux
- Make Cairo module work on Linux
- Make Vulkan module work on Linux
- Refactor swapchain resize with Vulkan on Windows and Linux
- Make keyboard functionalities work on Linux
- Cleanup geometry module from unused and complex classes
- Implement a new system for path rendering
- Implement basic classes for 2D and 3D geometries
- Implement element 2D classes to handle Rounded Rect, Circle, Ellipse, Arc, Path2D, Spline2D
- Implement path 2D commands compatible with SVG format
- Implement a parser of SVG path format and render an imported path
- Introduce ShapeGenerator and CollisionDetector components
- Implement abstraction layer for audio context
- Implement AudioTrack and Sample classes to manage sound
- Load audio tracks from wav and ogg vorbis files
- Implement audio context with OpenAL Soft
- Create samples from audio tracks for OpenAL Soft
- Execute multiple samples at the same time
- Control normal and loop sound execution with a system based on events
- Support from Stereo to Dolby Surround 7.1
- Control multiple sound execution in a virtual environment with virtual 3D speakers
- Create Gui Editor application
- Manage skins, gui pages and resources
- Create new widgets inside the gui page
- Support single and multiple selections
- Move, Rotate and Scale selected widgets
- Make resources portable into objects which make use of them
- Cut & paste objects along used resources with system clipboard
- Do not duplicate resources with the same content during cut & paste operations
- Implement PropertyView widget
- Optimizations and bug fixes
- Implement FrameWindows, TreeViews, TabStrips, ToolBars and DockingLayouts
- Totally dynamic resources management
- Cleanup and optimize draw calls, fix bugs
- Implement ListViews and ListItems
- Fix mistakes and glitches in the GUI
- Improve event callbacks
- Implement texture atlas
- Optimize performance with Vulkan
- Implement Menus and ComboBoxes
- Move ShaderC implementation from Vulkan module to a separate module
- Improve internal architecture for lexer and parser of any language
- Implement a lexer for textual languages
- Implement generic parser formal and non formal languages with all the AST nodes
- Implement an AnsiC parser with the full set of C89 standard ISO features
- Implement TextBox widget
- Introduce a new uniform type for changing the texture used by a material in real-time, without performance impact
- Implement a code path for setting Cursor and Selection material layers in Text shape drawing attribute
- Implement a code path for changing the widget background, cursor and selection aspect in real-time
- Introduce multiple-selection with cut & paste
- Implement clip-board functionality to copy unicode characters into the system clipboard
- Cleanup containers and object classes
- Reorganize data structures, make private all the public data members
- Refactor the entire framework to support object interfaces with COM style
- Divide the framework into dynamic libraries and plugins
- Implement dynamic resources
- Support FreeType library
- Calculate fonts to render onscreen text
- Convert on the fly text glyphs into Vulkan textures
- Render text with different types of indentations (left, right, certer, justified)
- Enable text rendering on the GUI with Vulkan renderer
- Use bitmap text rendering to optimize also Cairo renderer
- Add support for bones weights and bones indices to vertex attributes
- Import weights, indices, bones, skeleton, animated nodes with AssImp library
- Implement shader storage buffers
- Optimize vertex and index buffers
- Implement skinned mesh computing in vertex shader
- Animate nodes with linear interpolation for position / scale and slerp for quaternions
- Refactor material system and lighting stage, implement PBR principles
- Optimize ambient, diffusion and specular rendering with multiple textures
- Implement missing parts in the importer to support advanced materials
- Import texture coords, tangent and bitangent vertex attributes with AssImp library
- Improve material system with multiple layers of textures
- Implement bump mapping with tangets, bitangents and normal maps
- Import 3D nodes, vertices, indices and normals with AssImp library.
- Improve material system and mesh rendering
- Define format for 3D mesh with multiple vertex attributes and layout
- Implement convertion from 3D mesh to Vulkan vertex and index buffers
- Design and implement the 3D engine. Handle 3D assets, resources and materials
- Add support for 3D rendering in vulkan graphics context
- Write a simple test case with a material and a rotating torus
- Translate material nodes into GLSL shader for Vulkan
- Support textures with Vulkan, implement materials with textures
- Improve abstract graphics context interface for modern graphics libraries like Vulkan
- Create Vulkan device and implement a specialization of the graphics context
- Adapt uniforms mechanims to Vulkan uniform buffers, write a simple shader
- Add shaderc dependency and convert GLSL program shader into SPIRV shaders
- Implement materials with graphics pipeline, layouts and descriptor sets
- Optimize rendering layers with primary and secondary command buffers
- Implement vertex buffers, draw rainbow rectangles without textures
- Fix transform 2D, finally make 2D GUI work with Vulkan Graphics context
- Design an abstract physics engine and implement 2D physics engine for collision detection
- Implement a GUI engine on top of the 2D graphics engine and physics engine
- Introduce the first set of widgets, like buttons, options, check boxes and window forms.
- Implement an abstract architecture for 2D and 3D engine
- Manage resources like textures, materials and assets and attach them to the engine
- Implement 2D graphics engine to draw a scene composed by 2D shapes
- Make the engine work and write a simple test case
- Improve texture's architecture, adding linear, radial and program shader textures
- Implement materials composed by expression nodes, similar to Unreal Engine 4
- Improve the architecture for path rendering of 2D shapes with textures and materials
- Make the Cairo test case work with the new architecture
- Implement system component, open a window, handle events, draw a picture
- Improve graphics context, add 2D shapes rendering on graphics abstraction layer
- Implement cairo graphics context and draw 2D shapes
- Add a simple test case that uses Cairo library for drawing a rotating 2D shape
- Implement cross-platform dynamic libraries loader
- Dynamically link all the external libraries, when required
- Add skeleton architecture for additional modules:
- Picture (Handle color formats, palette, images)
- Geometrics (2D and 3D shapes, splines, nurbs)
- Graphics (Abstract layer for rendering 2D and 3D graphics)
- System (Set of classes to handle windows and OS functionality)
- DevIL (Import and export popular image formats with DevIL library)
- Cairo (Implementation of 2D rendering with Cairo library)
- Implement image loader with DevIL
- Add Skeleton architecture for Graphics context
- Add math classes (Complex, Vector, Matrix) and functionality
- Improve json and xml parser interface
- Implement constant strings on human readable (like xml or json) serialization
- Improve the log
- Fix some memory leak
- Custom set of classes to handle objects and containers (vector, list, map, multimap)
- Serialization with 4 formats (xml, json, raw and formatted binary) optimized for speed
- Threads, mutexes, semaphores, atomics
- Integration with TinyC library to build and execute Just-In time code
- Custom memory allocation methods to trace leaks and optimize fragmentation
- Full set of methods to handle streams into files and block of memory