irrCg v0.8 (Initial) - CgFX (Texture States, MultiPass etc.)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
aheymann
Posts: 153
Joined: Wed Aug 22, 2007 12:25 pm
Location: England

Post by aheymann »

Nadro

Sorry - have just stumbled apon this extension. Looks good! Some very simple questions - how do I recompile irrcg with the SVN trunk (or with any other version for that matter). I could not find any documentation on that. Has this yet been intergrated with Irrlicht itself?

I found this link http://nadro.net46.net/IrrCg/IrrCg.vcproj - but it appears to be dead. I could really do with a VS2005 project file:). I would be happy to provide you with some web space if you require it for downloads!

Thanks

Anton
aheymann
Posts: 153
Joined: Wed Aug 22, 2007 12:25 pm
Location: England

Post by aheymann »

Please ignore the previous post :oops: I thought this app generated a DLL of some kind - therefor the request for a project file.
aheymann
Posts: 153
Joined: Wed Aug 22, 2007 12:25 pm
Location: England

Post by aheymann »

Nadro

I have incorporate V.07 in my application, but when I exit the app, I get a number of exceptions mainly in cgd3d9.dll. Also, all your examples do the same (I simply ran the applications without recompiling them). Any ideas what could be causing this. I am running within VS2005 (Vista 64 bit).

Another thing - is it possible to provide some additional XML files to describe additional material parameters. Something like samples for the other .CG files in the project will be extremely usefull - e.g. Multitexturing, LightingVert.

I have made some changes to the code, to support multiple scenemanagers (e.g. speficify the scene manager to use) and also to be able to define a 'root' folder, for the shaders and xml files to be located within in a general folder environment.

How would I go about providing 'runtime' information e.g. current light positions etc. At the moment, the structure is that when OnSetConstants is called, 'static' information is return e.g. lightdiffuse colour is provided from within the XML file - should there not be more extensions provided e.g. ParameterCameraPosition

What I am trying to do is to use .CG files as a common shader interface and provide 'programmable' materials, based on XML files. It does appear that your interface goes a long way to providing this, but are you going to be developing this further, or should I carry on and provide more functionality to classes. This is a very useful extension, but it does need a bit more work to be fully end-user configurable.

Thanks

Anton
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Hi aheymann,

I know currently XML material should be more configurable, but I have to rewrite existing interface for it, and add more options in next version. I also have got error on exit application in Vista x64, this is probably NV CG dll's error so I can't improve it. In current version Material XML parameters supports are enought only for simple shaders eg. multitexturing, lighting etc. but for more advenced shaders it isn't enought... In my opinion the best solution for creating advenced shaders is writing callback for it in native c++ code.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Post by asparagusx »

I think you are onto something really nice here. I am trying to implement a completely configurable materials interface, based on shaders. It would be great to configure all the shader parameters within the xml interface, which means that there is no need for developing individual callbacks in your code.

I think there is also some overlap between what you are doing here and what Blindside is doing within XEffects - maybe you guys should work together!

Keep up the good work!

Anton
IrrWHAT?!
Posts: 33
Joined: Tue May 20, 2008 9:18 am
Location: Australia

Post by IrrWHAT?! »

I tried to compile the example 01.BasicLighting and received the following error messages:

[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::ICgProgrammingServices(irr::IrrlichtDevice*)'
[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::addCgShaderMaterialFromFiles(CGenum, char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, IrrCg::ICgShaderConstantSetCallBack*, irr::video::E_MATERIAL_TYPE, char const**)'
[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::addCgShaderMaterialFromFiles(CGenum, char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, IrrCg::ICgShaderConstantSetCallBack*, irr::video::E_MATERIAL_TYPE, char const**)'
[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::~ICgProgrammingServices()'
ld returned 1 exit status

I am using Dev-C++. It was mentioned in previous posts about having to recompile irrcg to work with a later version of irrlicht (1.4.2). That isn't necessary is it? If it is I don't have a clue what to do. Please excuse me for being so green, but I've had bad experiences with recompiling code, so I tend to avoid doing it at all costs :?
EvIl_DeViL
Posts: 89
Joined: Tue Nov 06, 2007 4:49 pm

Post by EvIl_DeViL »

i tried to recompile the example number 4 and i get this:

Code: Select all

main.obj||error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventReceiver *,char const *)" (__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z) non risolto nella funzione _main|
shader.exe||fatal error LNK1120: 1 esterni non risolti|
||=== Build finished: 2 errors, 0 warnings ===|
i recompiled irrlicht 1.4.2 -> libIrrlicht.a
can I use it with the IrrCg.lib in the \IrrCg_v0_7\lib\Win32-VisualStudio?
i recompiled that too...
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

You needn't recompile Irrlicht, but IrrCg (in IrrCg rebuilding process You don't add any libraries for it eg. Irrlicht lib etc.), and add this prebuilded library to libraries in Yours project, thats all.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Is it possible to compile IrrCG under DevCPP? i can compile the Irrlicht DLL, so i'm not sure about it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Yes, of course, this code is compiler independent.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's the link for the v0.7 package.

https://sourceforge.net/project/showfil ... _id=298582
Image
EvIl_DeViL
Posts: 89
Joined: Tue Nov 06, 2007 4:49 pm

Post by EvIl_DeViL »

Nadro wrote:You needn't recompile Irrlicht, but IrrCg (in IrrCg rebuilding process You don't add any libraries for it eg. Irrlicht lib etc.), and add this prebuilded library to libraries in Yours project, thats all.
I know but my libIrlicht.a seems to be not compatible with my irrcg.lib... if i compile with the default libirrlicht.a it works... if I use mine it doesn't... T.T however i make it work including the whole source of the irrcg...
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

IrrCG will have to be recompiled with your version of Irrlicht if it's not the same as the one IrrCG was originally compiled with (presumably 1.4.2), so if you're using a newer/older version of Irrlicht you'll have to rebuild IrrCG with that version.
Image Image Image
IrrWHAT?!
Posts: 33
Joined: Tue May 20, 2008 9:18 am
Location: Australia

Post by IrrWHAT?! »

IrrCG readme says it was compiled for irrlicht v1.4, not 1.4.2.
Unfortunately this makes it a nightmare for compilling noobs such as myself.

Clearly, I have to recompile IrrCG to work with my system so can anyone please give a guide on how to do that successfully (without the endless stream of compiler errors). Any help would be greatly appreciated (Even just a push in the right direction)

N.B.
A problem I may need to fix first, but don't know how:
Irrlicht spits out (on any irrlicht app I compile that uses dx9):
"DIRECT3D9 Driver was not compiled into this dll. Try another one."
I'm using Microsoft DirectX SDK (March 2008) and Irrlicht v1.4.2.
I've searched forums, to no avail.

Thx.
xsinick
Posts: 18
Joined: Fri Aug 10, 2007 12:05 am

Post by xsinick »

Nadro
I'm using dev c++ and i'm tryingto compile your code.

[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::ICgProgrammingServices(irr::IrrlichtDevice*)'
[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::addCgShaderMaterialFromFiles(CGenum, char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, IrrCg::ICgShaderConstantSetCallBack*, irr::video::E_MATERIAL_TYPE, char const**)'
[Linker error] undefined reference to `IrrCg::ICgProgrammingServices::~ICgProgrammingServices()'
ld returned 1 exit status


I s this only for codeblocks?

Help me please
Post Reply