Texture swapping question

hello,

I was wondering if this OpenGL code would be translated like this with panda3D:

OpenGL


  //some initialize loop
  CGparameter map0 = ...
  GLuint mapID[10];
  glGenTextures(1, &mapID[i]); 
  glBindTexture(GL_TEXTURE_2D, mapID[i]);

  //...

  //in the render call
  cgGLSetTextureParameter(map0,  mapID[Frame0]);
  cgGLEnableTextureParameter(map0);

Panda3D


  //in the init function
  PT(TextureStage) map0_ts = new TextureStage("map0");
  PT(Texture) mapID[10];
  //load/generate textures

  //...

  //in a render loop (task)
  myNode.set_texture(map0_ts, mapID[Frame0]);

What I am trying to do is swapping the textures in the render task - so that my shader references another texture each frame.

In the shader tutorial I am looking at the textures are swapped correctly but in my panda window all I see is that the texture is very blurry and doesn’t seem to change at all.
I suspect this is either down to this set_texture call that doesn’t do the same thing that the above mentioned Cg commands do or maybe my textures are not the same as the ones from the example I am trying to follow (they generate their textures from RAW files creating also the mip maps - while I am letting panda generate the mipmaps). Either way I would be grateful if someone could tell me if the above code does the same thing.

Chrys

I am setting my textures now like this

	

myNode.set_shader_input("map0", mapID[Frame0);

and in my shader

half4 fshader( vertexOut IN,
	       uniform sampler2D map0,           
	                                 ) : COLOR