Shadow help

i have been working on shadow mapping, I started out going to big to fast so i made a simple shadow map that is suppose to map from one point (10,10,10) i don’t really know what the problem is I just know it isn’t working.  Just to be clear the black square stays in the middle of the screen don’t know why.

picture of what is going on

here is code

package shadow;
import org.lwjgl.opengl.ARBShadow;
import org.lwjgl.opengl.GL11;

import com.jme.bounding.BoundingBox;
import com.jme.image.Texture;
import com.jme.light.DirectionalLight;
import com.jme.light.PointLight;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.renderer.TextureRenderer;
import com.jme.scene.shape.Box;
import com.jme.scene.shape.Sphere;
import com.jme.scene.state.GLSLShaderObjectsState;
import com.jme.scene.state.LightState;

public class simpleShadowMap extends SimpleGame {
   public static void main(String args[]){
      simpleShadowMap app = new simpleShadowMap();

   protected void simpleInitGame() {
      TextureRenderer tr = display.createTextureRenderer(512,512,false,false,true,false,TextureRenderer.RENDER_TEXTURE_2D,0);
      Texture shadowMap = new Texture();
      Box b = new Box();
      b.setData(new Vector3f(0,0,0),3,3,3);
      b.setModelBound(new BoundingBox());
      Box q = new Box();
      q.setData(new Vector3f(0,-3,0),10,0,10);
      GLSLShaderObjectsState shader = display.getRenderer().createGLSLShaderObjectsState();
      LightState ls = display.getRenderer().createLightState();
      PointLight sl = new PointLight();
      sl.setLocation(new Vector3f(10,10,10));
      DirectionalLight dl = new DirectionalLight();
      dl.setDirection(new Vector3f(0,0,0));

      Sphere s = new Sphere("light");
      s.setData(new Vector3f(13,13,13),10,10,3);
      //Debugger.drawBuffer(Texture.RTT_SOURCE_DEPTH, Debugger.NORTHEAST, display.getRenderer());

         tr.getCamera().setLocation(new Vector3f(10,10,10));
         tr.getCamera().lookAt(new Vector3f(0,0,0),new Vector3f(0,1,0));


Shader vertex code

varying vec4 projCoord;

void main()
   vec4 realPos = gl_ModelViewMatrix * gl_Vertex;
   projCoord = gl_TextureMatrix[0] * realPos;
   gl_FrontColor = gl_Color;

   gl_Position = ftransform();

Shader fragment code

uniform sampler2DShadow shadowMap;
varying vec4 projCoord;

void main ()
   const float kTransparency = 0.3;
   vec4 color = gl_Color;

   float rValue = shadow2DProj(shadowMap, projCoord).r + kTransparency;
   rValue = clamp(rValue, 0.0, 1.0);

   vec3 coordPos  = / projCoord.w;

   if(coordPos.x >= 0.0 && coordPos.y >= 0.0 && coordPos.x <= 1.0 && coordPos.y <= 1.0 )
      gl_FragColor = color * rValue;
      gl_FragColor = color;

I will probably be corrected, but think you need to assign material states to youre boxes

could you expand on why?  I'll give it a try

Materials allow light absorbtion and defraction

no that is a example of the shadow already put in jme, I wrote a shadow mapping thing it uses off screen rendering to get the depth texture from the lights pos and then you render from the eyes position and compare the lights view to the eyes view to see what is in shadow.  It is so straight forward(the code) I can't see why it won't work.

help anyone? :?