Changeset 22921 in vbox
- Timestamp:
- Sep 10, 2009 4:45:29 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52185
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h ¶
r22855 r22921 580 580 void deleteDisplay(); 581 581 582 GLuint createDisplay(VBoxVHWASurfaceBase *pPrimary);582 int createDisplay(VBoxVHWASurfaceBase *pPrimary, GLuint *pDisplay); 583 583 void doDisplay(VBoxVHWASurfaceBase *pPrimary, VBoxVHWAGlProgramVHWA * pProgram, bool bBindDst); 584 584 bool synchTexMem(const QRect * aRect); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp ¶
r22920 r22921 2737 2737 ) 2738 2738 { 2739 { 2740 if(mVisibleDisplayInitialized) 2739 if(mVisibleDisplayInitialized) 2740 { 2741 if(mVisibleDisplay) 2741 2742 { 2742 2743 glDeleteLists(mVisibleDisplay, 1); 2743 mVisibleDisplayInitialized = false;2744 }2744 } 2745 mVisibleDisplayInitialized = false; 2745 2746 } 2746 2747 } … … 2826 2827 } 2827 2828 2828 GLuint VBoxVHWASurfaceBase::createDisplay(VBoxVHWASurfaceBase *pPrimary)2829 int VBoxVHWASurfaceBase::createDisplay(VBoxVHWASurfaceBase *pPrimary, GLuint *pDisplay) 2829 2830 { 2830 2831 if(mVisibleTargRect.isEmpty()) … … 2837 2838 if(mVisibleSrcRect.isEmpty()) 2838 2839 { 2839 return 0; 2840 *pDisplay = 0; 2841 return VINF_SUCCESS; 2840 2842 } 2841 2843 … … 2857 2859 } 2858 2860 2861 glGetError(); /* clear the err flag */ 2859 2862 GLuint display = glGenLists(1); 2860 VBOXQGL_ASSERTNOERR(); 2861 glNewList(display, GL_COMPILE); 2862 2863 doDisplay(pPrimary, pProgram, pDstCKey != NULL); 2864 2865 glEndList(); 2866 VBOXQGL_ASSERTNOERR(); 2867 2868 return display; 2863 GLenum err = glGetError(); 2864 if(err == GL_NO_ERROR) 2865 { 2866 Assert(display); 2867 if(!display) 2868 { 2869 /* well, it seems it should not return 0 on success according to the spec, 2870 * but just in case, pick another one */ 2871 display = glGenLists(1); 2872 err = glGetError(); 2873 if(err == GL_NO_ERROR) 2874 { 2875 Assert(display); 2876 } 2877 else 2878 { 2879 /* we are failed */ 2880 Assert(!display); 2881 display = 0; 2882 } 2883 } 2884 2885 if(display) 2886 { 2887 glNewList(display, GL_COMPILE); 2888 2889 doDisplay(pPrimary, pProgram, pDstCKey != NULL); 2890 2891 glEndList(); 2892 VBOXQGL_ASSERTNOERR(); 2893 *pDisplay = display; 2894 return VINF_SUCCESS; 2895 } 2896 } 2897 else 2898 { 2899 VBOXQGLLOG(("gl error ocured (0x%x)\n", err)); 2900 Assert(err == GL_NO_ERROR); 2901 } 2902 2903 return VERR_GENERAL_FAILURE; 2869 2904 } 2870 2905 … … 2873 2908 deleteDisplay(); 2874 2909 2875 mVisibleDisplay = createDisplay(pPrimary); 2876 mVisibleDisplayInitialized = true; 2910 int rc = createDisplay(pPrimary, &mVisibleDisplay); 2911 if(RT_SUCCESS(rc)) 2912 { 2913 mVisibleDisplayInitialized = true; 2914 } 2877 2915 } 2878 2916 … … 2918 2956 return false; 2919 2957 2920 #ifdef DEBUG_misha 2921 if(0) 2958 Assert(mVisibleDisplay); 2959 2960 if(!mVisibleDisplayInitialized) 2922 2961 { 2923 2962 VBoxVHWAGlProgramVHWA * pProgram = NULL; … … 2943 2982 } 2944 2983 else 2945 #endif2946 2984 { 2947 2985 VBOXQGL_CHECKERR(
Note:
See TracChangeset
for help on using the changeset viewer.