Wrong emitter descriptor on mac

All information about Magic Particles: news, question, comments, etc.

Wrong emitter descriptor on mac

Postby bergen » Thu Dec 06, 2018 1:03 pm

Hi
I have some simple test project on Windows (working) and on Mac (not working). The issue is the descriptor returned by Magic_OpenStream (or in other version - by Magic_OpenFile).

In windows it works correctly - it returns for example 1 and is set as index.
On Mac the same code returns length of the file (150994953) and this is set as descriptor, and the as index and obviously does not work properly.
What could be the problerm?
bergen
 
Posts: 6
Joined: Thu Dec 06, 2018 1:00 pm

Re: Wrong emitter descriptor on mac

Postby Odin_KG » Thu Dec 06, 2018 1:10 pm

Hi

Are you sure, that you have the same version for Mac and Win ?
For example, new version does not return 1. But it may return the digit 150994953.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Wrong emitter descriptor on mac

Postby bergen » Thu Dec 06, 2018 1:12 pm

Hmm ok I will make sure. Code is the same, but library (dylib) might be newer on Mac then it is on Windows. Is there site with older versions? Where on Mac it would return small numbers like 1? Or just newest versions are available? I'm talking about dylib library.
bergen
 
Posts: 6
Joined: Thu Dec 06, 2018 1:00 pm

Re: Wrong emitter descriptor on mac

Postby Odin_KG » Thu Dec 06, 2018 2:19 pm

Code is the same, but library (dylib) might be newer on Mac then it is on Windows.

I am sure that you have old Windows version.

Is there site with older versions?

I do not save all old versions.There is version 3.45.

New version has multithreading, I advice use new version. The wrapper was changed too.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Wrong emitter descriptor on mac

Postby bergen » Thu Dec 06, 2018 2:40 pm

Thanks! I will do that!
bergen
 
Posts: 6
Joined: Thu Dec 06, 2018 1:00 pm

Re: Wrong emitter descriptor on mac

Postby Odin_KG » Thu Dec 06, 2018 2:55 pm

Thanks! I will do that!

You are welcome!
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Wrong emitter descriptor on mac

Postby bergen » Fri Dec 07, 2018 1:19 pm

Ok, slowly I got it working :) But now I have this linker issue at the end:

Undefined symbols for architecture x86_64:
"FreeTexture(unsigned char*)", referenced from:
MP_Atlas_WRAP::MP_Atlas_WRAP(int, int, char const*) in mp_wrap.o
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
"LoadTextureFromFile(MP_Manager*, char const*, int*, int*)", referenced from:
MP_Atlas_WRAP::MP_Atlas_WRAP(int, int, char const*) in mp_wrap.o
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
"LoadTextureFromMemory(unsigned char const*, int, int*, int*)", referenced from:
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
ld: symbol(s) not found for architecture x86_64

Any help? dylib is new, mp_wrap from the same archive...
bergen
 
Posts: 6
Joined: Thu Dec 06, 2018 1:00 pm

Re: Wrong emitter descriptor on mac

Postby Odin_KG » Fri Dec 07, 2018 6:21 pm

It is possible, you mixed 2 wrappers. Did you copy folder "_core" too ?
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Wrong emitter descriptor on mac

Postby bergen » Tue Dec 11, 2018 11:10 am

Ok, indeed I had mixed files from windows and mac. Now everything is set correctly and I moved on.
However I have one more issue - in mp::render

void* context = Magic->PrepareRenderArrays(..)

it weirdly "hangs" on this line. I mean it goes further, andcode exectutes, but nothing happens and the app is not working actually. When I comment this line (and few below, where "context" is being used) it works fine (but without particles).
bergen
 
Posts: 6
Joined: Thu Dec 06, 2018 1:00 pm

Re: Wrong emitter descriptor on mac

Postby Odin_KG » Tue Dec 11, 2018 11:24 am

There is my wrapper for Mac. At first, you need to launch it. I assume my wrapper will be working fine. At second, you need to add my wrapper to your program. If you mix different parts of several wrappers the result will be any.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Next

Return to Magic Particles

Who is online

Users browsing this forum: No registered users and 2 guests

cron