Sign in to follow this  

Quake 3 engine Renderer rewrite-Where to start?

This topic is 3570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm planning to rewrite the renderer in id tech 3 to Direct3d9. And I have plans to eventually move the whole engine to c++. But where should I start? Here is a couple of questions: 1.Can I code the renderer in C++ and retain the original c code? 2.If not, can someone guide me in what to change any help is appreciated

Share this post


Link to post
Share on other sites
Do you have and are you working from the ioquake3 source?

Why? OpenGL works on Mac, Linux, Windows.

C++ can interface with the C code, but I don't know how difficult it is. There are probably better forums for working with the quake 3 source, but I don't know them.

Share this post


Link to post
Share on other sites
Yes, it is possible, but if you have to ask the question then the task is probably beyond you. It's not a very small task, especially if the rendering backend is not already modularized. It would be less work to learn GLSL if you want to use shaders with the Quake 3 engine.

Share this post


Link to post
Share on other sites
Technically C++ is only compatible with a subset of C. It's very likely that if you simply try to compile the source code in Visual C++, you'll get a whole pile of errors and warnings due to code being incompatible with either C++ or the Visual C++ compiler.

Share this post


Link to post
Share on other sites
You could just put your new renderer into a DLL and then call the DLL methods from C code. This would allow you to write the renderer in C++.

As for converting the engine to C++: Unless you just want to make it compile with a C++ compiler, this will be a mamoth task. The Q3 engine has > 1 million lines of code and putting all of that into classes would be insane.

Share this post


Link to post
Share on other sites
How much do you want to rewrite?

The easy way is to delete the entire renderer code and start from scratch. (I attempted this. Very involved.)

If you want to use HLSL without rewriting massive amounts of code, Cg is a very similar language. It's fairly easy to integrate with OpenGL, but getting around Q3's renderer can be quite mind-bending.

If you want to use HLSL and DirectX, know that the renderer is tied closely to OpenGL. Ungluing it won't be easy without lots of new code - this is where option 1 starts to make sense.

You can write the new code in C++, yes, but you'll need to carefully separate it from the C code so it doesn't become impossible to even compile, or compile EVERYTHING as C++. Otherwise, you'd have to use the COM interfaces through C, which is possible but not particularly fun.

No matter what route you choose, there is one important tip I can give you: know the code before modifying it. id tech 3 ranges from very simple to understand to utterly incomprehensible, especially the renderer.

Share this post


Link to post
Share on other sites
If you really would like to use HLSL instead of GLSL, I would suggest checking out ATI's HLSL to GLSL conversion tool.

There was a short article on MacWorld.com a while ago here:
macworld.com Article

The direct link to the tool is:
hlsl2glsl Tool

From what I have heard the tool does a pretty good job. Just curious, why not learn both GLSL and HLSL? It could look good on your resume to know both ;-)

- Bill

Share this post


Link to post
Share on other sites
not sure but isn't directx c any ways? well that dont matter its still com so rendering to d3d is very possible if you need me to help with the project give me a line at owiley2002 at gmail.com

Share this post


Link to post
Share on other sites
Quote:
not sure but isn't directx c any ways?

No DirectX is a library. You can use it from any language or almost.
You can call D3D functions from C but the code will look complicated. I think it would look something like d3ddevice->vtable->function.

Quote:
The direct link to the tool is:
hlsl2glsl Tool

hlsltoglsl can produce some difficult to understand code from what I have seen.
If the OP really wants to use D3D, then go ahead.

Share this post


Link to post
Share on other sites
i was asking if directx was code in asm and c but i believe it was c++ not sure. Any way to the guy that began this post Half Life 2 has some id tech engine code so its all possible. Half life use directx so i see why not since the ported from same engine as quake 2 or 3

Share this post


Link to post
Share on other sites
I managed to get so far as loading the Quake III map format, caching the necessary resources and successfully displaying the map including lightmaps though this was a school project so I had limited time. You are probably looking at a fair bit of work to complete this in its entirety but I can vouch from personal experience to the effect that it's definitely not impossible depending on your level of DirectX experience. In any case I learned a great deal from it particularly in regards to BSP and collision detection as a whole.

Share this post


