prophets-of-profit / d2d Goto Github PK
View Code? Open in Web Editor NEWA D language graphics library built on DerelictSDL2.
Home Page: https://prophets-of-profit.github.io/d2d/
License: MIT License
A D language graphics library built on DerelictSDL2.
Home Page: https://prophets-of-profit.github.io/d2d/
License: MIT License
In d2d.Display, the FPS isn't limited correctly. The FPS is usually lower than what the FPS cap should cap it at. For example, if the FPS cap is 60 FPS, the actual FPS will be around 45.
When submitting an invalid number of arguments to AABB with the varargs constructor, a range violation is thrown. This is normal behavior, but it would be best for the user if they were told that their construction was invalid. I think this should best be done compile time, with static if.
The handle methods in https://github.com/SaurabhTotey/d2d/blob/master/source/d2d/sdl2/package.d#L108-L122 are badly made and do not work sufficiently when working with multiple rectangles or points. These methods need to be made better, but I am not quite sure what approach would be appropriate yet.
It will be necessary, or at least make everything easier, to have a Window class that is a translation of SDL_Window. As we have it, our main overall class is called Window. I propose that this get changed to display.
Basically, they don't work at all. A way to fix this is by getting vertices by adding any combinations of components of the AABB's extent to the initial point. This would be O(2^n), which may be faster than the current vertices getter.
Currently, ShapeDrawer methods of drawing polygons, bezier curves, and the base methods of drawing lines run very slowly and consume a lot of gpu performance.
One way to fix this may be to cache the shapes drawn somehow-I would suggest as surfaces-and instead of having drawPoint be the only functionality that needs to be defined in ShapeDrawers have a draw surface defined as well. For Surfaces this is obviously blit. For the Renderer, it can create textures and cache them on its own, perhaps.
Regardless, this is an issue which should be addressed at some point.
Segment intersection method not only has a typo, but it still has yet to actually be completed/finished.
Surfaces constructed using the overloads taking in other surfaces, https://github.com/SaurabhTotey/d2d/blob/master/source/d2d/sdl2/Surface.d#L143-L157 and https://github.com/SaurabhTotey/d2d/blob/master/source/d2d/sdl2/Surface.d#L167-L172, do not work as intended as rather than creating a copy of the surface they use the same surface as passed by reference. This should be fixed so that copying surfaces is a possibility.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.