Changeset 21977 in vbox
- Timestamp:
- Aug 5, 2009 10:09:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r21950 r21977 23 23 #ifndef ___VBoxFrameBuffer_h___ 24 24 #define ___VBoxFrameBuffer_h___ 25 25 //#define VBOXQGL_PROF_BASE 1 26 26 #include "COMDefs.h" 27 27 #include <iprt/critsect.h> … … 666 666 VBoxVHWATexture() {} 667 667 VBoxVHWATexture(const QRect * pRect, const VBoxVHWAColorFormat *pFormat); 668 //virtual ~VBoxVHWATexture();668 virtual ~VBoxVHWATexture(); 669 669 virtual void init(uchar *pvMem); 670 670 void setAddress(uchar *pvMem) {mAddress = pvMem;} 671 v irtual void update(const QRect * pRect);671 void update(const QRect * pRect) { doUpdate(mAddress, pRect);} 672 672 void bind() {glBindTexture(texTarget(), mTexture);} 673 673 … … 679 679 const QRect & rect() {return mRect;} 680 680 uchar * address(){ return mAddress; } 681 uint32_t rectSizeTex(const QRect * pRect) {return pRect->width() * pRect->height() * mBytesPerPixel;} 681 682 uchar * pointAddress(int x, int y) 682 683 { … … 685 686 return pointAddressTex(x, y); 686 687 } 687 uchar * pointAddressTex(int x, int y) { return mAddress + y*mBytesPerLine + x*mBytesPerPixel; } 688 uint32_t pointOffsetTex(int x, int y) { return y*mBytesPerLine + x*mBytesPerPixel; } 689 uchar * pointAddressTex(int x, int y) { return mAddress + pointOffsetTex(x, y); } 688 690 int toXTex(int x) {return x/mColorFormat.widthCompression();} 689 691 int toYTex(int y) {return y/mColorFormat.heightCompression();} 690 692 ulong memSize(){ return mBytesPerLine * mRect.height()/mColorFormat.heightCompression(); } 691 693 692 void uninit();693 694 694 protected: 695 virtual void doUpdate(uchar * pAddress, const QRect * pRect); 695 696 virtual void initParams(); 696 697 virtual void load(); … … 705 706 uint32_t mBytesPerLine; 706 707 VBoxVHWAColorFormat mColorFormat; 708 private: 709 void uninit(); 707 710 }; 708 711 … … 715 718 mTexRect = *pRect; 716 719 } 717 protected:718 720 }; 719 721 … … 729 731 protected: 730 732 virtual GLenum texTarget(); 733 }; 734 735 class VBoxVHWATextureNP2RectPBO : public VBoxVHWATextureNP2Rect 736 { 737 public: 738 VBoxVHWATextureNP2RectPBO() : VBoxVHWATextureNP2Rect() {} 739 VBoxVHWATextureNP2RectPBO(const QRect * pRect, const VBoxVHWAColorFormat *pFormat) : 740 VBoxVHWATextureNP2Rect(pRect, pFormat){} 741 virtual ~VBoxVHWATextureNP2RectPBO(); 742 743 virtual void init(uchar *pvMem); 744 protected: 745 virtual void load(); 746 virtual void doUpdate(uchar * pAddress, const QRect * pRect); 747 private: 748 void updateBuffer(uchar * pBuf, const QRect * pRect); 749 GLuint mPBO; 731 750 }; 732 751 … … 993 1012 994 1013 uchar * mAddress; 995 VBoxVHWATexture mTex[3];1014 VBoxVHWATexture *mpTex[3]; 996 1015 997 1016 VBoxVHWAColorFormat mColorFormat;
Note:
See TracChangeset
for help on using the changeset viewer.