GLSL shader problem

Here’s a simple app that demonstrates the problem. If I run this under gdb and force GLShaderContext::uses_custom_vertex_arrays() to always return false, then this works. Otherwise it doesn’t render anything visible.

from panda3d.core import *
from direct.showbase.ShowBase import ShowBase

vshader = """
void main() {
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
"""

fshader = """
void main() {
    gl_FragColor = vec4(1.0, 0.5, 1.0, 1.0);
}
"""

class Game(ShowBase):
    def __init__(self):
        """Get the game ready to play."""
        ShowBase.__init__(self)
        self.model = self.loader.loadModel('smiley')
        self.model.reparentTo(render)
        self.shader = Shader.make(Shader.SLGLSL, vshader, fshader)
        self.model.setShader(self.shader)
        self.cam.setPos(0, -10, 0)

game = Game()
game.run()