Jump to content

Issues with things drawn on buffers


Pastaspace
 Share

Recommended Posts

I have a basic options menu that, in order to show all the options, is drawn on a different before that buffer's colortexture is drawn:

 

Buffer* bf_normalBuffer;
Buffer* bf_resizeBuffer;
Texture* tt_drawingTexture;

//At initialization
bf_normalBuffer = Buffer::GetCurrent();
bf_resizeBuffer = Buffer::Create(1600, 900);

//Code within the drawing function itself
Buffer::SetCurrent(bf_resizeBuffer);
bf_resizeBuffer->SetColor(Vec4(0, 0, 0, 0));
bf_resizeBuffer->Clear(bf_resizeBuffer->Color);
Context::GetCurrent()->SetBlendMode(Blend::Alpha);
Context::GetCurrent()->SetColor(Vec4(1, 1, 1, 1));

//Draws text code goes here
//Then switches back

tt_drawingTexture = bf_resizeBuffer->GetColorTexture(0);
Buffer::SetCurrent(bf_normalBuffer);
Context::GetCurrent()->DrawImage(tt_drawingTexture, 0, 0, 1600, 900);
Context::GetCurrent()->SetColor(Vec4(1, 1, 1, 1));

 

Here's the issue. When using this code (rather than just drawing the text without switching buffers), the text on screen is a lot less fuller, and the color is a lot more washed out.

 

A comparison:

polP4HC.jpg

 

Versus it with the buffer code

Hle42b0.jpg

 

 

So what exactly is the issue? Is there some setting or aspect of buffers I'm missing?

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...