OpenGL multisampling doesn't work?

1.1k views Asked by At

I called glEnable with GL_MULTISAMPLE and used "sample in vec4 color" as the input vector in my fragment shader, yet multisampling is still off. What am I doing wrong? Is there any parts I'm missing?

p.s. I'm reading the official OpenGL programming guide (ver 4.3).

Edit: some code:

the fragment shader is as follows:

#version 430
sample in vec4 color;
out vec4 outputColor;

void main()
{
    outputColor = color;
}

And in my application I call glEnable(GL_MULTISAMPLE). Right after that I render a simple cube that rotates and it clearly isn't antialiased.

1

There are 1 answers

2
datenwolf On

You must select a pixelformat for your window that actually supports multisampling. Without that, enabling multisampling in OpenGL has no effect.