Hi, I am wondering about the Shaperenderer: http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.html
shapeRenderer.begin(ShapeType.FilledCircle);
shapeRenderer.setColor(0, 0, 0.4f, 0.3f);
shapeRenderer.filledCircle(100,100,20);
shapeRenderer.setColor(1, 1, 0, 0.3f);
shapeRenderer.filledCircle(100,100,10);
shapeRenderer.end();
Normally I would use the spritebatch for drawing, but this time I just want to draw a circle that contains another circle with a different color. In addition the one on the bottom shouldshow through the other. I just don’t get it who to enable the alpha-“function” / if you google it, it always shows articles about the spritebatcher.
I thought
Gdx.graphics.getGL10().glEnable(GL10.GL_BLEND);
Gdx.graphics.getGL10().glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
would manage it, but “glEnable(GL10.GL_BLEND)” throws nullpointer…
I am new to opengl-fun and that’s absolutely confusing me, I just don’t get what I am doing wrong :
thx for help and patience