Changeset 21950 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 3, 2009 7:43:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r21939 r21950 666 666 VBoxVHWATexture() {} 667 667 VBoxVHWATexture(const QRect * pRect, const VBoxVHWAColorFormat *pFormat); 668 void init(uchar *pvMem); 668 // virtual ~VBoxVHWATexture(); 669 virtual void init(uchar *pvMem); 669 670 void setAddress(uchar *pvMem) {mAddress = pvMem;} 670 void uninit(); 671 void update(const QRect * pRect); 672 GLuint texture() {return mTexture;} 671 virtual void update(const QRect * pRect); 672 void bind() {glBindTexture(texTarget(), mTexture);} 673 674 virtual void texCoord(int x, int y); 675 virtual void multiTexCoord(GLenum texUnit, int x, int y); 676 677 // GLuint texture() {return mTexture;} 673 678 const QRect & texRect() {return mTexRect;} 674 679 const QRect & rect() {return mRect;} … … 684 689 int toYTex(int y) {return y/mColorFormat.heightCompression();} 685 690 ulong memSize(){ return mBytesPerLine * mRect.height()/mColorFormat.heightCompression(); } 686 private: 691 692 void uninit(); 693 694 protected: 695 virtual void initParams(); 696 virtual void load(); 697 virtual GLenum texTarget() {return GL_TEXTURE_2D; } 698 699 700 QRect mTexRect; /* texture size */ 701 QRect mRect; /* img size */ 687 702 uchar * mAddress; 688 703 GLuint mTexture; 689 704 uint32_t mBytesPerPixel; 690 705 uint32_t mBytesPerLine; 691 QRect mTexRect; /* texture size */692 QRect mRect; /* img size */693 706 VBoxVHWAColorFormat mColorFormat; 707 }; 708 709 class VBoxVHWATextureNP2 : public VBoxVHWATexture 710 { 711 public: 712 VBoxVHWATextureNP2() : VBoxVHWATexture() {} 713 VBoxVHWATextureNP2(const QRect * pRect, const VBoxVHWAColorFormat *pFormat) : 714 VBoxVHWATexture(pRect, pFormat){ 715 mTexRect = *pRect; 716 } 717 protected: 718 }; 719 720 class VBoxVHWATextureNP2Rect : public VBoxVHWATextureNP2 721 { 722 public: 723 VBoxVHWATextureNP2Rect() : VBoxVHWATextureNP2() {} 724 VBoxVHWATextureNP2Rect(const QRect * pRect, const VBoxVHWAColorFormat *pFormat) : 725 VBoxVHWATextureNP2(pRect, pFormat){} 726 727 virtual void texCoord(int x, int y); 728 virtual void multiTexCoord(GLenum texUnit, int x, int y); 729 protected: 730 virtual GLenum texTarget(); 694 731 }; 695 732
Note:
See TracChangeset
for help on using the changeset viewer.