Link to post
Share on other sites
Quote:
Original post by owiley
i was asking if directx was code in asm and c but i believe it was c++ not sure. Any way to the guy that began this post Half Life 2 has some id tech engine code so its all possible. Half life use directx so i see why not since the ported from same engine as quake 2 or 3


Actually...it doesn't. Valve licensed Quake *1* back in the 90s. That's 1996 technology, and after that they did everything themselves. Source and id tech 3 are very different engines.

Share this post


Link to post
Share on other sites
Honestly, if you want to do a sort of idTech3 remix, you might be better off starting from scratch; That is, feature and file format specs.

John Carmack is known as a great code hacker with an expertise in graphics. He is not generally known as someone who writes clean code. Further, up until sometime after Quake 3, they hadn't really *fully* embraced proper C++, which is reflected in the overall design of certain things.

Share this post


Link to post
Share on other sites
okay, i removed alot of the old code, and I've been trying to implement the OGRE 3d rendering engine into quake 3, and I added opengameLIB as well, I just need to get opengamelib and OGRE to see each other and compile. so that i can get it to run. can someone help me?

BTW: http://oglib.sourceforge.net/ (open game lib)
http://ogre3d.org/ (ogre3D)

Share this post


Link to post
Share on other sites
Additionally, the old Id tech was written in C initially because of performance issues over C++ (mainly because of inexperience with optimized C++ usage, and also from immature compilers) so they stuck with C; these days there really is no difference.

I agree with the idea to just use the file format\spec and roll your own engine that uses them. It'll be less work with better results =)

~Graham

Share this post


