Skip to content

andrestubbe/FastDWM

Repository files navigation

FastDWM — Native Windows Timing & Composition [v0.1.0]

Status License: MIT Java Platform JitPack

⚡ Low-latency access to the Windows Desktop Window Manager (DWM). High-precision multimedia timers and VSync synchronization for the FastJava ecosystem.

FastFileIndex Showcase


Why FastDWM?

Java's standard UI loops (Swing/AWT/JavaFX) are completely disconnected from the underlying OS compositor (Desktop Window Manager). This leads to tearing, micro-stutters, and input lag. FastDWM breaks Java out of its sandbox by providing direct JNI access to DwmFlush(), allowing your render loops to perfectly lock onto the physical monitor refresh rate (VSync) with zero allocations. Additionally, it offers direct access to the Windows Multimedia Timer API (timeSetEvent) to request true 1ms scheduling precision from the Windows Kernel, bypassing Java's notoriously inaccurate Thread.sleep().

Quick Start

# Clone the repository
git clone https://github.com/andrestubbe/FastDWM.git
cd FastDWM

# Build and register locally
.\compile.bat

# Run the Drift Test Demo
.\run-demo.bat

Installation

Option 1: Maven (Recommended)

Add the JitPack repository and the dependencies to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependencies>
   <dependency>
       <groupId>com.github.andrestubbe</groupId>
       <artifactId>fastdwm</artifactId>
       <version>v0.1.0</version>
   </dependency>
   <dependency>
       <groupId>com.github.andrestubbe</groupId>
       <artifactId>fastcore</artifactId>
       <version>v0.1.0</version>
   </dependency>
</dependencies>

Option 2: Gradle (via JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastdwm:v0.1.0'
    implementation 'com.github.andrestubbe:fastcore:v0.1.0'
}

Option 3: Direct Download (No Build Tool)

Download the latest JARs directly to add them to your classpath:

  1. 📦 fastdwm-v0.1.0.jar (The Core Library)
  2. ⚙️ fastcore-v0.1.0.jar ( The Mandatory Native Loader)

Important

All JARs must be in your classpath for the native JNI calls to function correctly.

Running the Demo

We've included a native timing drift test to showcase the precision:

  1. Run compile.bat to build the native DLL.
  2. Run run-demo.bat to launch the Drift Test.

Documentation

  • COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
  • REFERENCE.md: Full API descriptions, border configurations, and codepoint index.
  • PHILOSOPHIE.md: The engineering rationale for zero-allocation performance.
  • ROADMAP.md: Future milestones and planned features.

Platform Support

Platform Status
Windows 10/11 ✅ Fully Supported
Linux 🚧 Planned
macOS 🚧 Planned

License

MIT License — See LICENSE file for details.


Related Projects


Part of the FastJava EcosystemMaking the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋

About

⚡Native Windows Desktop Window Manager (DWM) access. High-precision multimedia timers and VSync synchronization for the FastJava ecosystem.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors