Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How can one achieve a dynamic glow effect in Java Slick2d? I want an image to be surrounded by a glow when I move my mouse over it for example.

Example:

enter image description here No glow

enter image description here Glow

Is it possible to make this programmatically?

share|improve this question

1 Answer 1

I would suggest just making the image with a glowing effect, but if you must have it done in game then you would:

1) Render your scene or "glow objects" to texture A

2) Bind texture A, then using the horizontal shader, render a quad to texture B

3) Bind texture B, then using the vertical shader, render a quad to texture A

However This requires the following OpenGL extensions:

  • GL_ARB_shader_objects or GL20

  • GL_EXT_framebuffer_object or GL30

(You can find the full answer on the website below. The guy there explains it better than me)

http://slick.ninjacave.com/forum/viewtopic.php?f=3&t=4923

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.