AA not working

Started by Colli, September 12, 2012, 11:42:56 AM

Previous topic - Next topic

Colli

Hi,

I am trying to enable AA in my game on Android. I am doing it this way:
mGLView.setEGLContextClientVersion(2);
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView) {
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
int[] attributes = new int[] {EGL10.EGL_BLUE_SIZE,8,EGL10.EGL_RED_SIZE,8,EGL10.EGL_GREEN_SIZE,8, EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE };//EGL10.EGL_DEPTH_SIZE, 16,
EGLConfig[] configs = new EGLConfig[1];

int[] result = new int[1];
egl.eglChooseConfig(display, attributes, configs, 1, result);
return configs[0];
}
});


and in LogCat i found this:
Quote09-12 09:35:09.637: I/jPCT-AE(1267): No AA config found...defaulting to non-AA modes!
09-12 09:35:09.637: I/jPCT-AE(1267): No AA enabled!

As you can see i have enabled OpenGL 2.0, so i don't know what could be the problem.

Thanks for any help


Thomas.

I used this code and everything works

mGLView.setEGLContextClientVersion(2);
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView));

Colli

#2
I tried it, and it still keep logging "No AA config found ... defaulting non-AA modes! No AA enabled! "

EgonOlsen

You are sure that you've removed your overridden method? Because doing that renders the whole AAConfigChooser pointless. If so, which hardware are you trying it on?

Colli

Yes i have.
that is the whole code i am doing with the mGLView:
mGLView = new GLSurfaceView(getApplication());
mGLView.setEGLContextClientVersion(2);
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView));
renderer = new MyRenderer();
mGLView.setRenderer(renderer);
mGLView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
setContentView(mGLView);


and here is the FrameBuffer code initialization:
fb = new FrameBuffer(w, h);

Previously the AA was working on emalutor and also on the Samsung galaxy Ace device, but now it is not working on either of them. In emulator I am using android 4.1, which has support of OpenGL ES 2.0 on emulator, here is a log of it:
09-13 09:18:44.319: I/jPCT-AE(935): GL20 render pipeline initialized!
09-13 09:18:44.392: I/jPCT-AE(935): OpenGL vendor:     Google (ATI Technologies Inc.)
09-13 09:18:44.392: I/jPCT-AE(935): OpenGL renderer:   Android Emulator OpenGL ES Translator (ATI Radeon HD 4800 Series)
09-13 09:18:44.398: I/jPCT-AE(935): OpenGL version:    OpenGL ES 2.0 (3.3.11631 Compatibility Profile Context)
09-13 09:18:44.398: I/jPCT-AE(935): OpenGL renderer initialized (using 2 texture stages)


I tried to create new emulators, i restored the older version of my app where the AA might have been working, but nothing worked, i still keep getting "No AA enabled!"

I really don't know what else should i try  :-\

Thomas.

emulator is the worst way for testing graphics...

Colli

#6
I know (i don't have my own smartphone), but it was working on emulator before and also on real device(my friend's), but now it isn't.

EDIT:
i tried to use the second AAConfigChooser constructor:
QuoteAAConfigChooser(GLSurfaceView view, boolean withAlpha)
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView,true));
and now in log it says:
Quote09-13 15:35:35.454: I/jPCT-AE(1049): Unable to find a matching config...using default!

maybe this can help you  ???

EgonOlsen

Hard to tell from a distance...when it worked, this was with the same version of jPCT?

Colli

sorry I am answering so late.

The problem is resolved, i created new project, upgraded to the newest jpct (1.25) and it is working again  :D

Thanks both of you  ;)