I've been using BlitzUI for an editor for my game.
Since the game is 3D, I need to display 3D stuff in the editor.
Now I'm trying to render some viewports for the different views (side and top).
Unfortunately the viewport commands with renderworld are causing horrible flickers on the screen. I'm guessing its because there is two 'flip' calls being made.
So now what I am trying to do is to copy the rendered world over to two images via CopyRect and then draw the images.
This is not working either. When I remove the renderworld calls the buffers display the red rectangle I draw. If I put the renderworld call in, however, nothing gets displayed. It isn't a black void, its completely transparent. So I'm guessing I'm doing something wrong with the whole way renderworld works.
Perhaps you could steer me into the right direction?
Thanks for reading my post!
Since the game is 3D, I need to display 3D stuff in the editor.
Now I'm trying to render some viewports for the different views (side and top).
Unfortunately the viewport commands with renderworld are causing horrible flickers on the screen. I'm guessing its because there is two 'flip' calls being made.
So now what I am trying to do is to copy the rendered world over to two images via CopyRect and then draw the images.
This is not working either. When I remove the renderworld calls the buffers display the red rectangle I draw. If I put the renderworld call in, however, nothing gets displayed. It isn't a black void, its completely transparent. So I'm guessing I'm doing something wrong with the whole way renderworld works.
Perhaps you could steer me into the right direction?
Function Create3DGUI() nCamTop = CreateCamera() PositionEntity nCamTop, 0, 0, -15 nCamSide = CreateCamera() PositionEntity nCamSide, 0, 0, -10 nImgTop = CreateImage(490, 180) nImgSide = CreateImage(190, 200) CreateCube() End Function Function UpdateViewports() SetBuffer BackBuffer() HideEntity nCamSide ShowEntity nCamTop Color 255, 0, 0 Rect 0, 0, 490, 180 RenderWorld CopyRect 0, 0, 490, 180, 0, 0, BackBuffer(), ImageBuffer(nImgTop) HideEntity nCamTop ShowEntity nCamSide RenderWorld CopyRect 0, 0, 190, 200, 0, 0, BackBuffer(), ImageBuffer(nImgSide) HideEntity nCamTop HideEntity nCamSide End Function Function DisplayViewports() DrawImage nImgTop, 140, 280 DrawImage nImgSide, 440, 45 End Function
Thanks for reading my post!