| 828 | //----------------------------------------------------------------------------- |
| 829 | |
| 830 | void SFXEmitter::_renderObject( ObjectRenderInst* ri, SceneRenderState* state, BaseMatInstance* overrideMat ) |
| 831 | { |
| 832 | // Check to see if the emitter is in range and playing |
| 833 | // and assign a proper color depending on this. |
| 834 | |
| 835 | ColorI color; |
| 836 | if( _getPlaybackStatus() == SFXStatusPlaying ) |
| 837 | { |
| 838 | if( isInRange() ) |
| 839 | color = smRenderColorPlayingInRange; |
| 840 | else |
| 841 | color = smRenderColorPlayingOutOfRange; |
| 842 | } |
| 843 | else |
| 844 | { |
| 845 | if( isInRange() ) |
| 846 | color = smRenderColorStoppedInRange; |
| 847 | else |
| 848 | color = smRenderColorStoppedOutOfRange; |
| 849 | } |
| 850 | |
| 851 | // Draw the cube. |
| 852 | |
| 853 | GFXStateBlockDesc desc; |
| 854 | desc.setZReadWrite( true, false ); |
| 855 | desc.setBlend( true ); |
| 856 | desc.setCullMode( GFXCullNone ); |
| 857 | |
| 858 | GFXDrawUtil *drawer = GFX->getDrawUtil(); |
| 859 | drawer->drawCube( desc, Point3F( 0.5f, 0.5f, 0.5f ), getBoxCenter(), color ); |
| 860 | |
| 861 | // Render visual feedback for 3D sounds. |
| 862 | |
| 863 | if( ( smRenderEmitters || isSelected() ) && is3D() ) |
| 864 | _render3DVisualFeedback(); |
| 865 | } |
| 866 | |
| 867 | //----------------------------------------------------------------------------- |
| 868 |
nothing calls this directly
no test coverage detected