Converting pair to Tuple with SWIG

Problems building or running the engine, queries about how to use features etc.
Post Reply
r0ut
Halfling
Posts: 44
Joined: Mon Feb 22, 2021 6:25 pm
x 2

Converting pair to Tuple with SWIG

Post by r0ut »

I have a problem where SWIG couldn't convert std::pair to Tuple in C#

I tried adding the following line but it didn't work

Code: Select all

%typemap(cstype) pair<size_t, size_t> "Tuple<uint, uint>"
It says it couldn't find Tuple in the namespace

I need this to use the getTextureDimensions() method from TextureUnitState

What can I do to fix this?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Converting pair to Tuple with SWIG

Post by paroj »

I suggest that you %template that pair for now. Converting to native types is non-trivial in swig as well as being mostly undocumented.
Post Reply