Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

When does it occur? I'll see if I can reproduce it with the latest SVN.

 

edit: Everything seems to work on my end.

Posted

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.

Posted

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.

Posted

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)?

Posted

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.

Posted

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.

Posted

I get that GTK assertion as well. I thought it was about my specific GTK+ setup, but it seems that there are some non-standard items used here?

Posted

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.

Posted

Ok, this is my part I guess. You say, you have the text entry field empty and tick the option when the shared_ptr assertion arises?

Posted

Please commit it, I'm not yet done with my changes (I'm currently working on the "manipulation cancelling") and therefore haven't looked into the Overlay code.

Posted

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

Posted

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.

Posted

I committed another change (resolving issue #102): zero-sized brushes are removed now from the scene and a warning is emitted in the console on this event.

Posted

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

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...