OpenGL Error with FilterPostProcessor.setNumSamples

I’m getting an OpenGL Error Invalid Enum (1280) when call FilterPostProcessor.setNumSamples with anything greater than 1. This occurs on Windows 7 with a modern NVidia card – see the description below. Thanks, Nick

ec 04, 2013 4:44:50 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.0 RC2
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Lwjgl 2.9.0 context running on thread LWJGL Renderer Thread
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: igdumd64
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 4.2.0
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: NVS 5400M/PCIe/SSE2
Dec 04, 2013 4:44:51 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 4.20 NVIDIA via Cg compiler

Are you setting it to random values? Are you setting it to values from app settings?

What exact values do you use that are “greater than 1”?

Here is the code I use to set fpp samples:
[java]
fpp = new FilterPostProcessor(app.getAssetManager());
int numSamples = app.getContext().getSettings().getSamples();
if( numSamples > 0 )
fpp.setNumSamples(numSamples);
[/java]

Also, it is a little concerning that your graphics card(s) seem to be confused as to their identity. On the one hand it is reporting itself as an intel graphics card (igdumd64) and on the other that it’s an nVidia card. It probably has nothing to do with the issue but it is strange.

@pspeed said: Are you setting it to random values? Are you setting it to values from app settings?

What exact values do you use that are “greater than 1”?

Here is the code I use to set fpp samples:
[java]
fpp = new FilterPostProcessor(app.getAssetManager());
int numSamples = app.getContext().getSettings().getSamples();
if( numSamples > 0 )
fpp.setNumSamples(numSamples);
[/java]

That’s what I used. If the num samples is anything but 1 (e.g. 2, 4, 8 ) I get the error. As for your last point, the machine is a laptop (its not mine, but rather a user’s) that switches from power-saving intel graphics to dedicated nvidia card when connected to power. I wonder if that explains the identity confusion. I think the machine was plugged in at the time so it should be using the dedicated nvidia card.

I should also say that the same code works fine on my Mac Pro under OSX 10.7.5.

thanks,

Nick

I’ve had numerous problems with these dual GPU setups and lwjgl picking the wrong card. I guess it’s at least trying to use the right one but it’s strange that the nvidia card would be failing in this way.

Have they made sure their drivers are up to date? Also, nvidia generally provides a way to force the system to use the advanced graphics card. It probably doesn’t help but it doesn’t hurt to try maybe.

And yeah, that’s why the confusion. I guess it’s using (and reporting) the intel GPU until OpenGL is fully setup and then it reports the other. Just a guess. As I recall, there are some values you can query from lwjgl before starting the context and those wouldn’t necessarily have the right adapter listed.