I created an external library in c++ and made a dll. With boost, I can acces this library with python and all works well, except one method.
This method convert procedural texture in jpg, using directx. When I call this method, my procedural texture is created and I can see the jpg on my hdd. But unfortunately, panda windows quit without saying anything except this :
shell returned -1073741819
After looking deeper in my c++ code, I found that it quits just after I call
Yeah, that’s what i was thinking but if I launch panda in opengl, it shouldn’t interfere ?
If it interfere, yes, when I use the library, it changes the directx context to this :
Render states:
D3DRS_SRGBWRITEENABLE 0
D3DRS_SEPARATEALPHABLENDENABLE FALSE
D3DRS_STENCILENABLE FALSE
D3DRS_SCISSORTESTENABLE FALSE
D3DRS_ZFUNC D3DCMP_LESS
D3DRS_ZWRITEENABLE TRUE
D3DRS_SHADEMODE D3DSHADE_GOURAUD
D3DRS_FOGENABLE FALSE
D3DRS_SPECULARENABLE FALSE
D3DRS_FOGTABLEMODE D3DFOG_NONE
Sampler states for the first four samplers:
D3DSAMP_SRGBTEXTURE 0
D3DSAMP_ELEMENTINDEX 0
The DepthStencilSurface must be set to NULL.
In order to try to better understand and debug the problem, I used the c++ panda hello world, and call my method inside.
I finally manage to find the cause of the problem, but not really the “Why”.
In my library, I have an object BasicD3D. This object creates an hWnd with CreateWindow.
In his destructor, he calls DestroyWindow(hwnd) and here is the problem. It also kills panda window.
I didn’t find yet the reason, so if anybody has a clue.