Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (howardR, AndrewAMD, EternallyCurious, Petra, 1 invisible), 791 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
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: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
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: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
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 | chip programmers | 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