Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Per pixel lighting / shading systems...  (Read 1613 times)
0 Members and 1 Guest are viewing this topic.
Offline SmokeNWrite

Junior Devvie

Projects: 1

« Posted 2013-06-24 13:57:28 »

They possible with Slick? I've been trying to fix mine for over an hour now..
Downloaded new lwjgl, can't find a new Slick though.
Just can't seem to get Image graphics from the players image (or any other image), which means I can't alter my images for shading..
Is there any way around this? Cause every time I try get the image's graphics with image.getGraphics(); it throws a null, I've also had this error;
java.lang.RuntimeException: No OpenGL context found in the current thread.
   at org.lwjgl.opengl.GLContext.getCapabilities(
   at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.init(
   at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.createGraphics(
   at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.getGraphicsForImage(
   at org.newdawn.slick.Image.getGraphics(
   at org.background.worker.Shader.doInBackground(
   at org.background.worker.Shader.doInBackground(
   at javax.swing.SwingWorker$ Source)
   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
   at Source)
   at Source)
   at java.util.TimerThread.mainLoop(Unknown Source)
   at Source)

I've tried making the images on the initialization too.

Offline wreed12345

JGO Knight

Medals: 28
Projects: 3
Exp: 2 years

« Reply #1 - Posted 2013-06-24 13:58:57 »

Use libgdx Smiley Sorry, I don't know enough about slick to help, but consider the switch.

Offline SmokeNWrite

Junior Devvie

Projects: 1

« Reply #2 - Posted 2013-06-24 14:00:16 »

why'd I bother getting used to Slick lol seems useless now lol, could you give me some information about it or links please?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davedes
« Reply #3 - Posted 2013-06-24 15:55:22 »

You can only do image loading and rendering on the GL thread, i.e. through your game's init() method.

I'd also suggest LibGDX as it will be more suitable for per-pixel lighting and shaders.

Shaders in LWJGL/LibGDX
Lesson 6 - Normal Map Lighting for 2D Games

Offline SmokeNWrite

Junior Devvie

Projects: 1

« Reply #4 - Posted 2013-06-24 16:39:32 »

I've started a new one with libGDX now so let's see how it goes
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Archive (84 views)
2017-02-27 19:41:49

Riven (77 views)
2017-02-27 17:26:59

numerical (445 views)
2017-02-21 07:32:16

numerical (449 views)
2017-02-21 07:31:46

theagentd (559 views)
2017-02-18 13:42:33

theagentd (555 views)
2017-02-18 13:35:16

h.pernpeintner (1730 views)
2017-01-24 22:39:11

h.pernpeintner (1686 views)
2017-01-24 22:38:32

Galdo (2268 views)
2017-01-12 13:44:09

Archive (2183 views)
2017-01-02 05:31:41
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!