New URender class

Discussions about Coding and Scripting
Post Reply
Epsix
Novice
Posts: 5
Joined: Thu Dec 11, 2008 12:56 am
Personal rank: A little off

New URender class

Post by Epsix »

*sigh* I really just wanted to download the UT SDK here (only source I could find) but I guess I'll post something first...

The following is copy pasted directly from another topic on another forum:
Hey guys,

I browsed the interweb for this a bit but I couldn't find anything. I thought I'd go to the irc channel after that, but enterthegame won't let me on, so... here I am!

I'm currently working on a CAVE at work, and I'm responsible for setting up a generic set of libraries and tools to make it easy for people to run their OpenGL software in our CAVE. To demonstrate how "easy" this would be I decided to port Unreal Tournament99 to our CAVE since I remembered that the headers for the 432 update were released several years back. I got the file and I located the OpenGLDrv project and got to work.

I had to make some adjustments to the code to get it to run on MVS 2005 but I got there eventually. Now I can succesfully compile a .dll. The thing is, I can't replicate the OpenGLDrv.dll so that it will work in UT (my version is 432 btw). And I can't make my FCOpenGLDrv.dll either.

I don't know where to tell UT to look for my new FCOpenGLDrv.dll. I can only specifiy that it exists (Default.ini, UnrealTournament.ini, Setup.int, Manifest.ini), not where to look for it. I also created a FCOpenGLDrv.int but that file isn't found by UnrealTournament either (I still get a "VideoDriverName" default name ingame). But even more mystifying than this, I can't replace my existing OpenGlDrv.dll with my new OpenGLDrv.dll and get it to work (even though the code is largely thesame).

Init: Input system initialized for WindowsViewport0
Log: Opened viewport
Warning: Failed to load 'OpenGLDrv': Can't find file for package 'OpenGLDrv'
Warning: Failed to load 'Class OpenGLDrv.OpenGLRenderDevice': Can't find file for package 'OpenGLDrv'
Warning: Can't find file for package 'OpenGLDrv'
Warning: Can't find file for package 'OpenGLDrv'
Log: Bound to SoftDrv.dll

By looking at the code I gather that (apart from inheriting from URenderDevice and writing actual working code) the 3 key things to make a rendering device UT compatible would be.

DECLARE_CLASS(UOpenGLRenderDevice,URenderDevice,CLASS_Config,OpenGLDrv);

IMPLEMENT_CLASS(UOpenGLRenderDevice);

IMPLEMENT_PACKAGE(OpenGLDrv);

I figured that these MACROS were created to make it easy to add your own NEW rendering device to UT. I suppose it's not very strange that we don't see a lot of those going around, because it's not working! UT cannot load my 'Package' because it cannot be found, even though all I did was replace the old OpenGLDrv.dll with a freshly compiled one.

Now it's not very suprising that adding a NEW rendering device won't work either:

class UFCOpenGLRenderDevice : public URenderDevice
{
...
DECLARE_CLASS(UFCOpenGLRenderDevice,URenderDevice,CLASS_Config,FCOpenGLDrv);
...
};

IMPLEMENT_CLASS(UFCOpenGLRenderDevice);

IMPLEMENT_PACKAGE(FCOpenGLDrv);

...

Although playing around with OpenGLDrv.dll tells me that there's something wrong with the .dll itself, I can't help but wonder how the hell UT is supposed to find my new FCOpenGLDrv.dll even if something wasn't wrong with it. Editing everything around the .dll all seems to work. But getting UT to work with it doesn't. Here's the error.

Init: Input system initialized for WindowsViewport0
Log: Opened viewport
Warning: Failed to load 'FCOpenGLDrv': Can't find file for package 'FCOpenGLDrv'
Warning: Failed to load 'Class FCOpenGLDrv.FCOpenGLRenderDevice': Can't find file for package 'FCOpenGLDrv'
Warning: Can't find file for package 'FCOpenGLDrv'
Warning: Can't find file for package 'FCOpenGLDrv'
Log: Bound to SoftDrv.dll

hmmm... looks familiar...

Does anyone have any experience dealing with Rendering Devices in UT. Help would be greatly appreciated.

Oh and please don't refer me to the existing CaveUT projects <.<

Thx!
Epsix
Novice
Posts: 5
Joined: Thu Dec 11, 2008 12:56 am
Personal rank: A little off

Re: New URender class

Post by Epsix »

But that's URenderDevice you say? Yes, I didn't know the difference at first.
hmmmm, looks like I made a boo boo. URenderDevice gets called by URender. I thought they were one and thesame. URenderDevice is useless to me because it only gets data about what has to be drawn on the screen. So everything that falls outside my screen doesn't get passed to URenderDevice. It looks like I need to make my own URender. I can inherit from URenderBase, but I don't think the code to URender itself is available.

My only option is to guess together a URender.h inherit from that and dynamic link to Render.dll.

Has anyone got a better idea or example of something similar that's been done before?
Epsix
Novice
Posts: 5
Joined: Thu Dec 11, 2008 12:56 am
Personal rank: A little off

Re: New URender class

Post by Epsix »

ah crap, you guys don't have the SDK either.
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: New URender class

Post by Shadow »

huh ? What's this all about ? Embedding a new render device or what ?
Image
Epsix
Novice
Posts: 5
Joined: Thu Dec 11, 2008 12:56 am
Personal rank: A little off

Re: New URender class

Post by Epsix »

no, URenderDevice is useless to me, since it receives no mesh data, only calls on what to draw on screen. I'm interested in URender, which I'm guessing takes care of what gets rendered and what not.
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: New URender class

Post by Shadow »

interesting, really - But I simply say: that render stuff is not programed well, I still hear my old Lead-Programer (Lost Secrets of Na Pali) insulting over it's bad and hidden structures and mechanics...
Image
Epsix
Novice
Posts: 5
Joined: Thu Dec 11, 2008 12:56 am
Personal rank: A little off

Re: New URender class

Post by Epsix »

I'm already interested if you've got code that deals with rendering that I can look into. I think I've had thesame problems as your lead programmer because I remember getting stuck on the fact that a lot of structures were hidden.
Post Reply