Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (1 invisible), 8,372 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dabolong, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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,035
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,035
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