Search
lxdream.org :: lxdream :: r1280:38f2b0e60261
lxdream 0.9.1
released Jun 29
Download Now
changeset1280:38f2b0e60261
parent1279:142110f63902
child1281:a3e763a4c60e
authornkeynes
dateWed Mar 21 14:45:27 2012 +1000 (9 years ago)
Make sure we destroy the render buffers as part of the GL shutdown (fixes
bug with render buffers not being recreated when we re-init the GL).
src/pvr2/glrender.c
src/pvr2/pvr2.c
src/pvr2/pvr2.h
1.1 --- a/src/pvr2/glrender.c Wed Mar 21 14:44:41 2012 +1000
1.2 +++ b/src/pvr2/glrender.c Wed Mar 21 14:45:27 2012 +1000
1.3 @@ -153,6 +153,7 @@
1.4 void pvr2_shutdown_gl_context()
1.5 {
1.6 texcache_gl_shutdown();
1.7 + pvr2_destroy_render_buffers();
1.8 }
1.9
1.10 /**
2.1 --- a/src/pvr2/pvr2.c Wed Mar 21 14:44:41 2012 +1000
2.2 +++ b/src/pvr2/pvr2.c Wed Mar 21 14:45:27 2012 +1000
2.3 @@ -864,6 +864,21 @@
2.4 display_driver->destroy_render_buffer( buffer );
2.5 }
2.6
2.7 +void pvr2_destroy_render_buffers( void )
2.8 +{
2.9 + if( display_driver ) {
2.10 + int i;
2.11 + for( i=0; i<render_buffer_count; i++ ) {
2.12 + if( render_buffers[i] != NULL ) {
2.13 + display_driver->destroy_render_buffer(render_buffers[i]);
2.14 + render_buffers[i] = NULL;
2.15 + }
2.16 + }
2.17 + render_buffer_count = 0;
2.18 + }
2.19 +}
2.20 +
2.21 +
2.22 void pvr2_finish_render_buffer( render_buffer_t buffer )
2.23 {
2.24 display_driver->finish_render( buffer );
3.1 --- a/src/pvr2/pvr2.h Wed Mar 21 14:44:41 2012 +1000
3.2 +++ b/src/pvr2/pvr2.h Wed Mar 21 14:45:27 2012 +1000
3.3 @@ -296,6 +296,11 @@
3.4
3.5 void pvr2_destroy_render_buffer( render_buffer_t buffer );
3.6
3.7 +/**
3.8 + * Destroy all open render buffers
3.9 + */
3.10 +void pvr2_destroy_render_buffers( void );
3.11 +
3.12
3.13 /**
3.14 * Structure to hold a complete unpacked vertex (excluding modifier
.