mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
fix draw_poly, release order
This commit is contained in:
parent
57fda682f4
commit
232a4d84c3
@ -1217,7 +1217,7 @@ draw_polygon(const GeomPolygon *geom) {
|
|||||||
dxgsg_cat.debug() << "draw_polygon()" << endl;
|
dxgsg_cat.debug() << "draw_polygon()" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* wireframe polygon will be drawn as multu-tri trifan until I get this casting issue straightened out
|
/* wireframe polygon will be drawn as multi-tri trifan until I get this casting issue straightened out
|
||||||
DWORD rstate;
|
DWORD rstate;
|
||||||
_d3dDevice->GetRenderState(D3DRENDERSTATE_FILLMODE, &rstate);
|
_d3dDevice->GetRenderState(D3DRENDERSTATE_FILLMODE, &rstate);
|
||||||
if(rstate!=D3DFILL_WIREFRAME) {
|
if(rstate!=D3DFILL_WIREFRAME) {
|
||||||
@ -1228,7 +1228,7 @@ draw_polygon(const GeomPolygon *geom) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// draw_multitri(geom, D3DPT_TRIANGLEFAN);
|
draw_multitri(geom, D3DPT_TRIANGLEFAN);
|
||||||
|
|
||||||
#ifdef WBD_GL_MODE
|
#ifdef WBD_GL_MODE
|
||||||
int nprims = geom->get_num_prims();
|
int nprims = geom->get_num_prims();
|
||||||
@ -4407,11 +4407,6 @@ dx_cleanup() {
|
|||||||
|
|
||||||
release_all_textures();
|
release_all_textures();
|
||||||
|
|
||||||
// Release the DDraw and D3D objects used by the app
|
|
||||||
RELEASE(_zbuf);
|
|
||||||
RELEASE(_back);
|
|
||||||
RELEASE(_pri);
|
|
||||||
|
|
||||||
// Do a safe check for releasing the D3DDEVICE. RefCount should be zero.
|
// Do a safe check for releasing the D3DDEVICE. RefCount should be zero.
|
||||||
if( _d3dDevice!=NULL ) {
|
if( _d3dDevice!=NULL ) {
|
||||||
if( 0 < _d3dDevice->Release() ) {
|
if( 0 < _d3dDevice->Release() ) {
|
||||||
@ -4420,6 +4415,11 @@ dx_cleanup() {
|
|||||||
_d3dDevice = NULL; // clear the pointer in the Gsg
|
_d3dDevice = NULL; // clear the pointer in the Gsg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Release the DDraw and D3D objects used by the app
|
||||||
|
RELEASE(_zbuf);
|
||||||
|
RELEASE(_back);
|
||||||
|
RELEASE(_pri);
|
||||||
|
|
||||||
RELEASE(_d3d);
|
RELEASE(_d3d);
|
||||||
|
|
||||||
// Do a safe check for releasing DDRAW. RefCount should be zero.
|
// Do a safe check for releasing DDRAW. RefCount should be zero.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user