Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,420 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
LPDIRECT3DCUBETEXTURE9 #482443
02/06/21 10:33
02/06/21 10:33
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
hello all,
someone help me, how to Release LPDIRECT3DCUBETEXTURE9 texture memory?
LPDIRECT3DCUBETEXTURE9* ABC
....
.....D3DXCreateCubeTextureFromFile....
....
ABC->Release();

ERROR: Release() is nor d3d9.h function.

THANKS!

Re: LPDIRECT3DCUBETEXTURE9 [Re: 20BN] #488154
04/01/24 08:39
04/01/24 08:39
Joined: Oct 2008
Posts: 683
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 683
Germany
Hey, you have to use it right way:

Code

typedef struct _smpCube
{
	LPDIRECT3DCUBETEXTURE9 ShadowMap; 
   
} SmpCube;

SmpCube* SmpCubeObj;


// Cleanup
if(SmpCubeObj->ShadowMap != NULL)
{
   ((LPDIRECT3DCUBETEXTURE9)SmpCubeObj->ShadowMap)->Release();
   SmpCubeObj->ShadowMap = NULL;       
}



Re: LPDIRECT3DCUBETEXTURE9 [Re: 20BN] #488175
04/10/24 10:01
04/10/24 10:01
Joined: Sep 2009
Posts: 1,032
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,032
Budapest
Perhaps the bmap_purge() function does the same/similar action.
From the online documentation:
Quote
Releases texture memory used by the given bitmap. Useful for freeing the video memory when a certain panel won't be seen anymore. Video memory is automatically allocated again when the bitmap is seen the next time, so the instruction won't do any harm.

Re: LPDIRECT3DCUBETEXTURE9 [Re: 20BN] #488178
04/12/24 11:00
04/12/24 11:00
Joined: Oct 2008
Posts: 683
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 683
Germany
No, that doesn't work.
Direct X functions can only be used via certain (material) events or by initializing your own D3DInstance.
(Have a look to draw_begin or Gamestudio SDK ->Plugin SDK-> Using Direct3D functions).


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1