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 comment
Share on other sites

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...