I've 2 screens 1 of them is game screen and one of them is menu screen. And they both work individually when i start with it. But the problem is when i start with menu screen and start game from there only bitmap text are written to the screen. And when i resize window it starts to work properly. So i tried calling resize function manually when i start the game but it doesn't work. Also i tried going to menu screen from game and it works too. I can show you my code if you need to know anything since i don't know where can be problem i don't add code. Thanks.
I fixed the problem by adding the code below to my start game function. But i still don't know what causes the problem and why adding this code solves it. So if anyone has the same problem my solution is doing this and if someone can explain what's going on who knows what causes this i really appreciate.