Link to post
Share on other sites
okay, I just tried to compile, just after removing the remaining quake3 code (botlib). Here is the log:
1>------ Build started: Project: Game, Configuration: Debug Win32 ------
1>Linking...
1> Creating library ../Test/Gamex86.lib and object ../Test/Gamex86.exp
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ) referenced in function "void __cdecl Cmd_TestReadWrite_f(class ogCmdArgs const &)" (?Cmd_TestReadWrite_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ) referenced in function "void __cdecl Cmd_TestReadWrite_f(class ogCmdArgs const &)" (?Cmd_TestReadWrite_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z) referenced in function "void __cdecl Cmd_TestPair_f(class ogCmdArgs const &)" (?Cmd_TestPair_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "char const * __cdecl ogUtils::FloatArrayToString(float const *,int,int)" (?FloatArrayToString@ogUtils@@YAPBDPBMHH@Z) referenced in function "public: char const * __thiscall ogVec3::ToString(int)const " (?ToString@ogVec3@@QBEPBDH@Z)
1>GameCmds.obj : error LNK2001: unresolved external symbol "class ogMat3 mat3_identity" (?mat3_identity@@3VogMat3@@A)
1>GameCmds.obj : error LNK2001: unresolved external symbol "class ogMat2 mat2_identity" (?mat2_identity@@3VogMat2@@A)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: __thiscall ogWString::~ogWString(void)" (??1ogWString@@QAE@XZ) referenced in function "void __cdecl Cmd_TestWString_f(class ogCmdArgs const &)" (?Cmd_TestWString_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: __thiscall ogWString::ogWString(wchar_t const *)" (??0ogWString@@QAE@PB_W@Z) referenced in function "void __cdecl Cmd_TestWString_f(class ogCmdArgs const &)" (?Cmd_TestWString_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ogDict::GetString(char const *,char const *,class ogString &)const " (?GetString@ogDict@@QBE_NPBD0AAVogString@@@Z) referenced in function "void __cdecl Cmd_TestDict_f(class ogCmdArgs const &)" (?Cmd_TestDict_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogDict::SetString(char const *,char const *)" (?SetString@ogDict@@QAEXPBD0@Z) referenced in function "void __cdecl Cmd_TestDict_f(class ogCmdArgs const &)" (?Cmd_TestDict_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "int __cdecl ogUtils::StringToInt(char const *)" (?StringToInt@ogUtils@@YAHPBD@Z) referenced in function "public: bool __thiscall ogDict::GetBool(char const *,char const *,bool &)const " (?GetBool@ogDict@@QBE_NPBD0AA_N@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ogDict::GetString(char const *,char const *,char const * *)const " (?GetString@ogDict@@QBE_NPBD0PAPBD@Z) referenced in function "public: bool __thiscall ogDict::GetBool(char const *,char const *,bool &)const " (?GetBool@ogDict@@QBE_NPBD0AA_N@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ) referenced in function "public: void __thiscall ogDict::SetVec3(char const *,float,float,float)" (?SetVec3@ogDict@@QAEXPBDMMM@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "bool __cdecl ogUtils::StringToFloatArray(char const *,float *,int)" (?StringToFloatArray@ogUtils@@YA_NPBDPAMH@Z) referenced in function "public: bool __thiscall ogDict::GetVec3(char const *,char const *,class ogVec3 &)const " (?GetVec3@ogDict@@QBE_NPBD0AAVogVec3@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Icmp(char const *,char const *)" (?Icmp@ogString@@SAHPBD0@Z) referenced in function "void __cdecl Cmd_TestError_f(class ogCmdArgs const &)" (?Cmd_TestError_f@@YAXABVogCmdArgs@@@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z) referenced in function "public: void __thiscall ogString::operator=(char const *)" (??4ogString@@QAEXPBD@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z) referenced in function "protected: void __thiscall ogString::CheckSize(int,bool)" (?CheckSize@ogString@@IAEXH_N@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::Clear(void)" (?Clear@ogString@@QAEXXZ) referenced in function "public: char const * __thiscall ogCmdArgs::Args(int,int,bool)const " (?Args@ogCmdArgs@@QBEPBDHH_N@Z)
1>GameCmds.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Cmp(char const *,char const *)" (?Cmp@ogString@@SAHPBD0@Z) referenced in function "public: bool __thiscall ogString::operator==(class ogString const &)const " (??8ogString@@QBE_NABV0@@Z)
1>GameLocal.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogDict::SetGlobalPools(class ogStringPool *,class ogStringPool *)" (?SetGlobalPools@ogDict@@SAXPAVogStringPool@@0@Z) referenced in function _GetGameAPI
1>GameLocal.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogLib::Init(void)" (?Init@ogLib@@SAXXZ) referenced in function "public: virtual void __thiscall ogGameLocal::Init(void)" (?Init@ogGameLocal@@UAEXXZ)
1>GameLocal.obj : error LNK2019: unresolved external symbol "void __cdecl ogUtils::StringFree(char const *)" (?StringFree@ogUtils@@YAXPBD@Z) referenced in function "public: static void __cdecl ogCVar::LinkCVars(void)" (?LinkCVars@ogCVar@@SAXXZ)
1>GameLocal.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogLib::Shutdown(void)" (?Shutdown@ogLib@@SAXXZ) referenced in function "public: virtual void __thiscall ogGameLocal::Shutdown(void)" (?Shutdown@ogGameLocal@@UAEXXZ)
1>../Test/Gamex86.dll : fatal error LNK1120: 23 unresolved externals
1>Build log was saved at "file://c:\quake3-1.32b\code\ogLIB\_vs2k5\Win32\Debug\BuildLog.htm"
1>Game - 24 error(s), 0 warning(s)
2>------ Build started: Project: engine, Configuration: Debug Win32 ------
2>Linking...
2>Engine.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>SystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>ConsoleCmds.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ) referenced in function __unwindfunclet$??0ogCmdSystemEx@@QAE@XZ$0
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>FileEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::~ogString(void)" (??1ogString@@QAE@XZ)
2>PakFile.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ) referenced in function "private: __thiscall ogPakFile::~ogPakFile(void)" (??1ogPakFile@@AAE@XZ)
2>SystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>ConsoleCmds.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>CmdSystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>FileEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(void)" (??0ogString@@QAE@XZ)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogHashIndex::Add(int,int)" (?Add@ogHashIndex@@QAEXHH@Z) referenced in function "public: virtual void __thiscall ogCmdSystemEx::AddCmd(char const *,void (__cdecl*)(class ogCmdArgs const &),int,class ogConUsage const *,class ogConArgComplete const *)" (?AddCmd@ogCmdSystemEx@@UAEXPBDP6AXABVogCmdArgs@@@ZHPBVogConUsage@@PBVogConArgComplete@@@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogHashIndex::Add(int,int)" (?Add@ogHashIndex@@QAEXHH@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Icmp(char const *,char const *)" (?Icmp@ogString@@SAHPBD0@Z) referenced in function "public: int __thiscall ogString::Icmp(char const *)const " (?Icmp@ogString@@QBEHPBD@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Icmp(char const *,char const *)" (?Icmp@ogString@@SAHPBD0@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Icmp(char const *,char const *)" (?Icmp@ogString@@SAHPBD0@Z)
2>ConsoleCmds.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>Engine.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>SystemEx.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>WinMain.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z) referenced in function "public: void __thiscall ogString::operator=(char const *)" (??4ogString@@QAEXPBD@Z)
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>FileEx.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl ogString::Length(char const *)" (?Length@ogString@@SAIPBD@Z)
2>ConsoleCmds.obj : error LNK2019: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z) referenced in function "void __cdecl Cmd_Dir_f(class ogCmdArgs const &)" (?Cmd_Dir_f@@YAXABVogCmdArgs@@@Z)
2>Engine.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>SystemEx.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>WinConsole.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>WinMain.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>CmdSystemEx.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>CommonEx.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>FileEx.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "protected: void __thiscall ogString::Resize(int,bool)" (?Resize@ogString@@IAEXH_N@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl ogUtils::HashString(char const *)" (?HashString@ogUtils@@YAIPBD@Z) referenced in function "public: static int __cdecl ogHashIndex::GenerateKey(char const *,bool)" (?GenerateKey@ogHashIndex@@SAHPBD_N@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl ogUtils::HashString(char const *)" (?HashString@ogUtils@@YAIPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl ogUtils::IHashString(char const *)" (?IHashString@ogUtils@@YAIPBD@Z) referenced in function "public: static int __cdecl ogHashIndex::GenerateKey(char const *,bool)" (?GenerateKey@ogHashIndex@@SAHPBD_N@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl ogUtils::IHashString(char const *)" (?IHashString@ogUtils@@YAIPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogHashIndex::Remove(int,int)" (?Remove@ogHashIndex@@QAEXHH@Z) referenced in function "public: virtual void __thiscall ogCmdSystemEx::RemoveCmd(char const *)" (?RemoveCmd@ogCmdSystemEx@@UAEXPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: __thiscall ogLexer::~ogLexer(void)" (??1ogLexer@@QAE@XZ) referenced in function "public: virtual void __thiscall ogCmdSystemEx::ExecuteConfig(char const *)" (?ExecuteConfig@ogCmdSystemEx@@UAEXPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall ogToken::GetString(void)const " (?GetString@ogToken@@QBEPBDXZ) referenced in function "public: virtual void __thiscall ogCmdSystemEx::ExecuteConfig(char const *)" (?ExecuteConfig@ogCmdSystemEx@@UAEXPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: class ogToken * __thiscall ogLexer::ReadToken(void)" (?ReadToken@ogLexer@@QAEPAVogToken@@XZ) referenced in function "public: virtual void __thiscall ogCmdSystemEx::ExecuteConfig(char const *)" (?ExecuteConfig@ogCmdSystemEx@@UAEXPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: __thiscall ogLexer::ogLexer(char const *,int)" (??0ogLexer@@QAE@PBDH@Z) referenced in function "public: virtual void __thiscall ogCmdSystemEx::ExecuteConfig(char const *)" (?ExecuteConfig@ogCmdSystemEx@@UAEXPBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Icmpn(char const *,char const *,int)" (?Icmpn@ogString@@SAHPBD0H@Z) referenced in function "public: int __thiscall ogString::Icmpn(char const *,int)const " (?Icmpn@ogString@@QBEHPBDH@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Icmpn(char const *,char const *,int)" (?Icmpn@ogString@@SAHPBD0H@Z)
2>WinMain.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Icmpn(char const *,char const *,int)" (?Icmpn@ogString@@SAHPBD0H@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::StripLeadingWhitespaces(void)" (?StripLeadingWhitespaces@ogString@@QAEXXZ) referenced in function "public: virtual char const * __thiscall ogCmdSystemEx::CompleteCmd(char const *,void (__cdecl*)(char const *))" (?CompleteCmd@ogCmdSystemEx@@UAEPBDPBDP6AX0@Z@Z)
2>SystemEx.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogString::StripLeadingWhitespaces(void)" (?StripLeadingWhitespaces@ogString@@QAEXXZ)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogString::StripLeadingWhitespaces(void)" (?StripLeadingWhitespaces@ogString@@QAEXXZ)
2>Engine.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogString::StripLeadingWhitespaces(void)" (?StripLeadingWhitespaces@ogString@@QAEXXZ)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Find(char const *,char,int)" (?Find@ogString@@SAHPBDDH@Z) referenced in function "public: int __thiscall ogString::Find(char,int)const " (?Find@ogString@@QBEHDH@Z)
2>Engine.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z) referenced in function "public: virtual void __thiscall ogCmdSystemEx::PrintUsage(char const *)const " (?PrintUsage@ogCmdSystemEx@@UBEXPBD@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z)
2>ConsoleCmds.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(char const *)" (??0ogString@@QAE@PBD@Z)
2>CmdSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Find(char const *,char const *,bool,int)" (?Find@ogString@@SAHPBD0_NH@Z) referenced in function "public: int __thiscall ogString::Find(char const *,bool,int)const " (?Find@ogString@@QBEHPBD_NH@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Find(char const *,char const *,bool,int)" (?Find@ogString@@SAHPBD0_NH@Z)
2>CommonEx.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogDict::SetGlobalPools(class ogStringPool *,class ogStringPool *)" (?SetGlobalPools@ogDict@@SAXPAVogStringPool@@0@Z) referenced in function "public: void __thiscall ogCommonEx::Init(void)" (?Init@ogCommonEx@@QAEXXZ)
2>CommonEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogStringPool::Clear(void)" (?Clear@ogStringPool@@QAEXXZ) referenced in function "public: void __thiscall ogCommonEx::Shutdown(void)" (?Shutdown@ogCommonEx@@QAEXXZ)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogStringPool::Clear(void)" (?Clear@ogStringPool@@QAEXXZ)
2>CommonEx.obj : error LNK2019: unresolved external symbol "int __cdecl ogUtils::vsnPrintf(char *,int,char const *,char *)" (?vsnPrintf@ogUtils@@YAHPADHPBD0@Z) referenced in function "public: virtual void __cdecl ogCommonEx::Printf(char const *,...)" (?Printf@ogCommonEx@@UAAXPBDZZ)
2>FileEx.obj : error LNK2001: unresolved external symbol "int __cdecl ogUtils::vsnPrintf(char *,int,char const *,char *)" (?vsnPrintf@ogUtils@@YAHPADHPBD0@Z)
2>Engine.obj : error LNK2001: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ)
2>CommonEx.obj : error LNK2019: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ) referenced in function "public: virtual void __cdecl ogCommonEx::Warning(char const *,...)" (?Warning@ogCommonEx@@UAAXPBDZZ)
2>WinConsole.obj : error LNK2001: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ)
2>WinMain.obj : error LNK2001: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ)
2>ConsoleCmds.obj : error LNK2001: unresolved external symbol "char const * __cdecl ogUtils::VA(char const *,...)" (?VA@ogUtils@@YAPBDPBDZZ)
2>CommonEx.obj : error LNK2019: unresolved external symbol "public: __thiscall ogString::ogString(class ogString const &)" (??0ogString@@QAE@ABV0@@Z) referenced in function "public: __thiscall ogError::ogError(class ogError const &)" (??0ogError@@QAE@ABV0@@Z)
2>FileSystemEx.obj : error LNK2001: unresolved external symbol "public: __thiscall ogString::ogString(class ogString const &)" (??0ogString@@QAE@ABV0@@Z)
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: virtual class ogPoolString const * __thiscall ogStringPool::Alloc(char const *)" (?Alloc@ogStringPool@@UAEPBVogPoolString@@PBD@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: virtual class ogPoolString const * __thiscall ogStringPool::Alloc(char const *)" (?Alloc@ogStringPool@@UAEPBVogPoolString@@PBD@Z)
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ogStringPool::Free(class ogPoolString const *)" (?Free@ogStringPool@@UAEXPBVogPoolString@@@Z)
2>PakFile.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall ogStringPool::Free(class ogPoolString const *)" (?Free@ogStringPool@@UAEXPBVogPoolString@@@Z) referenced in function "private: __thiscall ogPakFile::~ogPakFile(void)" (??1ogPakFile@@AAE@XZ)
2>CommonEx.obj : error LNK2001: unresolved external symbol "public: virtual class ogPoolString const * __thiscall ogStringPool::Copy(class ogPoolString const *)" (?Copy@ogStringPool@@UAEPBVogPoolString@@PBV2@@Z)
2>PakFile.obj : error LNK2001: unresolved external symbol "public: virtual class ogPoolString const * __thiscall ogStringPool::Copy(class ogPoolString const *)" (?Copy@ogStringPool@@UAEPBVogPoolString@@PBV2@@Z)
2>FileEx.obj : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function "public: __thiscall ogFileInPak::ogFileInPak(class ogPakFile *,int)" (??0ogFileInPak@@QAE@PAVogPakFile@@H@Z)
2>FileEx.obj : error LNK2019: unresolved external symbol _inflateEnd referenced in function "public: virtual __thiscall ogFileInPak::~ogFileInPak(void)" (??1ogFileInPak@@UAE@XZ)
2>FileEx.obj : error LNK2019: unresolved external symbol _inflateReset referenced in function "public: virtual int __thiscall ogFileInPak::Rewind(void)" (?Rewind@ogFileInPak@@UAEHXZ)
2>FileEx.obj : error LNK2019: unresolved external symbol _inflate referenced in function "public: virtual int __thiscall ogFileInPak::Read(void *,unsigned int)" (?Read@ogFileInPak@@UAEHPAXI@Z)
2>FileEx.obj : error LNK2019: unresolved external symbol _crc32 referenced in function "public: virtual int __thiscall ogFileInPak::Read(void *,unsigned int)" (?Read@ogFileInPak@@UAEHPAXI@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: int __thiscall ogStringList::Find(char const *)const " (?Find@ogStringList@@QBEHPBD@Z) referenced in function "public: virtual void __thiscall ogFileSystemEx::RemovePureExtension(char const *)" (?RemovePureExtension@ogFileSystemEx@@UAEXPBD@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::FindOneOf(char const *,char const *,bool,int)" (?FindOneOf@ogString@@SAHPBD0_NH@Z) referenced in function "public: int __thiscall ogString::FindOneOf(char const *,bool,int)const " (?FindOneOf@ogString@@QBEHPBD_NH@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::StripPath(void)" (?StripPath@ogString@@QAEXXZ) referenced in function "public: virtual class ogFile * __thiscall ogFileSystemEx::OpenFileRead(char const *,int *)" (?OpenFileRead@ogFileSystemEx@@UAEPAVogFile@@PBDPAH@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: static class ogString __cdecl ogString::GetFileExtension(char const *,int)" (?GetFileExtension@ogString@@SA?AV1@PBDH@Z) referenced in function "public: virtual class ogFile * __thiscall ogFileSystemEx::OpenFileRead(char const *,int *)" (?OpenFileRead@ogFileSystemEx@@UAEPAVogFile@@PBDPAH@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: class ogString __thiscall ogString::Mid(int,int)const " (?Mid@ogString@@QBE?AV1@HH@Z) referenced in function "public: virtual class ogFileList * __thiscall ogFileSystemEx::GetFileList(char const *,char const *,int)" (?GetFileList@ogFileSystemEx@@UAEPAVogFileList@@PBD0H@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::Cmp(char const *,char const *)" (?Cmp@ogString@@SAHPBD0@Z) referenced in function "public: int __thiscall ogString::Cmp(char const *)const " (?Cmp@ogString@@QBEHPBD@Z)
3>------ Build started: Project: OgreMain, Configuration: DebugStaticLib Win32 ------
2>SystemEx.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ogString::Cmp(char const *,char const *)" (?Cmp@ogString@@SAHPBD0@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::ToLower(void)" (?ToLower@ogString@@QAEXXZ) referenced in function "private: int __thiscall ogFileSystemEx::GetZippedFileList(char const *,char const *,class ogStringList &,int)" (?GetZippedFileList@ogFileSystemEx@@AAEHPBD0AAVogStringList@@H@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ogString::CheckFileExtension(char const *)const " (?CheckFileExtension@ogString@@QBE_NPBD@Z) referenced in function "private: int __thiscall ogFileSystemEx::GetZippedFileList(char const *,char const *,class ogStringList &,int)" (?GetZippedFileList@ogFileSystemEx@@AAEHPBD0AAVogStringList@@H@Z)
2>FileSystemEx.obj : error LNK2019: unresolved external symbol "public: static int __cdecl ogString::rFind(char const *,char)" (?rFind@ogString@@SAHPBDD@Z) referenced in function "public: int __thiscall ogString::rFind(char)const " (?rFind@ogString@@QBEHD@Z)
2>SystemEx.obj : error LNK2019: unresolved external symbol "char const * __cdecl ogUtils::FormatByteString(unsigned __int64,int)" (?FormatByteString@ogUtils@@YAPBD_KH@Z) referenced in function "public: virtual void __thiscall ogSystemEx::PrintSysInfo(void)const " (?PrintSysInfo@ogSystemEx@@UBEXXZ)
2>SystemEx.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::StripTrailingWhitespaces(void)" (?StripTrailingWhitespaces@ogString@@QAEXXZ) referenced in function "protected: void __thiscall ogSystemEx::RetrieveCPUInfo(void)" (?RetrieveCPUInfo@ogSystemEx@@IAEXXZ)
2>WinConsole.obj : error LNK2001: unresolved external symbol "public: void __thiscall ogString::StripTrailingWhitespaces(void)" (?StripTrailingWhitespaces@ogString@@QAEXXZ)
2>WinConsole.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::Clear(void)" (?Clear@ogString@@QAEXXZ) referenced in function "private: static char const * __cdecl ogSystemWin32::GetInputText(void)" (?GetInputText@ogSystemWin32@@CAPBDXZ)
2>ConsoleCmds.obj : error LNK2019: unresolved external symbol "int __cdecl ogUtils::StringToInt(char const *)" (?StringToInt@ogUtils@@YAHPBD@Z) referenced in function "void __cdecl Cmd_TestPureMode_f(class ogCmdArgs const &)" (?Cmd_TestPureMode_f@@YAXABVogCmdArgs@@@Z)
2>ConsoleCmds.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl ogString::IsNumeric(char const *)" (?IsNumeric@ogString@@SA_NPBD@Z) referenced in function "void __cdecl Cmd_TestPureMode_f(class ogCmdArgs const &)" (?Cmd_TestPureMode_f@@YAXABVogCmdArgs@@@Z)
2>ConsoleCmds.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::DefaultFileExtension(char const *)" (?DefaultFileExtension@ogString@@QAEXPBD@Z) referenced in function "void __cdecl Cmd_Exec_f(class ogCmdArgs const &)" (?Cmd_Exec_f@@YAXABVogCmdArgs@@@Z)
2>CVars.obj : error LNK2019: unresolved external symbol "char const * __cdecl ogUtils::StringDup(char const *)" (?StringDup@ogUtils@@YAPBDPBD@Z) referenced in function "public: __thiscall ogCVar::ogCVar(char const *,char const *,int,char const *,bool (__cdecl*)(char const *),class ogConArgComplete const *)" (??0ogCVar@@QAE@PBD0H0P6A_N0@ZPBVogConArgComplete@@@Z)
2>Engine.obj : error LNK2019: unresolved external symbol "bool __cdecl ogUtils::StringToFloatArray(char const *,float *,int)" (?StringToFloatArray@ogUtils@@YA_NPBDPAMH@Z) referenced in function "void __cdecl perfTest1(int)" (?perfTest1@@YAXH@Z)
2>Engine.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogLib::Shutdown(void)" (?Shutdown@ogLib@@SAXXZ) referenced in function "public: int __thiscall ogEngine::Main(char const *)" (?Main@ogEngine@@QAEHPBD@Z)
2>Engine.obj : error LNK2019: unresolved external symbol "public: static void __cdecl ogLib::Init(void)" (?Init@ogLib@@SAXXZ) referenced in function "public: int __thiscall ogEngine::Main(char const *)" (?Main@ogEngine@@QAEHPBD@Z)
2>Engine.obj : error LNK2019: unresolved external symbol "void __cdecl ogUtils::StringFree(char const *)" (?StringFree@ogUtils@@YAXPBD@Z) referenced in function "public: static void __cdecl ogCVar::LinkCVars(void)" (?LinkCVars@ogCVar@@SAXXZ)
3>Compiling...
2>Engine.obj : error LNK2019: unresolved external symbol "public: void __thiscall ogString::Split(class ogStringList &,char)const " (?Split@ogString@@QBEXAAVogStringList@@D@Z) referenced in function "private: void __thiscall ogEngine::ParseCmdLineArgs(char const *)" (?ParseCmdLineArgs@ogEngine@@AAEXPBD@Z)
2>..\Test/engine.exe : fatal error LNK1120: 52 unresolved externals
2>Build log was saved at "file://c:\quake3-1.32b\code\ogLIB\_vs2k5\Win32\Debug\BuildLog.htm"
2>engine - 113 error(s), 0 warning(s)
3>OgreFont.cpp
4>------ Build started: Project: RenderSystem_Direct3D9, Configuration: DebugStaticLib Win32 ------
4>Compiling...
4>OgreD3D9Driver.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9Driver.cpp': No such file or directory
4>OgreD3D9DriverList.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9DriverList.cpp': No such file or directory
4>OgreD3D9EngineDll.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9EngineDll.cpp': No such file or directory
4>OgreD3D9GpuProgram.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9GpuProgram.cpp': No such file or directory
4>OgreD3D9GpuProgramManager.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9GpuProgramManager.cpp': No such file or directory
4>OgreD3D9HardwareBufferManager.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HardwareBufferManager.cpp': No such file or directory
3>c:\quake3-1.32b\code\ogremain\src\ogrefont.cpp(42) : fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory
4>OgreD3D9HardwareIndexBuffer.cpp
3>OgreFreeImageCodec.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HardwareIndexBuffer.cpp': No such file or directory
4>OgreD3D9HardwareOcclusionQuery.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HardwareOcclusionQuery.cpp': No such file or directory
4>OgreD3D9HardwarePixelBuffer.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HardwarePixelBuffer.cpp': No such file or directory
4>OgreD3D9HardwareVertexBuffer.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HardwareVertexBuffer.cpp': No such file or directory
4>OgreD3D9HLSLProgram.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HLSLProgram.cpp': No such file or directory
4>OgreD3D9HLSLProgramFactory.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9HLSLProgramFactory.cpp': No such file or directory
4>OgreD3D9Mappings.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9Mappings.cpp': No such file or directory
4>OgreD3D9MultiRenderTarget.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9MultiRenderTarget.cpp': No such file or directory
4>OgreD3D9Plugin.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9Plugin.cpp': No such file or directory
4>OgreD3D9RenderSystem.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9RenderSystem.cpp': No such file or directory
4>OgreD3D9RenderWindow.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9RenderWindow.cpp': No such file or directory
4>OgreD3D9Texture.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9Texture.cpp': No such file or directory
4>OgreD3D9TextureManager.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9TextureManager.cpp': No such file or directory
4>OgreD3D9VertexDeclaration.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9VertexDeclaration.cpp': No such file or directory
4>Generating Code...
4>Compiling...
4>OgreD3D9VideoMode.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9VideoMode.cpp': No such file or directory
4>OgreD3D9VideoModeList.cpp
4>c1xx : fatal error C1083: Cannot open source file: '..\src\OgreD3D9VideoModeList.cpp': No such file or directory
4>Generating Code...
4>Build log was saved at "file://c:\quake3-1.32b\obj\DebugStaticLib\BuildLog.htm"
4>RenderSystem_Direct3D9 - 22 error(s), 0 warning(s)
3>c:\quake3-1.32b\code\ogremain\src\ogrefreeimagecodec.cpp(41) : fatal error C1083: Cannot open include file: 'FreeImage.h': No such file or directory
3>OgreZip.cpp
3>c:\quake3-1.32b\code\ogremain\src\ogrezip.cpp(38) : fatal error C1083: Cannot open include file: 'zzip/zzip.h': No such file or directory
3>Generating Code...
3>Build log was saved at "file://c:\quake3-1.32b\code\OgreMain\obj\DebugStaticLib\BuildLog.htm"
3>OgreMain - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 4 failed, 2 up-to-date, 0 skipped ==========


EDIT: Dumping that much text into a post isn't helpful - thats what 'source' tags are for.

[Edited by - jollyjeffers on March 1, 2008 12:56:17 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Inevitab13
I would like to use Direct3d for this project, as I prefer to use HLSL for the majority of my pixel/vertex shaders. Is it possible to write a d3d renderer for this engine or not?


One already exists: http://www.dxquake3.dsl.pipex.com/

Share this post


Link to post
Share on other sites

This topic is 3570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this