OpenGL, nVidia, errors

So the past couple of days have been pretty frustrating for me. My computer must have updated its drivers and now OpenGL doesn’t really work at all. I’m getting 5 fps on a 40K vertex scene. I used to have 60 fps a month ago. Pstats says it’s all drawing time.

nVidia hasn’t exactly been helpful- they say that it’s the driver- which I got from them and updated to the latest one to be sure.

Anyway, 5 fps is pretty worthless so I tried to switch the config.prc file to DX. I get this error:

:display:gsg:dxgsg9(error): vertex_element_type_array check not implemented yet

I have some shaders running but honestly nothing very fancy at all. At first it runs the opening scene in the wrong colors then it crashes when I move to the next screen in my program with the error above.

Any tips? I figure I can either fix the OpenGL part- but I don’t know how I’d get that fixed or see what the issue is on the DX side. I tried DX-8 it just straight up crashes- DX-9 a least attempts to run the program.

Roll back your openGL driver?

Bump. This needs attention.

((And please, we’ve been through this, some of us need DX on Windows, we don’t like the burden of dual API’s, we aren’t foolish, if we didn’t need DX we wouldn’t bother, so the prototypical answer above isn’t very helpful. And if you want to know why we need it just read again what mavasher said about what happened to his OpenGL drivers. /rant))

It happened in 2008 also, see this thread and something possibly related (crash on exit) started happening to me at some point after updating to last panda CVS.

Since my program is very complex I started a small test from scratch. I just load a egg from the Panda distribution (actually is the code from the Panda tutorial) and assign this shader which is from the manual also:

//Cg
/* lesson2.sha */
 
void vshader(
    out float4 l_position : POSITION)
{
    l_position = float4(0.0, 0.0, 0.0, 0.0);
}
 
void fshader(
    out float4 o_color : COLOR)
{
    o_color = float4(1.0, 0.0, 1.0, 1.0);
}

And I get an infinite series of this:

EDIT: The thing is my program uses other (rather complex) shaders on DX and this doesn’t happen, but it has a crash on exit when shaders are used. So maybe this isn’t related and there’s just a problem with that shader that I encountered by coincidence while writing the test, in any case that shader is in the manual and if it has a problem, it needs fixing.

DX needs to be a priority. I would rather use just OpenGL but if nVidia continues to have OpenGL issues and most of the gaming world relies on DX then Panda needs good DX support.

@Gogg: Thanks for backing me up on this. I don’t see anything wrong with your shader code- perhaps it’s the l_position call. But I don’t know enough about how Cg and Panda and DX all mix together.

Just for the record, the shader is somewhat incorrect - it’s a division by zero, the fourth component of a position should not be zero. This shouldn’t cause a crash, though.

I’ve got this same problem when trying to run my game under dx9. Actually it sounds like I have exactly the same problems as mavasher.
The problem seems to arise depending on the model the shader is applied to and not the shader itself.
Looking in the C++ code I am guessing it is trying to decide what vertex data to pass on to the GPU, but the code looks like it is actually incomplete. There are lines commented out with question marks and so forth, it is a bit difficult to decipher.

“It is a bit difficult to decipher” aptly describes the Panda3D dx9 interface. :frowning:

David