Page 15 of 16

Posted: Thu Mar 11, 2010 7:08 am
by tinhtoitrangtay
Hi Nardo
i have a question. When i merge IrrCg to Irrlicht i can't finish complied
this is the error code - can you help me please?

Code: Select all

------ Build started: Project: 25.BasicLighting_vc9, Configuration: Release Win32 ------
Compiling...
main.cpp
Linking...
main.obj : error LNK2019: unresolved external symbol "public: int __thiscall IrrCg::ICgProgrammingServices::addCgShaderMaterialFromFiles(enum CGenum,char const *,char const *,char const *,char const *,char const *,char const *,char const *,char const *,class IrrCg::ICgShaderConstantSetCallBack *,enum irr::video::E_MATERIAL_TYPE,char const * *)" (?addCgShaderMaterialFromFiles@ICgProgrammingServices@IrrCg@@QAEHW4CGenum@@PBD1111111PAVICgShaderConstantSetCallBack@2@W4E_MATERIAL_TYPE@video@irr@@PAPBD@Z) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "public: __thiscall IrrCg::ICgProgrammingServices::ICgProgrammingServices(class irr::IrrlichtDevice *,bool,bool,enum CGenum)" (??0ICgProgrammingServices@IrrCg@@QAE@PAVIrrlichtDevice@irr@@_N1W4CGenum@@@Z) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "public: __thiscall IrrCg::ICgProgrammingServices::~ICgProgrammingServices(void)" (??1ICgProgrammingServices@IrrCg@@QAE@XZ) referenced in function "public: void * __thiscall IrrCg::ICgProgrammingServices::`scalar deleting destructor'(unsigned int)" (??_GICgProgrammingServices@IrrCg@@QAEPAXI@Z)
..\..\bin\Win32-VisualStudio\25.BasicLighting.exe : fatal error LNK1120: 3 unresolved externals
Build log was saved at "file://c:\HOCTAPLT\Irr\examples\25.BasicLighting\Release\BuildLog.htm"
25.BasicLighting_vc9 - 4 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You can make a project merge IrrCg to Irrlicht support IrrCg. Thanks

Posted: Tue May 04, 2010 10:45 am
by Terry
Hello folks,

This is the first time that i use irrCg,i believe some of us couldn't build one "Hello world"project(I'm the one :( so),after several hours trying i know the problem.If you have build one project and import *.lib files,including head files,still your project doesn't work,and show you many strange problems like

Code: Select all

error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP80D.dll)	IrrCg.lib
You'd better regenerate IrrCg.lib and IrrCg.dll by yourselves,the project properties should keep instance with your irrlicht project.
Sorry for my poor English,i hope i've expressed myself clearly.

Posted: Fri May 07, 2010 12:33 pm
by Nadro
You can try change "/MD" (Multi-threaded DLL Runtime Library) to "/MT" (Multi-threaded Runtime Library) in project option. It should help.

Posted: Thu May 20, 2010 3:30 pm
by telepuzik
Great work Nadro! keep it up.

i'm not sure I totally understand this, but in function OnSetConstants you use absolute values
of lightPosition and eyePosition

Code: Select all

        lightPosition = cgGetNamedParameter(Vertex, "lightPosition");
        services->setParameter3f(lightPosition, 0.0f, 0.0f, 120.0f);

        eyePosition = cgGetNamedParameter(Vertex, "eyePosition");
        vector3df CameraPosition = Device->getSceneManager()->getActiveCamera()->getAbsolutePosition();
        services->setParameter3f(eyePosition, CameraPosition.X, CameraPosition.Y, CameraPosition.Z);
but in CG SDK they use "Transform world-space eye and light positions to object-space"

Code: Select all

  /* Transform world-space eye and light positions to .......'s object-space. */
  transform(objSpaceEyePosition, invModelMatrix, eyePosition);
  cgSetParameter3fv(myCgFragmentParam_eyePosition, objSpaceEyePosition);
  transform(objSpaceLightPosition, invModelMatrix, lightPosition);
  cgSetParameter3fv(myCgFragmentParam_lightPosition, objSpaceLightPosition);
