Fixed so that the rbDrawable::Render function now wraps the sf::Renderer and sf::RenderTarget objects and passes the wrappers to the SFML::Drawable#render method.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1694 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
f991e29cd2
commit
feae42e7f7
@ -31,6 +31,8 @@ VALUE globalDrawableModule;
|
|||||||
/* External classes */
|
/* External classes */
|
||||||
extern VALUE globalVector2Class;
|
extern VALUE globalVector2Class;
|
||||||
extern VALUE globalColorClass;
|
extern VALUE globalColorClass;
|
||||||
|
extern VALUE globalRenderTargetInstanceClass;
|
||||||
|
extern VALUE globalRendererClass;
|
||||||
|
|
||||||
class rbDrawable : public sf::Drawable
|
class rbDrawable : public sf::Drawable
|
||||||
{
|
{
|
||||||
@ -47,6 +49,9 @@ protected:
|
|||||||
|
|
||||||
virtual void Render( sf::RenderTarget& aTarget, sf::Renderer& aRenderer ) const
|
virtual void Render( sf::RenderTarget& aTarget, sf::Renderer& aRenderer ) const
|
||||||
{
|
{
|
||||||
|
VALUE targetWrap = Data_Wrap_Struct( globalRenderTargetInstanceClass, 0, 0, &aTarget );
|
||||||
|
VALUE rendererWrap = Data_Wrap_Struct( globalRendererClass, 0, 0, &aRenderer );
|
||||||
|
rb_funcall( myRubySelf, myRenderID, 2, targetWrap, rendererWrap );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user