Okay, I have had a chat with some of the VGUI gods here. VGUI doesn't
handle textures well, try and reuse texture handles where ever possible.
Don't simply use "setImage". There aren't any plans to fix this in VGUI
in the near future, so try and work around it :)

Caleb 'Ghoul' Delnay wrote:

Well, everything is created fine.  All images load fine.  After I collect
many many items is when the effect begins, which leads me to think it might
be something to do with using setImage more than once on an image.  This
effect didn't take place before I added in my history using setImage.  After
the "invisible" effect takes place any new images created don't show up
either.  So I'm very confused.


Caleb 'Ghoul' Delnay
Project Leader: Kill Or Be Killed
http://www.llamanade.net/kobk/


----- Original Message -----
From: "Alfred" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 12:41 PM
Subject: Re: [hlcoders] VGUI Image Problem




just make sure that if you ever "new" and object that you "free" it
later (or that something free's it).

Caleb 'Ghoul' Delnay wrote:



How would I go about allocating and freeing this memory?  I have almost


no


experience with memory management :(  (malloc and free?)


Caleb 'Ghoul' Delnay
Project Leader: Kill Or Be Killed
http://www.llamanade.net/kobk/

----- Original Message -----
From: "Alfred" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 1:40 AM
Subject: Re: [hlcoders] VGUI Image Problem






I encountered something similar to this a while back. Make sure you are
freeing any unused images, there is a limited amount of memory for image
storage (I think... something like this at least) (there is lots of
room, but if you keep allocating new images and never free one then it
quickly adds up).

Cortex wrote:





Hi,

The first thing I had to suggest is to delete/re-set all the images
you need
every time a thing needs to change... It's a quite brute method, but


for


testing, it could be a good thing (you can try to draw a pict in the
middle
of the screen to test).

Anyway, your HUD looks pretty cool :)

    - Cortex : HL ALBATOR coder & mapper
    - [EMAIL PROTECTED] & ICQ : 71548738

Caleb 'Ghoul' Delnay wrote:





This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I've recently finished my VGUI HUD.  The last thing I added in was a
VGUI version of the ammo history (displays items you pick up on the
right).  This all works fine and dandy no problems..  at least not at
first.  The whole HUD uses a considerable amount of images, 1 for
ammo (changed using setImage when you switch weapons), 12 for the
history (changed again using setImage), 2 for the armor and health,
and like 16 for each weapon.

The HUD works perfectly without a flaw, at least for the first part.
As the game progresses and I pick up more and more items, suddenly
the wierdest happens.  All the images that aren't completely static
(ammo, history, weapons) vanish.  They refuse to be drawn, while the
armor and health images always stay perfectly fine.  This completely
boggles me and leads me to almost think a VGUI image can only be
changed so many times with setImage before it causes "choas"?
Perhaps some pictures will help.

Here is the HUD normally, all working correctly.

http://www.llamanade.net/ghoul/pictures/error/vgui_image_bug0.jpg

Normally if I had recently picked something up it would appear on the
right side like it should, but in when this picture was taken I had
not picked anything up, so of course there is no image.  Also, the
browser for the weapons is not open, so nothing there.  Now, the
bugged picture.

http://www.llamanade.net/ghoul/pictures/error/vgui_image_bug1.jpg

So then, now as you can see everything that isn't static is gone.  I
had just picked up some trip mines and they of course didn't show up
in the history.  In the weapon selector no images are present, at the
bottom the primary ammo isn't present.  The secondary is because only
2 weapons use secondary ammo, and they are handled differently.  The
health and armor are there still of course because they aren't
modified ever ingame.

The only thing I can think of for such behavior is some wierd bug
with changing images (setImage and setPos).  Either that or I'm just
completely missing something.  :(

If anyone has any ideas, please respond.  :)

Caleb 'Ghoul' Delnay
Project Leader: Kill Or Be Killed
http://www.llamanade.net/kobk/




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




--
Alfred Reynolds
[EMAIL PROTECTED]

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,




please visit:




http://list.valvesoftware.com/mailman/listinfo/hlcoders






_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,


please visit:


http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,


please visit:


http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to