Jump to content

GUI problems


pawelzaborek
 Share

Recommended Posts

Hello, after searching through the internet without finding a solution, I decided to join leadwerks forum.

 

My problem is such, that I wanted to create a 2D button on the screen using context:DrawImage(), however when the camera in game is near a low angle (looking at the horizon), the button becomes semi-transparent: one can see the 3D scene through the black letters, whereas the white background covers the scene a little. This effect disappears if the camera in game is brought back up.

 

I only have one context, by the surprising name of 'context'...

--Render the world
world:Render()
context:DrawImage(A1, 0, 0, 400, 370)
	 --(A1 refers to a loaded ".tex" file, with DXT1)

--Refresh the screen
    context:Sync()  --Vsync is off

 

I'm not particularly interested in third-party GUI systems, since this is only my first project. Does anyone have any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

Basically, blend modes add effects to images and change how they are rendered on the screen. I cannot vouch for what the different blend modes do in the engine (since I haven't used them yet), but the most common ones are 1) A "Pixel-perfect" blend mode (doesn't add any smoothing effects; image will look exactly like it does when you make it) 2) A Smoothing blend mode (makes approximations based on nearby pixels and "smooths" the image to decrease pixelation) and 3) An alpha-based blending effect (takes the alpha channel from the image (0-1 or 0-255 depending on format) and applies it to the rendered image. There are probably more in the engine (and most definitely named differently), but those are the main three I have seen across several applications.

 

Hope this helps smile.png -- First post on the forum biggrin.png

i5 4690k | EVGA 780 Ti | Linux

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