Author Topic: How do I enable Antialiasing?  (Read 3220 times)

Offline MrM

  • byte
  • *
  • Posts: 36
    • View Profile
How do I enable Antialiasing?
« on: September 21, 2011, 03:00:05 am »
With OpenGL ES 2.0, anti-aliasing becomes possible.

Sorry for the simple question, but could somebody explain how? I've no idea where or how to start.
I think SAMPLINGMODE is not an option. Or is it? I don't think the constructors would allow it...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How do I enable Antialiasing?
« Reply #1 on: September 21, 2011, 08:14:14 am »
Anti-Aliasing is available in the OpenGL ES2.0 supporting alpha version only, because 1.1 doesn't support it. You can download the latest alpha release from the ES2.0 thread. It has a class in the util-package that you can use in your initialization code to create a proper config chooser that should enable AA. See the JavaDocs of the alpha for more details.

Offline MrM

  • byte
  • *
  • Posts: 36
    • View Profile
Re: How do I enable Antialiasing?
« Reply #2 on: September 21, 2011, 09:29:15 am »
Heh, I'm already using a similar config chooser like in the GDC11 example, so I guess this shouldn't be too difficult to wriggle in.

EDIT: Extremely nice results! Although I'm kinda seeing some artifacts on my texture... Well they're not exactly artifacts but it feels just a little bit weirder (and I'm not talking about the edges).  It doesn't look bad, so I guess it's an AA aftereffect which takes place in my mind :)
But my device's DPI is pretty low anyways, and I've had aesthetic problems like this before. I'm surprised FPS didn't suffer. From 89fps down to 86 with 2 samples, and 80 with 4 samples. Texture size is 512x512, normal map too, and model is around 1500polys.
I'm concerned about something else though. The HTC Desire S has an overheating problem (A friend of mine's is being repaired, and I'm sure other models have it too), and when I looked it up it seemed very common for people to have theirs fixed after a month of usage. Do you think this is a bit too much for the GPU? I wouldn't want to put something out there that could ruin someone's day :)
« Last Edit: September 21, 2011, 09:42:01 am by MrM »

Offline MrM

  • byte
  • *
  • Posts: 36
    • View Profile
Re: How do I enable Antialiasing?
« Reply #3 on: September 21, 2011, 09:50:43 am »
Oh, and I was already using the Alpha (shaders and all that), and was unaware that a DOC was in the package. I was using the one on the site  :-[
« Last Edit: September 21, 2011, 10:36:18 am by MrM »