Simple convolution question

I at first think this a beginner’ one but when I post there, nobody seems to work it out. So I put it here.

Now, I stuck on another point of convolution.

I have written the following code:


GLubyte convolutionTable3x3[3][3]=
{
	{1,1,1},
	{1,1,1},
	{1,1,1}
};
 
glPixelStorei(GL_UNPACK_ALIGNMENT,1);
glConvolutionFilter2D(GL_CONVOLUTION_2D,GL_LUMINANCE,3,3,GL_LUMINANCE,GL_UNSIGNED_BYTE,convolutionTable3x3);
glEnable(GL_CONVOLUTION_2D);
glWindowPos2i(0,0);
glDrawPixels(512,512,GL_STENCIL_INDEX,GL_UNSIGNED_BYTE,pboImageStore);
glDisable(GL_CONVOLUTION_2D);

The buffer pboImageStore has some value set 0 and some 2.
The result seems that the stencil buffer has all been set to zero.

Even when I set


GLubyte convolutionTable3x3[3][3]=
{
	{0,0,0},
	{0,1,0},
	{0,0,0}
};

The result seems that the stencil buffer has all been set to zero.

How can this be so? I just want to do some convolution on my stencil buffer.
Thanks in advance!

How is this different from the question you asked in the beginner’s forum? Don’t cross post. Don’t ask the same question in a different forum a few days later. This makes others and me sad pandas.

You didn’t see the first sentence I say in this thread here?

“I at first think this a beginner’ one but when I post there, nobody seems to work it out. So I put it here.”

And you think this is due to the sub-forum you chose? Do you think you’ll get more answers by cross-posting? Please read the forum guidelines.

Please don’t jump his case. Jump mine. link He didn’t post these threads at the same time. He followed-up to the Advanced only after not getting any hits on his Beginner’s thread after a day, and after asking whether it might be worth following up to Advanced.

We can quibble over whether a day was long enough, or whether you assume every reader reads every forum (they definitely don’t), but he was trying to do the right thing.

Now, does anyone know the answer to his question? Have personally never used or seen code that uses these legacy APIs.