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 ?