Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 19, 2013 10:23 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri Nov 11, 2011 7:34 pm 
Offline

Joined: Sun Jun 26, 2011 9:32 pm
Posts: 11
Hi,

My game is using offscreen buffers to render stuff, however, when I create an image and try to access the "Graphics" object, I keep having the following stack :

Code:
11-11 03:37:23.120: E/AndroidRuntime(1897): FATAL EXCEPTION: GLThread 157
11-11 03:37:23.120: E/AndroidRuntime(1897): java.lang.NoClassDefFoundError: org.lwjgl.opengl.Pbuffer
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.init(GraphicsFactory.java:42)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.createGraphics(GraphicsFactory.java:120)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.newdawn.slick.opengl.pbuffer.GraphicsFactory.getGraphicsForImage(GraphicsFactory.java:91)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.newdawn.slick.Image.getGraphics(Image.java:444)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.tsug.ta.renderer.PanelRenderer.<init>(PanelRenderer.java:71)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.tsug.ta.renderer.TetrisAttackRenderer.<init>(TetrisAttackRenderer.java:41)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.tsug.ta.game.TetrisAttackGame.init(TetrisAttackGame.java:50)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at org.newdawn.slick.GDXGameContainer.create(GDXGameContainer.java:134)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:265)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1428)
11-11 03:37:23.120: E/AndroidRuntime(1897):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1189)


Has anyone managed to get that working ? It seems that offscreen buffers are not supported since it complains about lwjgl and I think the GL part is managed by gdx.

Any help would be appreciated :)

Thanks


Top
 Profile  
 
PostPosted: Sat Nov 12, 2011 1:18 am 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 594
If I recall, slick on Android uses libgdx; instead of lwjgl.

> 11-11 03:37:23.120: E/AndroidRuntime(1897): java.lang.NoClassDefFoundError: org.lwjgl.opengl.Pbuffer

See if libgdx has a pbuffer or what not (it should):
http://code.google.com/p/libgdx/

It looks like it has OpenGL wrappers: http://libgdx.l33tlabs.org/docs/api/com ... mmary.html


Top
 Profile  
 
PostPosted: Sat Nov 12, 2011 4:00 am 
Offline

Joined: Sun Jun 26, 2011 9:32 pm
Posts: 11
dime wrote:
If I recall, slick on Android uses libgdx; instead of lwjgl.

> 11-11 03:37:23.120: E/AndroidRuntime(1897): java.lang.NoClassDefFoundError: org.lwjgl.opengl.Pbuffer

See if libgdx has a pbuffer or what not (it should):
http://code.google.com/p/libgdx/

It looks like it has OpenGL wrappers: http://libgdx.l33tlabs.org/docs/api/com ... mmary.html


In fact, my question was more, are offscreens buffers uspported by slick AE (pbuffers or fbo) ? I guess the answer is no, or maybe not yet ... If anyone has tried to do taht on Android, it would be nice to have feedback. Or maybe using offscreen buffers on Android is discouraged.

As a last resort, I can rewrite my renderer to be fully "onscreen", but I'd like some experience feedback before doing that :)

Thanks for your answer :)
TsuG


Top
 Profile  
 
PostPosted: Thu Nov 24, 2011 3:54 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I believe I have seen other posts about this, and it's supported. They usually seem to involve creating a graphics object and rendering to that.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Wed Jul 11, 2012 4:18 pm 
Offline

Joined: Mon Jun 04, 2007 2:02 pm
Posts: 8
same problem here!

I want to use the getGraphics()-method from an image but I got the same error.

Has anyone managed to get that working now?
Thanks for your help or tipps how to create an image and draw on it.


Top
 Profile  
 
PostPosted: Fri Aug 24, 2012 3:59 pm 
Offline

Joined: Mon Jun 04, 2007 2:02 pm
Posts: 8
Nobody knows? I would love to make some own images during operating time. That would boost my performace ...


Top
 Profile  
 
PostPosted: Sat Sep 01, 2012 7:16 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1477
You will want to use LibGDX's "Framebuffer". Since Slick-AE is built atop LibGDX, these classes should already be in your class-path. You can try out this if you want to get fancy.


Top
 Profile  
 
PostPosted: Sun Oct 14, 2012 9:46 pm 
Offline

Joined: Sun Jun 12, 2011 2:27 pm
Posts: 90
LibGDX > Slick for Android?
My Questions: viewtopic.php?f=21&t=5647


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group