Click here to Skip to main content
16,011,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Reg.. Japanese Font Pin
Hamid_RT3-Jun-08 1:23
Hamid_RT3-Jun-08 1:23 
QuestionException occurred when adding a manifest file to a VC6 project for xp style! [modified] Pin
jtasph2-Jun-08 4:33
jtasph2-Jun-08 4:33 
QuestionRe: Exception occurred when adding a manifest file to a VC6 project for xp style! Pin
David Crow2-Jun-08 4:39
David Crow2-Jun-08 4:39 
AnswerRe: Exception occurred when adding a manifest file to a VC6 project for xp style! Pin
prasad_som2-Jun-08 6:03
prasad_som2-Jun-08 6:03 
GeneralRe: Exception occurred when adding a manifest file to a VC6 project for xp style! Pin
jtasph2-Jun-08 15:34
jtasph2-Jun-08 15:34 
AnswerRe: Exception occurred when adding a manifest file to a VC6 project for xp style! Pin
jtasph2-Jun-08 17:23
jtasph2-Jun-08 17:23 
GeneralSome other exception. Pin
jtasph2-Jun-08 19:06
jtasph2-Jun-08 19:06 
QuestionD3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8882-Jun-08 4:27
Hanan8882-Jun-08 4:27 
this is what i'm doing:

m_pD3D = Direct3DCreate9( D3D_SDK_VERSION )
...

D3DPRESENT_PARAMETERS d3dpp; 
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
m_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
                                      D3DCREATE_SOFTWARE_VERTEXPROCESSING,
                                      &d3dpp, &m_pd3dDevice )

...

D3DXCreateTextureFromFileEx(m_pd3dDevice, pSrcFile.c_str() 
		,D3DX_DEFAULT,
		D3DX_DEFAULT ,
		D3DX_DEFAULT, 
		D3DUSAGE_RENDERTARGET,
		D3DFMT_A8R8G8B8,
		D3DPOOL_DEFAULT,
		D3DX_FILTER_NONE,D3DX_DEFAULT,0,NULL,NULL,
		&(pStatData->m_Texture)))


after about 300 hundred textures from files it this returns D3DERR_OUTOFVIDEOMEMORY.

sizes are: I check the height (which is rounded to power of 2) of the returned texture at surface level 0.
first 100 textures of varying sizes, often small, 32 or 64 height on avergae.
then 200 textures all with 256 height.

I make sure to release() unused textures and directX resources and not making memory leaks in general.

The answer can be:
1. I should set some flag to make this all work.
2. I should load big textures with multiple images in them.
3. I'm passing some hard limit and I must cut down in the size of image resources.
AnswerRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Alan Balkany2-Jun-08 8:21
Alan Balkany2-Jun-08 8:21 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8882-Jun-08 22:56
Hanan8882-Jun-08 22:56 
AnswerRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Rajkumar R2-Jun-08 21:39
Rajkumar R2-Jun-08 21:39 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8882-Jun-08 23:37
Hanan8882-Jun-08 23:37 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8883-Jun-08 0:54
Hanan8883-Jun-08 0:54 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8883-Jun-08 1:23
Hanan8883-Jun-08 1:23 
AnswerRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Rajkumar R3-Jun-08 2:41
Rajkumar R3-Jun-08 2:41 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Rajkumar R3-Jun-08 2:30
Rajkumar R3-Jun-08 2:30 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8883-Jun-08 2:57
Hanan8883-Jun-08 2:57 
GeneralRe: D3DERR_OUTOFVIDEOMEMORY while D3DXCreateTextureFromFileEx() Pin
Hanan8883-Jun-08 3:39
Hanan8883-Jun-08 3:39 
Questionwin32 window + dialog + messagebox Pin
Member 38254932-Jun-08 3:29
Member 38254932-Jun-08 3:29 
QuestionRe: win32 window + dialog + messagebox Pin
Mark Salsbery2-Jun-08 6:01
Mark Salsbery2-Jun-08 6:01 
AnswerRe: win32 window + dialog + messagebox Pin
Member 38254932-Jun-08 6:27
Member 38254932-Jun-08 6:27 
AnswerRe: win32 window + dialog + messagebox Pin
Member 38254932-Jun-08 6:30
Member 38254932-Jun-08 6:30 
GeneralRe: win32 window + dialog + messagebox Pin
Mark Salsbery2-Jun-08 6:40
Mark Salsbery2-Jun-08 6:40 
GeneralRe: win32 window + dialog + messagebox Pin
Member 38254932-Jun-08 6:59
Member 38254932-Jun-08 6:59 
GeneralRe: win32 window + dialog + messagebox Pin
Mark Salsbery2-Jun-08 7:06
Mark Salsbery2-Jun-08 7:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.