Changeset 24471 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 6, 2009 6:39:07 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h
r24431 r24471 1252 1252 1253 1253 int reset(); 1254 1255 void initGl(); 1254 1256 1255 1257 VBoxGLWidget *mpOverlayWidget; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r24437 r24471 798 798 #ifdef VBOX_WITH_VIDEOHWACCEL 799 799 /* Need to force the QGL framebuffer in case 2D Video Acceleration is supported & enabled */ 800 bool bAccelerate2DVideo = machine.GetAccelerate2DVideoEnabled() && VBoxGlobal::isAcceleration2DVideoAvailable(); 800 bool bAccelerate2DVideo = machine.GetAccelerate2DVideoEnabled() 801 # ifndef Q_WS_MAC /* @todo: fixme: temporary disable the check on Mac until we move it to a separate app */ 802 && VBoxGlobal::isAcceleration2DVideoAvailable() 803 # endif 804 ; 801 805 #endif 802 806 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r24451 r24471 710 710 711 711 mSrcLowerR = 0.0; mSrcLowerG = 0.0; mSrcLowerB = 0.0; 712 712 713 VBOXQGL_CHECKERR( 713 714 vboxglUniform4f(mUniSrcLowerColor, 0.0, 0.0, 0.0, 0.0); … … 2503 2504 vboxFormat.setDepth(false); 2504 2505 Assert(!vboxFormat.depth()); 2506 // vboxFormat.setRedBufferSize(8); 2507 // vboxFormat.setGreenBufferSize(8); 2508 // vboxFormat.setBlueBufferSize(8); 2505 2509 return vboxFormat; 2506 2510 } … … 4276 4280 // Assert(format().alpha()); 4277 4281 // Assert(format().alphaBufferSize() == 8); 4282 VBOXQGLLOG(("format().blueBufferSize()(%d)\n", format().blueBufferSize())); 4283 VBOXQGLLOG(("format().greenBufferSize()(%d)\n", format().greenBufferSize())); 4284 VBOXQGLLOG(("format().redBufferSize()(%d)\n", format().redBufferSize())); 4278 4285 Assert(format().blueBufferSize() == 8); 4279 4286 Assert(format().greenBufferSize() == 8); … … 4729 4736 4730 4737 VBoxQGLOverlay::VBoxQGLOverlay (VBoxConsoleView *aView, VBoxFrameBuffer * aContainer) 4731 : mView(aView), 4738 : mpOverlayWidget(NULL), 4739 mView(aView), 4732 4740 mContainer(aContainer), 4733 4741 mGlOn(false), … … 4740 4748 mCmdPipe(aView) 4741 4749 { 4742 mpOverlayWidget = new VBoxGLWidget (aView, aView->viewport()); 4743 4750 /* postpone the gl widget initialization to avoid conflict with 3D on Mac */ 4751 } 4752 4753 void VBoxQGLOverlay::initGl() 4754 { 4755 if(mpOverlayWidget) 4756 return; 4757 4758 mpOverlayWidget = new VBoxGLWidget (mView, mView->viewport()); 4759 4744 4760 VBoxGLContext *pc = (VBoxGLContext*)mpOverlayWidget->context(); 4745 4761 pc->allowDoneCurrent(false); 4746 4762 4747 4763 mOverlayWidgetVisible = true; /* to ensure it is set hidden with vboxShowOverlay */ 4748 4764 vboxShowOverlay(false); 4749 4765 4750 4766 mpOverlayWidget->setMouseTracking(true); 4751 4752 // resizeEvent (new VBoxResizeEvent (FramebufferPixelFormat_Opaque,4753 // NULL, 0, 0, 640, 480));4754 4767 } 4755 4768 … … 4788 4801 } 4789 4802 4803 #ifdef DEBUG 4790 4804 VBoxVHWACommandElement *pTest = mCmdPipe.detachCmdList(pHead, pTail); 4791 4805 Assert(!pTest); 4792 4806 NOREF(pTest); 4807 #endif 4793 4808 } 4794 4809 return VINF_SUCCESS; … … 5134 5149 { 5135 5150 struct _VBOXVHWACMD * pCmd = (struct _VBOXVHWACMD *)cmd; 5136 makeCurrent();5137 5151 switch(pCmd->enmCmd) 5138 5152 { … … 5140 5154 { 5141 5155 VBOXVHWACMD_SURF_CANCREATE * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CANCREATE); 5156 makeCurrent(); 5142 5157 pCmd->rc = mpOverlayWidget->vhwaSurfaceCanCreate(pBody); 5143 5158 } break; … … 5145 5160 { 5146 5161 VBOXVHWACMD_SURF_CREATE * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CREATE); 5162 makeCurrent(); 5147 5163 vboxSetGlOn(true); 5148 5164 pCmd->rc = mpOverlayWidget->vhwaSurfaceCreate(pBody); … … 5165 5181 { 5166 5182 VBOXVHWACMD_SURF_DESTROY * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_DESTROY); 5183 makeCurrent(); 5167 5184 pCmd->rc = mpOverlayWidget->vhwaSurfaceDestroy(pBody); 5168 5185 if(!mpOverlayWidget->hasSurfaces()) … … 5184 5201 { 5185 5202 VBOXVHWACMD_SURF_LOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_LOCK); 5203 makeCurrent(); 5186 5204 pCmd->rc = mpOverlayWidget->vhwaSurfaceLock(pBody); 5187 5205 } break; … … 5189 5207 { 5190 5208 VBOXVHWACMD_SURF_UNLOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_UNLOCK); 5209 makeCurrent(); 5191 5210 pCmd->rc = vhwaSurfaceUnlock(pBody); 5192 5211 /* mNeedOverlayRepaint is set inside the vhwaSurfaceUnlock */ … … 5195 5214 { 5196 5215 VBOXVHWACMD_SURF_BLT * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_BLT); 5216 makeCurrent(); 5197 5217 pCmd->rc = mpOverlayWidget->vhwaSurfaceBlt(pBody); 5198 5218 mNeedOverlayRepaint = true; … … 5201 5221 { 5202 5222 VBOXVHWACMD_SURF_FLIP * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_FLIP); 5223 makeCurrent(); 5203 5224 pCmd->rc = mpOverlayWidget->vhwaSurfaceFlip(pBody); 5204 5225 mNeedOverlayRepaint = true; … … 5207 5228 { 5208 5229 VBOXVHWACMD_SURF_OVERLAY_UPDATE * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_OVERLAY_UPDATE); 5230 makeCurrent(); 5209 5231 pCmd->rc = mpOverlayWidget->vhwaSurfaceOverlayUpdate(pBody); 5210 5232 mOverlayVisible = mpOverlayWidget->hasVisibleOverlays(); … … 5219 5241 { 5220 5242 VBOXVHWACMD_SURF_OVERLAY_SETPOSITION * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_OVERLAY_SETPOSITION); 5243 makeCurrent(); 5221 5244 pCmd->rc = mpOverlayWidget->vhwaSurfaceOverlaySetPosition(pBody); 5222 5245 mOverlayVisible = mpOverlayWidget->hasVisibleOverlays(); … … 5231 5254 { 5232 5255 VBOXVHWACMD_SURF_COLORKEY_SET * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_COLORKEY_SET); 5256 makeCurrent(); 5233 5257 pCmd->rc = mpOverlayWidget->vhwaSurfaceColorkeySet(pBody); 5234 5258 mNeedOverlayRepaint = true; … … 5237 5261 { 5238 5262 VBOXVHWACMD_QUERYINFO1 * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_QUERYINFO1); 5263 initGl(); 5264 makeCurrent(); 5239 5265 pCmd->rc = mpOverlayWidget->vhwaQueryInfo1(pBody); 5240 5266 } break; … … 5242 5268 { 5243 5269 VBOXVHWACMD_QUERYINFO2 * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_QUERYINFO2); 5270 makeCurrent(); 5244 5271 pCmd->rc = mpOverlayWidget->vhwaQueryInfo2(pBody); 5245 5272 } break; 5246 5273 case VBOXVHWACMD_TYPE_ENABLE: 5274 initGl(); 5247 5275 case VBOXVHWACMD_TYPE_DISABLE: 5248 5276 pCmd->rc = VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.