veeenu / hudhook

A videogame overlay framework written in Rust, supporting DirectX and OpenGL
MIT License
185 stars 27 forks source link

Replace texture image data #176

Closed misdake closed 6 months ago

misdake commented 6 months ago

Fixes #147.

  1. add TextureLoader trait with load_texture and replace_texture
  2. implement TextureLoader for all 4 engines
    • dx9 and dx12: load_texture = heap.create_texture + heap.upload_texture, replace_texture = heap.upload_texture
    • dx11 and gl3: load_texture = heap.create_texture (with init), replace_texture = heap.update_texture

"Allow edits by maintainers" is on. If you have any suggestions for improvement, just push changes to this branch, specially about naming and code repetition.

misdake commented 6 months ago

I'd say tests are now scary as hell. image