Jump to content

Drawing small texture


bandrewk
 Share

Recommended Posts

Hello,

 

I am experiencing a problem when drawing a small image in-game:

 

wvz98h.png

 

It is showing correctly in the editor, however, when I draw it in-game it looks awful. Drawing code (Context blend mode is set to alpha):

 

Context::GetCurrent()->DrawImage(textureGrab, Window::GetCurrent()->GetWidth() / 2, Window::GetCurrent()->GetHeight() / 2);

 

What am I doing wrong?

Link to comment
Share on other sites

I can't see your image here at work, but gamecreator says it's full white. I have this same issue, however it changes while I'm moving (mine is crosshairs for the player). In a project I have I am able to move around and in certain situations my crosshair model turns pure white, while in other situations it's normal. The map for this project is corrupt and I hope Josh is looking at fixing that so this bug can be reviewed.

Link to comment
Share on other sites

Nice. I do that in my code too but only because I set transparencies so I guess that automatically took care of that potential problem. Do you have to do it every frame or just once before you enter the loop? I'm also curious about what GetColor returns without it but not a big deal. SetColor probably does something undocumented in the function that properly sets blend.

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