Comments (4)
My thoughts:
- Find a way to make graphics settings not rely on global state (blend mode, stencil state, etc.)
- Rename functions like
get_window_size
to justwindow_size
(more idiomatic naming in the Rust community) - Change API to use
mint
instead ofvek
from tetra.
Find a way to make graphics settings not rely on global state (blend mode, stencil state, etc.)
Good call - I had a go at trying to implement something like Love2D's state stack before and trying to do it in a non-breaking way seemed like it'd be an absolute nightmare. Can't guarentee I'll find a nice solution for 0.7, but I'll give it some thought (if you have any ideas of what this API could look like, I'm all ears!)
Rename functions like get_window_size to just window_size (more idiomatic naming in the Rust community)
This is definitely idiomatic for field getter methods on a struct, but I'm less sure what the consensus is for free functions? I'll have a look at what other libraries do there.
Change API to use mint instead of vek
I'm open to this if it doesn't make the API more awkward to use - I've never really tried mint
so I don't know how it works in practice!
from tetra.
I've never really tried mint so I don't know how it works in practice!
In ggez, functions that take vectors or other math types are generic and they let you pass in anything that implements Into<mint::Vec2>
(or the appropriate mint type). That way you can pass in types from any library that has mint support.
from tetra.
I think taking mint types as parameters would be okay, the bit I'm less keen on is the cases where we return stuff like Vec2
- could be a bit gross to have to convert the return value back to your own type every time. But might be worth it for the improvements elsewhere, I'll give it a go and see how I feel about it :)
from tetra.
Related Issues (20)
- ScreenScaler cannot use multisampling or stencil buffers HOT 1
- Encapsualting graphics state changes
- Make enums non_exhaustive if they are likely to be extended HOT 1
- crash with "Segmentation fault: 11" message when multiple gamepads connected. HOT 13
- Improve performance docs
- Include inner error when printing `TetraError::PlatformError` HOT 1
- Switch to SDL_GameControllerRumble for gamepad rumble
- Setting the swap interval at startup fails on some platforms HOT 4
- Input monitoring permissions are requested on MacOS Big Sur HOT 5
- Tetra fails to build with edition = "2021" or resolver = "2" HOT 2
- Add an option to generate premultiplied font atlases HOT 3
- The moethods Shader::from_vertex_string and Shader::from_fragment_string won't build
- tetra on Windows selects an integrated GPU when a discrete GPU is available HOT 1
- Mesh non deterministic glitch HOT 2
- Integrate ImGui (imgui-rs) into Tetra as a early GUI solution
- "static-link" doesn't work for "sdl2 0.35.2" on OSX
- Instancing using instanced vertex attributes HOT 3
- Pass DrawParams as a reference to the Texture's draw method
- Window is always fullscreen on Windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tetra.