You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
894 B
49 lines
894 B
Content-Type: text/x-zim-wiki
|
|
Wiki-Format: zim 0.4
|
|
Creation-Date: 2020-02-21T22:54:06-08:00
|
|
|
|
====== Drawables ======
|
|
[[/doc/sfml_rust/drawables/index.html|Documentation]]
|
|
|
|
=== Details ===
|
|
Drawables are all able to be passed to the canvas frame to be rendered
|
|
|
|
The implementation of the Drawable trait is tightly coupled to the data types defined in VertexType and ingested by the canvas frame
|
|
|
|
Right now I have a couple of types that I'm using:
|
|
|
|
TextureType(vec, handle)
|
|
ImageType(vec, handle)
|
|
ColorType(vec)
|
|
ThreeDType(vec)
|
|
|
|
This maps to the drawables I have implemented
|
|
|
|
compu_sprite : ImageType
|
|
polygon : ColorType
|
|
rect : ColorType
|
|
sprite : TextureType
|
|
|
|
|
|
It doesn't matter, how these objects get the VertexType that it needs to return. Generating them on the fly should be generally OK. It won't scale to very large amounts of sprites. But it's fine for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|