Hey Markus,
thanks for trying to help, but I guess you misunderstood what I meant.
For example:
If I create a sprite it's automatically drawn when
Sync() is called in the main loop.
The obvious reason for this is that
Sync() draws every existing sprite currently being set to visible. To be more specific:
Sync() calls - among others -
Render2DFront(), which is responsible for drawing all "visible" sprites, text etc. automatically.
In case I want to draw a sprite "manually" I have to strip down
Sync() into its parts.
Here is an example to visualize what I'm talking about:
void Game::Begin(void)
{
....
ImgId = agk::LoadImage("sprite.png");
SpriteId = agk::CreateSprite(ImgId);
....
}
void Game::Loop(void)
{
....
// instead of sync.. call update(), render() and swap() manually
agk::Update(1.f / 60.f);
agk::Render2DBack();
agk::DrawSprite(SpriteId);
agk::Swap();
agk::ClearScreen();
}
This way it only draws the sprites I "manually" draw to the backbuffer - as far as they are visible ofc.
Problem is: It does not draw stuff like Print() Labels anymore. Therefore I'd have to add
Render2DFront() into the render sequence, which would make my DrawSprite() completely useless as it would draw all sprites automatically anyway through calling
Render2DFront() (like mentioned above).
Is there some way to draw all of my stuff manually and still don't have to work with drawing-losses like the text drawn with
Print()? Like splitting up Render2DFront() even further for example. Also I don't know if there's other stuff which is not being drawn if I do this manually. Maybe it's only the Print-Labels.. maybe it's other stuff too, I haven't tried to be honest.
Thanks for any help.
Greetings