gfx

授权协议 View license
开发语言 C/C++
所属分类 程序开发、 图形/图像处理
软件类型 开源软件
地区 不详
投 递 者 刁冠宇
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Matrix room gfx-hal on crates.io Build Status
Getting Started | Documentation | Blog | Funding

gfx-rs

gfx-rs is a low-level, cross-platform graphics and compute abstraction library in Rust. It consists of the following components:

gfx-hal deprecation

As of the v0.9 release, gfx-hal is now in maintenance mode. gfx-hal development was mainly driven by wgpu, which has now switched to its own GPU abstraction called wgpu-hal. For this reason, gfx-hal development has switched to maintenance only, until the developers figure out the story for gfx-portability. Read more about the transition in #3768.

hal

  • gfx-hal which is gfx's hardware abstraction layer: a Vulkan-ic mostly unsafe API which translates to native graphics backends.
  • gfx-backend-* which contains graphics backends for various platforms:
  • gfx-warden which is a data-driven reference test framework, used to verify consistency across all graphics backends.

gfx-rs is hard to use, it's recommended for performance-sensitive libraries and engines. If that's not your domain, take a look at wgpu-rs for a safe and simple alternative.

Hardware Abstraction Layer

The Hardware Abstraction Layer (HAL), is a thin, low-level graphics and compute layer which translates API calls to various backends, which allows for cross-platform support. The API of this layer is based on the Vulkan API, adapted to be more Rust-friendly.

Currently HAL has backends for Vulkan, DirectX 12/11, Metal, and OpenGL/OpenGL ES/WebGL.

The HAL layer is consumed directly by user applications or libraries. HAL is also used in efforts such as gfx-portability.

See the Big Picture blog post for connections.

The old gfx crate (pre-ll)

This repository was originally home to the gfx crate, which is now deprecated. You can find the latest versions of the code for that crate in the pre-ll branch of this repository.

The master branch of this repository is now focused on developing gfx-hal and its associated backend and helper libraries, as described above. gfx-hal is a complete rewrite of gfx, but it is not necessarily the direct successor to gfx. Instead, it serves a different purpose than the original gfx crate, by being "lower level" than the original. Hence, the name of gfx-hal was originally ll, which stands for "lower level", and the original gfx is now referred to as pre-ll.

The spiritual successor to the original gfx is actually wgpu, which stands on a similar level of abstraction to the old gfx crate, but with a modernized API that is more fit for being used over Vulkan/DX12/Metal. If you want something similar to the old gfx crate that is being actively developed, wgpu is probably what you're looking for, rather than gfx-hal.

Contributing

We are actively looking for new contributors and aim to be welcoming and helpful to anyone that is interested! We know the code base can be a bit intimidating in size and depth at first, and to this end we have a label on the issue tracker which marks issues that are new contributor friendly and have some basic direction for completion in the issue comments. If you have any questions about any of these issues (or any other issues) you may want to work on, please comment on GitHub and/or drop a message in our Matrix chat!

License

This repository is licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

  • SDL_gfx库由SDL_gfxPrimitives演变而来,包含了基本的绘图函数,可以画线,圆,多边形等,还可以实现SDL_Surface的缩放。 SDL_gfx包含以下几个文件: Graphic Primitives (SDL_gfxPrimitves.h) Rotozoomer (SDL_rotozoom.h) Framerate control (SDL_framerate.h) MMX

  • 本文讨论优化多个进程在共用gfx嵌入字体的过程. flash做界面有着天然的优势.随着gfx的发展也看到越来越多的游戏使用gfx做界面工作. 本项目组使用gfx也有几年时间了,这次接了个棋牌项目,很自然的就想使用flash作为界面. 与客户端项目不同的是单个棋牌游戏必须保持"身材瘦小".都能保持在5M以下是比较满意的.而且启动速度越快越好. gfx使用的字体方案分为两种. 一种是系统字体.Wind

  •  bool CALL HGE_Impl::Gfx_BeginScene(HTARGET targ) {         LPDIRECT3DSURFACE8 pSurf=0, pDepth=0; //D3D表面指针         D3DDISPLAYMODE Mode; //显示结构体(屏幕宽度,屏幕高度,屏幕刷新率,当前层的显示模式版本)         CRenderTargetList *

  • 技巧(Techniques) 每个CgFX文件通常表示一个着色器作者极力完成的特定的效果,例如凸凹贴图,环境映射或各向异性灯光等。CgFX包含一个或多个技巧,每一个都描述了完成一个效果的方式。每个技巧都面下一个特定层次的GPU功能,因此一个CgFX文件可以包含一个针对带有强大片段编程能力的高级GPU的技巧,同时另一个技巧是为支持固定功能纹理混合的比较旧的图形硬件准备的。CgFX也可以用于功能性,细

  • DirectFB学习之添加gfx驱动 前面介绍了如何移植dfb到nuc972平台,但未对硬件2D部分的gfx驱动做较详细的说明,这里先简单介绍下如何为dfb写gfx驱动。 (本文描述的nuc972平台的dfb的gfx驱动可以在github上获取) 一、了解gfx驱动接口 1.1 gfx接口的声明 由前面文章《DirectFB学习之面对对象设计》我们应该可以理解一个具体的gfx驱动将被视为是gfx驱

  • 文档列表见:Rust 移动端跨平台复杂图形渲染项目开发系列总结(目录) gfx-hal接口以1:1模仿Vulkan,下面改用Vulkan接口作说明。由于Vulkan接口粒度过细,比OpenGL / ES难学数倍。根据个人经验,对于移动端图形开发者,照着OpenGL ES的接口讲解Vulkan可降低学习难度。从逐帧渲染部分开始学习,跳过这些数据结构的初始化过程,有利于把握Vulkan的核心流程。 O

 相关资料
  • gfx-rs 是一个 Rust 低级跨平台图形和计算抽象库,它由以下组件组成: gfx-hal,gfx-rs 的硬件抽象层:Vulkan-ic 主要是不安全的 API,它可以将 API 调用转换为各种后端,从而实现跨平台支持。 gfx-backend-*:包含各种平台的图形后端: Vulkan (用于运行在 Linux 和 Windows) DirectX 12 与 DirectX 11 Meta

  • GFXprim 是一款模块化 2D 位图图形库。GFXprim 组织成模块,每个模块实现不同的功能。GFXprim 的目的是提供一个简单但非常强大的 API 给应用处理位图图形。 库的核心是把所有的模块连接起来,实现像素操作,转换和位块传送。加载器实现一个加载和保存各种格式的图像的接口,支持的格式有:JPEG, PNG, GIF, BMP, TIFF, PNM 等等。过滤器实现位图过滤,比如 re

相关阅读

相关文章

相关问答

相关文档