RGF是仓颉Windows系统下的通用渲染框架(兼应用开发框架)。RGF仓颉版(后续简称"RGF")基于RGF(C/C++版)封装优化而来。RGF为开发者提供轻量化、安全、高性能以及高度一致性的2D渲染能力以及常用的桌面应用开发工具,并且提供对接Direct3D的相关接口,以满足开发者对3D画面渲染的需求。在Windows开发方面,RGF在子包内也提供开箱即用的Windows API,确保熟悉Win32的开发者快速上手。此外,RGF还提供一些常用功能的封装(如XAudio2、MF),以辅助开发者实现音频、摄像头等扩展功能的管理。
Access rate limit exceeded. Please log in to continue.
Introduction
RGF is a general-purpose rendering framework (also serving as an application development framework) for Windows, built upon technologies such as Direct3D, Direct2D, DXGI, DirectWrite, WIC, GDI, and GDI+. The Cangjie edition of RGF (hereinafter referred to as "RGF") is a refined and encapsulated version derived from the original RGF (C/C++ edition). RGF provides developers with lightweight, secure, high-performance, and highly consistent 2D rendering capabilities along with common desktop application development tools. It also offers interfaces for integration with Direct3D to fulfill developers' needs for 3D rendering. For Windows development, RGF includes out-of-the-box Windows APIs within its sub-packages, enabling developers familiar with Win32 to get started quickly. Additionally, RGF encapsulates commonly used functionalities (e.g., XAudio2, Media Foundation) to assist developers in managing extended features such as audio and camera capture.
Project Features
- Highly Consistent Cross-Technology Rendering Results
RGF allows users to select underlying rendering technologies on demand—currently supporting both Direct2D and GDI/GDI+. Once development is completed using the RGF framework, users can seamlessly switch between these underlying implementations without code changes, while RGF guarantees consistent rendering output.
- High Compatibility with Rendering Targets
RGF supports various window types, including but not limited to: standard windows, popup windows, layered (semi-transparent) windows, and irregular-shaped windows. Moreover, RGF enables rendering content into non-client areas (NC) or any HDC-supported device (e.g., printers) via bound rendering surfaces.
- Safe Usage Mechanism
RGF adopts a lifecycle-oriented design philosophy, enforcing standardized creation, usage, and destruction of related objects to prevent issues like memory leaks. Built-in lifecycle management macros automatically handle object deallocation.
- Native Platform Focus
RGF is dedicated exclusively to the Windows operating system, avoiding redundant cross-platform compatibility code and associated performance overhead.
- Thread Safety
RGF’s core rendering pipeline is protected by atomic operations on the C++ side, ensuring safe rendering under both system-level multithreading and Cangjie user-space threads. Additionally, its locking mechanism includes timeout protection to automatically release locks in extreme scenarios, preventing indefinite application hangs.
Usage Instructions
This project is actively maintained. Follow us on Bilibili (UID: 3546853029185667) for video tutorials and the latest updates!
For detailed usage, refer to the Course Tutorials.
For detailed descriptions of main classes and function interfaces, see: API ( Online API Documentation: Link )
Example Code
For GUI control implementation examples, see this repository: Link
Course code and additional examples are available here: Link
Other RGF-related projects can be found in this collection: Link
Constraints and Limitations
| Windows 7 (Not yet supported by Cangjie) |
Windows 8 (Not yet supported by Cangjie) |
Windows 10 | Windows 11 |
|---|---|---|---|
| √ | √ | √ | √ |
-
Different RGF library versions have slightly varying runtime environment requirements, as detailed below:
- D3D-Compatible Version (DX10)
Minimum supported platforms:
Windows 7, Windows Vista SP2 with Platform Update for Windows Vista [Desktop Apps | UWP Apps]
Also supports interoperability with Direct3D.- D3D-Compatible Version (DX11)
Minimum supported platforms:
Windows 8 and Platform Update for Windows 7 [Desktop Apps | UWP Apps]
Also supports interoperability with Direct3D.- Non-D3D-Compatible Version (D2D 1.0)
Minimum supported platforms:
Windows 7, Windows Vista SP2 with Platform Update for Windows Vista [Desktop Apps | UWP Apps]- Non-D3D-Compatible Version (D2D 1.1)
Minimum supported platforms:
Windows 8 and Platform Update for Windows 7 [Desktop Apps | UWP Apps]- Fallback Version (No current implementation planned)
Minimum supported platforms:
Windows XP, Windows 2000 Professional [Desktop Apps only]
This version would be restricted to GDI+ only and exclude DirectWrite-based text rendering.
(Note: Each version further differentiates between parallel-accelerated vs. non-accelerated builds, and 32-bit vs. 64-bit architectures.)
开源协议
See the LICENSE file for details.
联系方式
Note: Due to external linking, some platforms may not render the image inline. Please download the file for local viewing, or click the broken image icon to attempt direct access.
Contributing
We welcome pull requests, issue reports, and all forms of community contributions!
Introduction
RGF是仓颉Windows系统下的通用渲染框架(兼应用开发框架)。RGF仓颉版(后续简称"RGF")基于RGF(C/C++版)封装优化而来。RGF为开发者提供轻量化、安全、高性能以及高度一致性的2D渲染能力以及常用的桌面应用开发工具,并且提供对接Direct3D的相关接口,以满足开发者对3D画面渲染的需求。在Windows开发方面,RGF在子包内也提供开箱即用的Windows API,确保熟悉Win32的开发者快速上手。此外,RGF还提供一些常用功能的封装(如XAudio2、MF),以辅助开发者实现音频、摄像头等扩展功能的管理。
Customize your domain