git submodule add https://github.com/Bulb4/renderer.git
#include "..//renderer/include/renderer.h"
If bUseDynamicSinCos is true, circle drawing will be faster but also it will take more memory. Use it if you do not change points count in runtime
cRender* pRender = new cRender(g_pd3dDevice, true);//g_pd3dDevice is our IDirect3DDevice9
ID3DXFont* font1 = nullptr;
pRender->AddFont(&font1, "Consolas", 48, false);
pRender->SetFramerateUpdateRate(400U);
pRender->BeginDraw();
//drawing stuff
pRender->EndDraw();
pRender->OnLostDevice();
if (g_pd3dDevice->Reset(&g_d3dpp) >= 0)
pRender->OnResetDevice();
- Use
pRender->GetFramerate()
for fps monitoring and you can change it's update rate bypRender->SetFramerateUpdateRate(400U);//ms
- Use
pRender->PushRenderState(...)
if you need to use some render states while drawing, but you need to return it's previous value after. - Use
DrawBox(...)
withoutshort thickness
argument if the thickness is 1.
- Discord:
Bulb4#2901
- Steam:
Bulb4<3
- e-mail:
[email protected]