Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leadwerks 3 C++ Buffer use


Recommended Posts

You can look at the files I posted over there:


If you open the StereoRender.cpp from the zip-file, you can see, how you can use buffers.


Basically that file creates a Buffer called "leftEye" by using:

Buffer* leftEye = Buffer::Create(context->GetWidth() + 1, context->GetHeight(), 1, 1, 0);


This buffer can be cleared by



Rendering to this Buffer is done by:



The example then draws the leftEye-image over the context's image by using

int blendModeOld = context->GetBlendMode();
context->DrawImage(leftEye->GetColorTexture(), 0, 0, context->GetWidth()+1, context->GetHeight()+1);

Link to post

I don't really understand the question but I guess it's about the relationship between Context and Buffer.

The Context-class inherits from / extends / is a sub-class of the Buffer-class, so basically the context is a special sort of buffer.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

Facebook Twitter Youtube Github Steam
  • Create New...