Jump to content

draw onto backbuffer with lua


drarem
 Share

Recommended Posts

Are you referring to 2D drawing of double buffering?

 

Since Leadwerks uses OpenGL, you don't have to worry about problems of double buffering on 2d draws I believe. I think leadwerks renders a 2d image by rendering a texture on a quad with a specific Matrix to render it. I don't think leadwerks draws on the actual post rendered OpenGL buffer.

 

To render 2d images with the CPU instead of the GPU would be very CPU intensive comparatively. Since leadwerks loads texture data to the graphics card, you're basically saying "Graphics card, draw image X". To do double buffering you would be passing image buffers to and from the graphics card every render frame which defeats the purposes of OpenGL buffers.

Link to comment
Share on other sites

Ok, I was thinking more about when I put together 2d 'panels' with dynamic and static text, wouldn't a loop drawing on several of those panels impact the performance with every game frame? These panels would be built at run-time and only drawn once each game loop.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...