listen - I'm trying to learn the libGDX API because I want to develop a small cross-platform game, mostly for smartphones (Android iOS).
So I started a new project with the libGDX special setup that the developers made, I installed Gradle on my Eclipse and everything went out great, I ran the 'Desktop' version of the small demo, and it worked out perfectly (Linux if that matters), I even did a couple of changes in the code and made a really small game, which worked out fine.
And then, I wanted to follow my main goal, and start developing for Android, so I ran an emulator, created a brand new clean project, and I was told that the app unexpectedly stopped, then I saw that to run opengl2 in Android emulator I have to check the 'gpu host' box, so I did that.
I restarted the emulator, ran my app and all I saw was a black screen, and in the catlog console I was informed with the next line:
E/EGL_emulation(1191): rcCreateWindowSurface returned 0
and -
eglCreateWindowSurface(631): error 3x3003 (EGL_BAD_ALLOC)
I don't know what to do now, I even tried to run it in a real Android device and I got the same results, how could I fix this problem/error ?
EDIT: here is some source files if you're wondering -
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class FlappyRabbi extends ApplicationAdapter {
SpriteBatch batch;
Texture img;
@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
}
@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(img, 0, 0);
batch.end();
}
}
0 comments:
Post a Comment