I just checked the code in the 0.9 release. Shadow support is all still there, al least in the open GL version of CanvasPeerImpl.
In the renderMain method there is a line:
// render shadows if there are any occluders
1050 if ((!isPickMode()) && ((shotCreator == null) || (shotCreator.getFormat() == ScreenshotCreator.Format.RGB)) && (binProvider.getShadowsBin().size() > 0) && (renderingOptions.getOption(Option.USE_SHADOWS)) )
1051 {
1052 drawShadows( binProvider.getShadowsBin() );
1053 }
So in your test make sure you have the USE_SHADOWS rendering options. If you are already way past such simplistic solutions then let me know. The shadow rendering code is really standard, I probably stole it from carmack.
Here is the guts:
/**
404 * draws the shadow volumns in the render bin
405 * @param bin
406 */
407 private final void drawShadows(ShadowBin bin)
408 {
409 ProfileTimer.startProfile( "CanvasPeerImpl::drawShadows" );
410 final int FULLMASK = 0xffffffff;
411 final int STENCIL_VAL = 128;
412
413 // determine edges
414 for (int i = 0; i < bin.size(); i++)
415 {
416 bin.getOccluder(i).determineVisibleEdges( bin.getLightSource() );
417 }
418
419 GL11.glPushAttrib( GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT |
420 GL11.GL_ENABLE_BIT | GL11.GL_POLYGON_BIT |
421 GL11.GL_STENCIL_BUFFER_BIT );
422
423 GL11.glPushMatrix();
424 GL11.glLoadIdentity();
425 GL11.glDisable( GL11.GL_LIGHTING ); // turn off Lighting
426 GL11.glDisable( GL11.GL_TEXTURE_2D );
427 GL11.glDisable( GL12.GL_TEXTURE_3D );
428 GL11.glDisable( GL11.GL_BLEND );
429 GL11.glStencilFunc( GL11.GL_NEVER, 0xff, FULLMASK );
430
431 GL11.glDepthMask( true );
432 GL11.glDepthFunc( GL11.GL_LEQUAL );
433 GL11.glEnable( GL11.GL_DEPTH_TEST );
434
435 GL11.glPopMatrix();
436
437 GL11.glColor3f( 1f, 0f, 0f );
438 GL11.glClearStencil( STENCIL_VAL );
439 GL11.glClear( GL11.GL_STENCIL_BUFFER_BIT );
440
441 GL11.glDisable( GL11.GL_LIGHTING ); // turn off Lighting
442
443 GL11.glFrontFace( GL11.GL_CCW );
444 GL11.glEnable( GL11.GL_CULL_FACE );
445 GL11.glCullFace( GL11.GL_FRONT );
446
447 GL11.glDepthMask( false ); // turn off writing to the Depth-Buffer
448 GL11.glDepthFunc( GL11.GL_LEQUAL );
449 GL11.glEnable( GL11.GL_DEPTH_TEST );
450 GL11.glEnable( GL11.GL_STENCIL_TEST ); // turn on Stencil-Buffer testing
451 GL11.glColorMask( false, false, false, false ); // don't draw into the Color-Buffer
452 GL11.glStencilFunc( GL11.GL_ALWAYS, STENCIL_VAL, FULLMASK );
453
454 // First Pass. Increase Stencil Value In The Shadow
455 GL11.glStencilOp( GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_INCR );
456
457 for (int i = 0; i < bin.size(); i++) {
458 drawObjectShadow( bin.getOccluder( i ), bin.getLightSource() );
459 }
460
461 // Second Pass. Decrease Stencil Value In The Shadow
462 GL11.glCullFace( GL11.GL_BACK );
463 GL11.glStencilOp( GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_DECR );
464
465 GL11.glColor3f(0.5f, 0.5f, 0f);
466 for (int i = 0; i < bin.size(); i++)
467 {
468 drawObjectShadow( bin.getOccluder(i), bin.getLightSource() );
469 }
470
471 GL11.glColorMask( true, true, true, true ); // enable rendering to Color-Buffer for all components
472
473 // Draw A Shadowing RectanGL11.gle Covering The Entire Screen
474 GL11.glColor4f( 0.0f, 0.0f, 0.0f, 0.4f );
475 GL11.glEnable( GL11.GL_BLEND );
476 GL11.glEnable( GL11.GL_DEPTH_TEST );
477 GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
478
479 // get rid of the view matrix, only have the projection matrix
480
481 GL11.glMatrixMode( GL11.GL_PROJECTION );
482 GL11.glLoadIdentity();
483 view.getProjection().get( trans );
484 floatBuffer4x4.clear();
485 floatBuffer4x4.put( trans ).flip();
486 floatBuffer4x4.rewind();
487 GL11.glLoadMatrix( floatBuffer4x4 );
488
489 GL11.glMatrixMode( GL11.GL_MODELVIEW );
490 GL11.glPushMatrix();
491 GL11.glLoadIdentity();
492
493 GL11.glDepthMask( false );
494
495 GL11.glEnable( GL11.GL_STENCIL_TEST ); // turn on Stencil-Buffer testing
496 GL11.glStencilFunc( GL11.GL_NOTEQUAL, STENCIL_VAL, FULLMASK );
497 GL11.glStencilOp( GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP );
498 GL11.glCullFace( GL11.GL_BACK );
499 GL11.glDisable( GL11.GL_CULL_FACE );
500 GL11.glAlphaFunc( GL11.GL_ALWAYS, 0f );
501
502 GL11.glBegin( GL11.GL_TRIANGLE_STRIP );
503 GL11.glVertex3f( -100f, 100f, -2f );
504 GL11.glVertex3f( -100f, -1000f, -2f );
505 GL11.glVertex3f( +100f, 100f, -2f );
506 GL11.glVertex3f( +100f, -1000f, -2f );
507 GL11.glEnd();
508
509 GL11.glPopMatrix();
510
511 GL11.glPopAttrib();
512 ProfileTimer.endProfile();
513 }
Oh and one last thing, you need at least one DIRECT light source for shadow casting.