Hi,
I am trying to create a new surface, paint stuff to it but other than the Clear(), all rasterizer functions don't work.
I've tried both ways, SetRenderTarget() and by creating a new rasterizer.
The new surface is cleared with fuschia color correctly, but FillRect() doesn't work.
What am I doing wrong?
I am trying to create a new surface, paint stuff to it but other than the Clear(), all rasterizer functions don't work.
- Code:
Frog::Surface *b = m_display->CreateSurface(w, h);
Frog::Rasterizer *r = m_display->CreateRasterizer(b);
//Frog::Surface* olddisplay = m_rast->SetRenderTarget(b);
r->Clear(Frog::Color(255, 0, 255));
f->Write(b, r, 0, 0, text);
r->FillRect(10, 10, 120, 20, 0);
//m_rast->SetRenderTarget(olddisplay);
I've tried both ways, SetRenderTarget() and by creating a new rasterizer.
The new surface is cleared with fuschia color correctly, but FillRect() doesn't work.
What am I doing wrong?