What is correct? :roll:

Posted: Thu May 20, 2010 4:12 pm
by sudi
telepuzik wrote: What is correct? :roll:
Depends on what you are doing in your shader....

Posted: Fri May 21, 2010 3:42 pm
by telepuzik
I am take irrCg example "01.BasicLighting", make light moving by adding createFlyCircleAnimator

When objects are allocated near zero point - lighting looks correct,

but if I move all objects (elephant,cube,sphere,camera,light) in a far point (for example 10000,0,10000) - lighting looks strange - as though the light source remained in a zero point

When I have added transform eye and light positions to object-space, lighting has work fine

Posted: Fri May 21, 2010 10:37 pm
by Nadro
irrCg examples are some bugged, I will improve it, when I found more free time.

Posted: Mon Jun 21, 2010 9:54 pm
by full_newbie
Hello Nadro. Please help. If I am compile IrrCG, I am getting error:

IrrCg.cpp(239) : error C2039: TextureWrap: ­Ґ пў«пҐвбп з«Ґ­®¬ "irr::video::SMaterialLayer"
c:\irrlicht-1.7.1\include\SMaterialLayer.h(49): б¬. ®Ўкпў«Ґ­ЁҐ 'irr::video::SMaterialLayer'
IrrCg.cpp(534) : error C2039: TextureWrap: ­Ґ пў«пҐвбп з«Ґ­®¬ "irr::video::SMaterialLayer"
c:\irrlicht-1.7.1\include\SMaterialLayer.h(49): б¬. ®Ўкпў«Ґ­ЁҐ 'irr::video::SMaterialLayer'

What wrong?

Posted: Fri Jun 25, 2010 10:38 am
by Nadro
You should use the latest version of irrCg from SVN.

Posted: Thu Jul 29, 2010 1:40 pm
by [DEF]
Hi guys,
I'm a complete noob when it comes to building sources :S
If someone could point me in the right direction,
on how to build IrrCg for openGL in DEV-C++, or code::blocks,
for mingGW :S
I'm completely stuck :(

edit: have got the latest Cg version from Nvidia, and the latest IrrCg from SVN, and the latest Irrlicht. Just for info :P

Posted: Sat Nov 27, 2010 7:22 am
by slavik262
Is IrrCg still being developed at all? The last check-in was almost half a year ago. Is there any continued development, or is it "done" at 0.8?

Posted: Thu Dec 02, 2010 3:27 pm
by Nadro
Hi,
In last time I was fully switched to OpenGL 3.x + GLSL (integrated with Irrlicht of course), so I have less time for develop irrCg, but project isn't dead, I will try add new features to it in winter holidays.

Posted: Thu Dec 02, 2010 4:07 pm
by Virion
Nadro wrote:Hi,
In last time I was fully switched to OpenGL 3.x + GLSL (integrated with Irrlicht of course)
cool. please do show us if you have any demo made with that :D

Posted: Thu Dec 02, 2010 6:08 pm
by Nadro
Sometime ago I worked on game which usage this version of OpenGL 3.x driver:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=39585

This is screenshot from an early development version of our (me - programming, Mateusz "Herszt" Bartkowiak - 3d + 2d graphic) game:
Image

Uploaded with ImageShack.us

We used here eg. hardware skinning (based on BlindSide idea) and texture arrays. I will release under Zlib license code (still in alpha version, so have some bugs) of small, pathfinding library which I prepared for this game (it use Navigation Meshes for solve paths).

Game will be not release and I can't say more about title of product, gameplay etc.

Posted: Wed Jan 12, 2011 10:02 pm
by Kalango
Thanks for this great binding Nadro! After a few adapting i got it working with Irrlicht 1.72 and GCC (latest MingW pack).
Thanks again!