Changeset 25470 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 17, 2009 8:17:25 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56136
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r25468 r25470 348 348 { 349 349 const VBoxVHWAInfo & info = vboxVHWAGetSupportInfo(pContext); 350 GLint scaleFunc = (flags & VBOXVHWAIMG_LINEAR) ? GL_LINEAR : GL_NEAREST; 350 351 if((flags & VBOXVHWAIMG_PBO) && info.getGlInfo().isPBOSupported()) 351 352 { 352 353 VBOXQGLLOG(("VBoxVHWATextureNP2RectPBO\n")); 353 return new VBoxVHWATextureNP2RectPBO(aRect, aFormat );354 return new VBoxVHWATextureNP2RectPBO(aRect, aFormat, scaleFunc); 354 355 } 355 356 else if(info.getGlInfo().isTextureRectangleSupported()) 356 357 { 357 358 VBOXQGLLOG(("VBoxVHWATextureNP2Rect\n")); 358 return new VBoxVHWATextureNP2Rect(aRect, aFormat );359 return new VBoxVHWATextureNP2Rect(aRect, aFormat, scaleFunc); 359 360 } 360 361 else if(info.getGlInfo().isTextureNP2Supported()) 361 362 { 362 363 VBOXQGLLOG(("VBoxVHWATextureNP2\n")); 363 return new VBoxVHWATextureNP2(aRect, aFormat );364 return new VBoxVHWATextureNP2(aRect, aFormat, scaleFunc); 364 365 } 365 366 VBOXQGLLOG(("VBoxVHWATexture\n")); 366 return new VBoxVHWATexture(aRect, aFormat );367 return new VBoxVHWATexture(aRect, aFormat, scaleFunc); 367 368 } 368 369 … … 1217 1218 resetDefaultSrcOverlayCKey(); 1218 1219 1219 mImage = vboxVHWAImageCreate(QRect(0,0,aSize.width(),aSize.height()), aColorFormat, getGlProgramMngr(), bVGA ? 0 : (VBOXVHWAIMG_PBO | VBOXVHWAIMG_PBOIMG /*| VBOXVHWAIMG_FBO*/));1220 mImage = vboxVHWAImageCreate(QRect(0,0,aSize.width(),aSize.height()), aColorFormat, getGlProgramMngr(), bVGA ? 0 : (VBOXVHWAIMG_PBO | VBOXVHWAIMG_PBOIMG | VBOXVHWAIMG_FBO)); 1220 1221 1221 1222 setRectValues(aTargRect, aSrcRect); … … 1438 1439 } 1439 1440 1440 VBoxVHWATexture::VBoxVHWATexture(const QRect & aRect, const VBoxVHWAColorFormat &aFormat ) :1441 VBoxVHWATexture::VBoxVHWATexture(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion) : 1441 1442 mAddress(NULL), 1442 1443 mTexture(0), 1443 1444 mBytesPerPixel(0), 1444 1445 mBytesPerPixelTex(0), 1445 mBytesPerLine(0) 1446 mBytesPerLine(0), 1447 mScaleFuncttion(scaleFuncttion) 1446 1448 { 1447 1449 mColorFormat = aFormat; … … 1459 1461 GLenum tt = texTarget(); 1460 1462 1461 glTexParameteri(tt, GL_TEXTURE_MIN_FILTER, GL_NEAREST);1463 glTexParameteri(tt, GL_TEXTURE_MIN_FILTER, mScaleFuncttion); 1462 1464 VBOXQGL_ASSERTNOERR(); 1463 glTexParameteri(tt, GL_TEXTURE_MAG_FILTER, GL_NEAREST);1465 glTexParameteri(tt, GL_TEXTURE_MAG_FILTER, mScaleFuncttion); 1464 1466 VBOXQGL_ASSERTNOERR(); 1465 1467 glTexParameteri(tt, GL_TEXTURE_WRAP_S, GL_CLAMP); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
r25468 r25470 241 241 mBytesPerPixel(0), 242 242 mBytesPerPixelTex(0), 243 mBytesPerLine(0) 243 mBytesPerLine(0), 244 mScaleFuncttion(GL_NEAREST) 244 245 {} 245 VBoxVHWATexture(const QRect & aRect, const VBoxVHWAColorFormat &aFormat );246 VBoxVHWATexture(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion); 246 247 virtual ~VBoxVHWATexture(); 247 248 virtual void init(uchar *pvMem); … … 285 286 uint32_t mBytesPerLine; 286 287 VBoxVHWAColorFormat mColorFormat; 288 GLint mScaleFuncttion; 287 289 private: 288 290 void uninit(); … … 295 297 public: 296 298 VBoxVHWATextureNP2() : VBoxVHWATexture() {} 297 VBoxVHWATextureNP2(const QRect & aRect, const VBoxVHWAColorFormat &aFormat ) :298 VBoxVHWATexture(aRect, aFormat ){299 VBoxVHWATextureNP2(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion) : 300 VBoxVHWATexture(aRect, aFormat, scaleFuncttion){ 299 301 mTexRect = QRect(0, 0, aRect.width()/aFormat.widthCompression(), aRect.height()/aFormat.heightCompression()); 300 302 } … … 305 307 public: 306 308 VBoxVHWATextureNP2Rect() : VBoxVHWATextureNP2() {} 307 VBoxVHWATextureNP2Rect(const QRect & aRect, const VBoxVHWAColorFormat &aFormat ) :308 VBoxVHWATextureNP2(aRect, aFormat ){}309 VBoxVHWATextureNP2Rect(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion) : 310 VBoxVHWATextureNP2(aRect, aFormat, scaleFuncttion){} 309 311 310 312 virtual void texCoord(int x, int y); … … 321 323 mPBO(0) 322 324 {} 323 VBoxVHWATextureNP2RectPBO(const QRect & aRect, const VBoxVHWAColorFormat &aFormat ) :324 VBoxVHWATextureNP2Rect(aRect, aFormat ),325 VBoxVHWATextureNP2RectPBO(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion) : 326 VBoxVHWATextureNP2Rect(aRect, aFormat, scaleFuncttion), 325 327 mPBO(0) 326 328 {} … … 344 346 mcbOffset(0) 345 347 {} 346 VBoxVHWATextureNP2RectPBOMapped(const QRect & aRect, const VBoxVHWAColorFormat &aFormat ) :347 VBoxVHWATextureNP2RectPBO(aRect, aFormat ),348 VBoxVHWATextureNP2RectPBOMapped(const QRect & aRect, const VBoxVHWAColorFormat &aFormat, GLint scaleFuncttion) : 349 VBoxVHWATextureNP2RectPBO(aRect, aFormat, scaleFuncttion), 348 350 mpMappedAllignedBuffer(NULL), 349 351 mcbOffset(0) … … 378 380 #define VBOXVHWAIMG_PBOIMG 0x00000002U 379 381 #define VBOXVHWAIMG_FBO 0x00000004U 382 #define VBOXVHWAIMG_LINEAR 0x00000008U 380 383 typedef uint32_t VBOXVHWAIMG_TYPE; 381 384 … … 1579 1582 VBoxVHWATextureImageFBO(const QRect &size, const VBoxVHWAColorFormat &format, class VBoxVHWAGlProgramMngr * aMgr, VBOXVHWAIMG_TYPE flags) : 1580 1583 T(size, format, aMgr, flags & (~VBOXVHWAIMG_FBO)), 1581 mFBOTex(size, VBoxVHWAColorFormat(32, 0xff0000, 0xff00, 0xff), aMgr, flags & (~VBOXVHWAIMG_FBO)),1584 mFBOTex(size, VBoxVHWAColorFormat(32, 0xff0000, 0xff00, 0xff), aMgr, (flags & (~VBOXVHWAIMG_FBO)) | VBOXVHWAIMG_LINEAR), 1582 1585 mpvFBOTexMem(NULL) 1583 1586 {
Note:
See TracChangeset
for help on using the changeset viewer.