Trouble with texture

While the idea of modelling the box as three pairs of sides is by far the simplest way to do this, it does mean that our final adjacent surfaces won’t share the same vertices which introduces the problem of T-junctions in lower anti-aliasing settings.

I have managed to get what I wanted but the way I did it is much more complicated than it has any right of being. Nonetheless I will describe what I did here in case anyone finds this useful in the future.

First things first, I unwrapped the Blender3D cube such that each face takes up the entire size of the UV map. Then after exporting the egg file, I added 6 groups to the 6 polygons, like this:

<Group> Top {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {0.000000 0.000000 -1.000000}
	  <VertexRef> { 0 1 2 3 <Ref> { Cube }} 
	}
}

<Group> Bottom {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {0.000000 0.000000 1.000000}
	  <VertexRef> { 4 5 6 7 <Ref> { Cube }} 
	}
}
<Group> Right {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {1.000000 -0.000000 0.000000}
	  <VertexRef> { 8 9 10 11 <Ref> { Cube }} 
	}
}
<Group> Back {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {-0.000000 -1.000000 -0.000000}
	  <VertexRef> { 12 13 14 15 <Ref> { Cube }} 
	}
}
<Group> Left {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {-1.000000 0.000000 -0.000000}
	  <VertexRef> { 16 17 18 19 <Ref> { Cube }} 
	}
}
<Group> Front {
	<Polygon> {
	  <MRef> { Material }
	  <Normal> {0.000000 1.000000 0.000000}
	  <VertexRef> { 20 21 22 23 <Ref> { Cube }} 
	}
}

And then I implement the textures in python and individually resize them as follows:

        textr = loader.loadTexture('Window.png')
        
        self.box.find("**/Right").setTexture(textr, 1)
        self.box.find("**/Right").setTexTransform(TextureStage.getDefault(),
                                                  TransformState.makeScale2d(VBase2(self.box.getScale().getZ(),
                                                                                    self.box.getScale().getY())))

        self.box.find("**/Left").setTexture(textr, 1)
        self.box.find("**/Left").setTexTransform(TextureStage.getDefault(),
                                                  TransformState.makeScale2d(VBase2(self.box.getScale().getZ(),
                                                                                    self.box.getScale().getY())))

        self.box.find("**/Front").setTexture(textr, 1)
        self.box.find("**/Front").setTexTransform(TextureStage.getDefault(),
                                                  TransformState.makeScale2d(VBase2(self.box.getScale().getZ(),
                                                                                    self.box.getScale().getX())))

        self.box.find("**/Back").setTexture(textr, 1)
        self.box.find("**/Back").setTexTransform(TextureStage.getDefault(),
                                                  TransformState.makeScale2d(VBase2(self.box.getScale().getZ(),
                                                                                    self.box.getScale().getX())))