English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. C/C++ (https://eab.abime.net/forumdisplay.php?f=118)
-   -   SAS/C and extern "C" (https://eab.abime.net/showthread.php?t=88077)

alkis 06 September 2017 18:43

About abs do this...At the top of your source, after all the includes prototype abs like this.

Code:

extern "C" int abs(int);

emufan 07 September 2017 04:20

Quote:

Originally Posted by alkis (Post 1182908)
About abs do this...At the top of your source, after all the includes prototype abs like this.

Code:

extern "C" int abs(int);

yes, that did it, thanks :)

#1) just removed the file issue, kind of redundant, since all settings are stored in
the scene file already. not worth the trouble for our small user base :spin

emufan 25 September 2017 17:31

1 Attachment(s)
I found two more plugins by Bman :D

one I was able to convert from cpp to c. just a problem with the result of the effect.
the 2nd one I have problem while translating from cpp to c:
Code:

        dXInit((sa->oPos[0] / defInst->fXSize) - defInst->fXCenter);
mand.c 428 Error 15: invalid function call

        dYInit((sa->oPos[1] / defInst->fYSize) - defInst->fYCenter);
mand.c 429 Error 15: invalid function call

I had to move the definitions to the first lines of the src, but something does not work
for dXInit and dYInit.
orig and my src included.
are you still around, alkis? :spin

#1) i've found something trivial: i've changed:
Code:

        dXInit((sa->oPos[0] / defInst->fXSize) - defInst->fXCenter);
        dYInit((sa->oPos[1] / defInst->fYSize) - defInst->fYCenter);
to
        dXInit = ((sa->oPos[0] / defInst->fXSize) - defInst->fXCenter);
        dYInit = ((sa->oPos[1] / defInst->fYSize) - defInst->fYCenter);

it does work, but the effect is not mandelbrot alike, hmm.
can you look at it?! maybe i made a mistake somewhere.

#2) hmm, it does work, it is not a fractal mandelbrot effect,
it "only" influences the luminosity of a surface.
and this does work.

I should look for some easy math formulas for certain effect, so we could add some new effect
to the plugins, similiar to the fader plugin, i made from the blinker plugin.

problem may be those given API functions, something with a pixelshader would
be worth an attempt, but there is not a single example src for that plugin type, IIRC :/

#3) pixelshader is also only some effect to the final rendered image.
those shaderplugins are the type to add some procedural textures to an object/surface. *hmm*

emufan 25 September 2017 17:53

I just found this great website by Bman: The Art of LightWave Plug-ins
Creating a LightWave Image Filter plug-in, step by step.
Bman's website has the new and older plugins, incl source and some info about Bman himself.

*big thanks* to archive.org for preserving those old website.
all those old stuff would have been lost otherwise.

#1) what about a displacement plugin, HOT Ocean ToolKit , is open source :spin
next to the shader/particle effect, the transformation for a given mesh should be doable.
it is more or less an advanced gooze displacement plugin.


All times are GMT +2. The time now is 18:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06815 seconds with 11 queries