Replacing theme() with render() in a block_view I'm trying to replace the theme() with render() as recommended:

https://api.drupal.org/api/drupal/includes!theme.inc/function/theme/7
So I started with:

 function mymodule_block_view()
 {      
  $variables['module_path'] = drupal_get_path('module', 'mymodule');
  $block['subject'] = t('mymodule Slide');
  $block['content'] = theme('mymodule', $variables);
    return $block;
  }


And I tried

 function mymodule_block_view()
 {   
    $variables['module_path'] = drupal_get_path('module', 'mymodule');
    $block['subject'] = t('OpenDTP Slide');
    $rdr = array(
      '#theme' =&gt; 'opendtp_slide',
        '#module_path' =&gt; $variables['module_path'],
     );
    $block['content'] = render($rdr);
    return $block;
}


But it says Undefined variable for module_path that I used in the tpl.php file.
How I'm a supposed to use variables in the template then ? What is the correct way of doing it ?
How about:

...
$rdr = array(
  '#theme' =&gt; 'opendtp_slide',
  '#module_path' =&gt; drupal_get_path('module', 'mymodule')
);
...