2
\$\begingroup\$

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?

\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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