Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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 1382 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: 25
Projects: 2
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.

IanParcs (36 views)
2016-04-18 14:18:53

KaiHH (36 views)
2016-04-18 08:35:41

KaiHH (67 views)
2016-04-15 12:43:58

theagentd (69 views)
2016-04-14 02:16:17

theagentd (76 views)
2016-04-14 02:15:43

IanParcs (92 views)
2016-04-12 03:51:16

IanParcs (37 views)
2016-04-12 03:50:03

IanParcs (33 views)
2016-04-12 03:49:54

IanParcs (30 views)
2016-04-12 03:49:52

IanParcs (39 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 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!