@@ -10661,6 +10661,71 @@ reissue_transforms() {
10661
10661
_current_vertex_format.clear ();
10662
10662
memset (_vertex_attrib_columns, 0 , sizeof (const GeomVertexColumn *) * 32 );
10663
10663
#endif
10664
+
10665
+ // Since this is called by clear_state_and_transform(), we also should reset
10666
+ // the states that won't automatically be respecified when clearing the
10667
+ // state mask.
10668
+ _active_color_write_mask = ColorWriteAttrib::C_all;
10669
+ glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
10670
+
10671
+ if (_dithering_enabled) {
10672
+ glEnable (GL_DITHER);
10673
+ } else {
10674
+ glDisable (GL_DITHER);
10675
+ }
10676
+ if (_depth_test_enabled) {
10677
+ glEnable (GL_DEPTH_TEST);
10678
+ } else {
10679
+ glDisable (GL_DEPTH_TEST);
10680
+ }
10681
+ if (_stencil_test_enabled) {
10682
+ glEnable (GL_STENCIL_TEST);
10683
+ } else {
10684
+ glDisable (GL_STENCIL_TEST);
10685
+ }
10686
+ if (_blend_enabled) {
10687
+ glEnable (GL_BLEND);
10688
+ } else {
10689
+ glDisable (GL_BLEND);
10690
+ }
10691
+
10692
+ #ifndef OPENGLES_2
10693
+ if (_multisample_mode != 0 ) {
10694
+ glEnable (GL_MULTISAMPLE);
10695
+ } else {
10696
+ glDisable (GL_MULTISAMPLE);
10697
+ glDisable (GL_SAMPLE_ALPHA_TO_ONE);
10698
+ glDisable (GL_SAMPLE_ALPHA_TO_COVERAGE);
10699
+ }
10700
+ if (_line_smooth_enabled) {
10701
+ glEnable (GL_LINE_SMOOTH);
10702
+ } else {
10703
+ glDisable (GL_LINE_SMOOTH);
10704
+ }
10705
+ #endif
10706
+
10707
+ #ifndef OPENGLES
10708
+ if (_polygon_smooth_enabled) {
10709
+ glEnable (GL_POLYGON_SMOOTH);
10710
+ } else {
10711
+ glDisable (GL_POLYGON_SMOOTH);
10712
+ }
10713
+ #endif
10714
+
10715
+ #ifdef SUPPORT_FIXED_FUNCTION
10716
+ if (has_fixed_function_pipeline ()) {
10717
+ if (_alpha_test_enabled) {
10718
+ glEnable (GL_ALPHA_TEST);
10719
+ } else {
10720
+ glDisable (GL_ALPHA_TEST);
10721
+ }
10722
+ if (_point_smooth_enabled) {
10723
+ glEnable (GL_POINT_SMOOTH);
10724
+ } else {
10725
+ glDisable (GL_POINT_SMOOTH);
10726
+ }
10727
+ }
10728
+ #endif
10664
10729
}
10665
10730
10666
10731
#ifdef SUPPORT_FIXED_FUNCTION
0 commit comments