Jump to content
The Dark Mod Forums

Itches, Glitches & Anything Else...


Recommended Posts

Having some kind of texture manager is a good idea, because something has to have central responsibility for binding textures to OpenGL and getting the texture numbers for them. It is similar with display lists -- you want something to take responsibility for allocating and deleting them, rather than having every bit of code do the GL calls itself and risk causing mayhem.

 

I don't actually think your implemention is at all bad, now that I understand its purpose is to accept ImageConstructors, bind them to GL and return a GL texture number. Perhaps it should be called the GLTextureManager or something, for clarity, and the interface could be cleaned up a bit, using the split insert/find calls I mentioned, but it does perform the job of texture binding which is best practice for OpenGL programming.

 

If reference counting is required, this can be done using a combination of shared_ptr and weak_ptr (a weak_ptr is a "non-owning" pointer which does not increment the reference count but allows you to tell whether the pointed object has been deleted or not).

Link to post
Share on other sites
  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Since I've stumbled over the same issue (and even tracked a needless bugreport), I've just commited the following:   Index: def/tdm_mover_base.def ===================================================

That's a pretty ambitious project that will require almost every trick in the book. I can sort of envision how you might use fences, skyboxes, and archways to assist with compartmentalization but over

I'd say it is perfectly doable if you make it almost planar, or with only mild height differences. The images below show how I would do it:   See how the mountains and houses always block the view f

Posted Images

I got a linker error caused by references to g_FileChooser_nativeGUI, which only applied to Win32 builds, therefore I disabled these lines.

 

What are your plans regarding the file chooser? Will it be replaced in the future by a VFS file chooser? If not, I could imagine that having the native Win32 file dialog had some charm for a lot of Win32 mappers (including me, but I could live with the GTK one as well). Having the Win32 context menu during file open is one of the admittedly few advantages.

Link to post
Share on other sites

Oh damn, I knew there was something I had to check on Windows, and forgot to do it. I removed the Win32-specific dialog during the refactoring because (1) I don't like multiple code paths, and (2) more importantly, I have no idea how to add an extra "All files" option using the Win32 API.

 

The idea is that the GTK file selector should be used (this may suggest another upgrade of GTK on Win32 if the current version is not very good -- they do constantly seem to improve that dialog), but I omitted to actually do the testing to make sure the Windows build would actually work.

Link to post
Share on other sites

I just tried a complete update & recompile in Windows, and although I don't get a link error I do get a runtime assertion failure from a null shared_ptr. Great, an error which I have basically no way of debugging.

 

I might see if I can re-install/upgrade Eclipse, and maybe the GDB integration will magically start working again (for a while at least, before it magically stops working just like everything else in Eclipse).

Link to post
Share on other sites

Strange, nothing here. :mellow:

 

I even tried to change the background image, but everything seems ok. Maybe there is an old module residing in your install folder (textures.dll)? I removed that one lately.

Link to post
Share on other sites

No, I tried with a completely fresh checkout (and re-install of Eclipse for good measure) and the behaviour is exactly the same.

 

Oh well, since it only seems to affect me and there is nothing I can do about it anyway (GDB is useless on Windows), I might as well forget about it and hope it goes away with some future change.

Link to post
Share on other sites
I will do a full compile on angua's machine and see if it's reproducible there. I assume you cleared the usual suspects (user.xml and consorts)?

 

Actually I didn't clear out the local copy in Application Data, that would be worth doing as well.

Link to post
Share on other sites

Everything works fine for me, the only thing that I noticed was that after starting to load bonehoard, it printed this on the console:

 

Open file C:\games\doom3\darkmod\maps\bonehoard.map for read...success

Open file C:/games/doom3/darkmod/ for read...failure

 

The map was loaded and I've had no problems so far.

Link to post
Share on other sites

Deleting the local settings solved the crash. However, I am getting a GTK assertion failure when trying to show the Background Image dialog (something about a theme not being installed). This may be because I have not yet copied all of the right GTK libraries into the installation folder.

Link to post
Share on other sites

Well some progress at least -- apparently the Radiant designers decided that GTK Warnings should be raised as fatal assertion failures, which I have corrected. This particular issue now just displays as a warning in the console, but the dialog itself is shown.

 

This now reveals the next problem, a shared_ptr assertion failure when you actually activate the background image. I think this is happening because the first time you enable the option, the image filename is blank which is causing whatever provides the image texture to choke.

Link to post
Share on other sites

To announce this here as well: Transformation operations can now be cancelled by pressing ESC. :)

 

I had to add a method to the UndoSystem as well, as UndoOperations are started as soon as the mouse button is clicked (which produced an annoying "empty" operation in the undo stack).

Link to post
Share on other sites

The Scale Manipulator is now working again (for brushes, it wasn't broken for patches) - the face normal vectors weren't normalised after the transformation matrix had been applied.

Link to post
Share on other sites

I notice that you have created a number of metawidget classes in gtkutil -- go easy on this, we don't want a class for every possible combination of GTK widgets, only the ones which are very commonly used and occur together (like a scrolled window inside a frame, used for packing TreeViews). Whatever FramedTransientWidget does, I'm not entirely sure it will be something that is used often enough to justify a whole class for it. Some of my own classes in gtkutil are going to need to be merged as well I think, to avoid too much proliferation.

 

There is actually a C++ GTK library, called gtkmm (abbreviation for "GTK--" I think), which might be worth investigating, but it would be some considerable effort to port everything over to use it.

 

Incidentally, bordered frames are best avoided. The GNOME HIG (which I try to follow for GUI design) has a useful explanation of them here:

 

http://developer.gnome.org/projects/gup/hi...ols-frames.html

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...