No blend mode.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: No blend mode.
Like I said. Render targets.
It will require GL_EXT_framebuffer_object, which might not be supported by older machines. Then again, can't let older machines hold us back forever.
Hopefully, it is possible to get the pixel data in a framebuffer. Otherwise display mode changes will be impossible.
It will require GL_EXT_framebuffer_object, which might not be supported by older machines. Then again, can't let older machines hold us back forever.
Hopefully, it is possible to get the pixel data in a framebuffer. Otherwise display mode changes will be impossible.
Re: No blend mode.
love really doesnt run all that well on older machines anyway
Re: No blend mode.
Good point.
Re: No blend mode.
Alternatively you could just draw the quarters of the circles so no actual overlaying occurs. If it's an image you can draw the 'subsprite' (draws) of a corner of the circle.
EDIT: OH MY GOSH! I've just realised I spelled obey wrong in my avatar. Why has nobody told me
EDIT: OH MY GOSH! I've just realised I spelled obey wrong in my avatar. Why has nobody told me
Re: No blend mode.
Jake: your avatar is hardly visible
Everyone: I've been trying to alpha blend my images too:
It doesn't work though, anyone knows why?
Everyone: I've been trying to alpha blend my images too:
Code: Select all
local oldcolor = love.graphics.getColor()
love.graphics.setColor(255, 255, 255, 128)
love.graphics.draw( img["loveBG"],
love.graphics.getWidth()*0.5,
love.graphics.getHeight()*0.5)
love.graphics.setColor(oldcolor)
Thy father beckons.
Re: No blend mode.
CryNox: love.graphics.setColorMode(love.color_modulate)
Re: No blend mode.
rude: I tried that already:
The image is supposed to be completely transparent, seeing that the alpha value is 0. However, it is more like 50% alpha. I get the same result even after I changed it to 255 or any other value. I attached a screenshot to show you what I mean.
Any ideas guys?
Code: Select all
function MenuState:draw()
local oldcolor = love.graphics.getColor()
love.graphics.setBlendMode(love.color_modulate)
love.graphics.setColor(255, 255, 255, 0)
love.graphics.draw( img["loveBG"],
love.graphics.getWidth()*0.5,
love.graphics.getHeight()*0.5)
love.graphics.setColor(oldcolor)
love.graphics.setBlendMode(0)
end
Any ideas guys?
Thy father beckons.
Re: No blend mode.
I tried adjusting the alpha for text and it works. Strangely though, the images remain 50% alpha all the time, even when I set the alpha value to 0 - causing the text to disappear of course.
For some reason adjusting the alpha value only works for text and not images. Is there a solution to this?
EDIT: I attached my project if you want to check it out. For some reason, one of the images "loveBG.png" failed to load after I made the project into a .love file. I created that image using Photoshop CS3, and it worked when I ran the project before making it into a .love file. Just click "Continue" if you have the "failed to load" error.
For some reason adjusting the alpha value only works for text and not images. Is there a solution to this?
EDIT: I attached my project if you want to check it out. For some reason, one of the images "loveBG.png" failed to load after I made the project into a .love file. I created that image using Photoshop CS3, and it worked when I ran the project before making it into a .love file. Just click "Continue" if you have the "failed to load" error.
- Attachments
-
- game.love
- (34.35 KiB) Downloaded 169 times
Thy father beckons.
Re: No blend mode.
ARGH I JUST REALIZED MY STUPID MISTAKE:
I did this:
love.graphics.setBlendMode(love.color_modulate)
instead of this:
love.graphics.setColorMode(love.color_modulate)
lol.
I did this:
love.graphics.setBlendMode(love.color_modulate)
instead of this:
love.graphics.setColorMode(love.color_modulate)
lol.
Thy father beckons.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests