sse2 / daisy Goto Github PK
View Code? Open in Web Editor NEWa simple, tiny, very fast, well-documented, header-only library for 2D primitive and text rendering using D3D9 & GDI, written in C++17
License: MIT License
a simple, tiny, very fast, well-documented, header-only library for 2D primitive and text rendering using D3D9 & GDI, written in C++17
License: MIT License
Thanks for sharing this renderer
while using it, i noticed that upon utilizing it in a game internally (tf2), it messes up, specifically so (Black game background):
Code:
HRESULT D3DAPI hooks::end_scene ( IDirect3DDevice9* device ) {
daisy::daisy_initialize ( device );
daisy::daisy_prepare ( );
daisy::c_renderqueue queue;
if ( !queue.create ( 500 , 1000 ) )
return EXIT_FAILURE;
// push a filled triangle
queue.push_filled_triangle ( { 0, 720 } , { 1280 / 2, 0 } , { 1280, 720 } , { 255, 0, 0, 72 } , { 0, 255, 0, 72 } , { 0, 0, 255, 72 } );
// flushing of all render queues should happen here
queue.flush ( );
queue.clear ( );
daisy::daisy_shutdown ( );
return end_scene_o ( device );
}
Immediately I realized this is just a directx state issue, and i pasted this fix from UC:
and this fixed the issue.
I thought I'd drop this here, I'm not sure if it's an error on my behalf or the renderer. Among other things, I tried to use daisy_prepare()
before initializing, but I believe that just made me crash, so I thought i'd put this here
I also recognize my code is shit and I shouldn't be doing a lot of these calls in endscene on every frame, but this was just for testing purposes while setting up the lib
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.