0

My goal is to enable antialiasing in the C++ win32 application that uses powerVR SDK on a visual studio 2015. Searching on the web for how to it gave me some ideas of using egl, so I tried this method

`   EGLint attribs[] =
    {
        EGL_LEVEL, 0,
        EGL_NATIVE_RENDERABLE, 0,
        EGL_BUFFER_SIZE, 0,
        EGL_DEPTH_SIZE, 16,
        EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
        EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
        EGL_SAMPLE_BUFFERS, 1,
        EGL_SAMPLES, 4, 
        EGL_NONE
    };

    attribs[1] = 16; // 16x anti-aliasing
    EGLConfig config = new EGLConfig[1];
    EGLint num_config;

    bool result = eglChooseConfig(eglGetDisplay(EGL_DEFAULT_DISPLAY), attribs, &config, 1, &num_config);
    if (!result)
    {
        this->setExitMessage("Antialiasing has not configured properly");
        return pvr::Result::Enum::InvalidData;
    }`

It compiles and runs perfectly without errors but lines are still jagged as hell - antialiasing not applying.

What am I doing wroung in the code above ?

What is the right way ?

ampawd
  • 968
  • 8
  • 26
  • http://stackoverflow.com/questions/27035893/antialiasing-in-opengl-es-2-0 Also, settings `attribs[1] = 16` is not doing what you want it to do. `attribs` is just an array of int (EGLint), so you are setting the 2nd element to `16`, eg requesting EGL_LEVEL=16. Probably this isn't supported. – MuertoExcobito Nov 02 '16 at 09:24
  • @MuertoExcobito thanks for suggestions, however I already fixed this issue - the problem was that NVIDIA driver was overriding any customly enabled antialiasing - I just set it to not override from NVIDIA control panel - and it worked – ampawd Nov 02 '16 at 10:42

0 Answers0