MythTV  master
Public Member Functions | Private Attributes | List of all members
GLTexture Class Reference

#include <gltexture.h>

Collaboration diagram for GLTexture:
Collaboration graph
[legend]

Public Member Functions

 GLTexture ()=default
 
 ~GLTexture ()
 
void Init (const QImage &image)
 Create the texture initialized with QImage. More...
 
void Deinit (void)
 Delete the texture. More...
 
void Bind (void)
 
void MakeQuad (float alpha=1.0F, float scale=1.0F)
 
void SwapWidthHeight (void)
 
void SetItem (ThumbItem *, const QSize &sz)
 
void SetSize (const QSize &sz)
 
void SetScale (float x, float y)
 
void ScaleTo (const QSize &dest, ScaleMax scaleMax)
 
void SetAngle (int newangle)
 
QSize GetSize (void) const
 
uint GetPixelCount (void) const
 
float GetTextureX (void) const
 
float GetTextureY (void) const
 
int GetAngle (void) const
 
QString GetDescription (const QString &status) const
 

Private Attributes

GLuint tex {0}
 
int angle {0}
 
ThumbItemitem {nullptr}
 
int width {512}
 
int height {512}
 
float cx {1.0F}
 
float cy {1.0F}
 

Detailed Description

Definition at line 35 of file gltexture.h.

Constructor & Destructor Documentation

◆ GLTexture()

GLTexture::GLTexture ( )
default

◆ ~GLTexture()

GLTexture::~GLTexture ( )
inline

Definition at line 39 of file gltexture.h.

Member Function Documentation

◆ Init()

void GLTexture::Init ( const QImage &  image)

Create the texture initialized with QImage.

Definition at line 34 of file gltexture.cpp.

Referenced by GLSingleView::EffectKenBurns(), GLSingleView::Load(), and GLSingleView::paintGL().

◆ Deinit()

void GLTexture::Deinit ( void  )

Delete the texture.

Definition at line 52 of file gltexture.cpp.

Referenced by GLSingleView::CleanUp(), Init(), and ~GLTexture().

◆ Bind()

void GLTexture::Bind ( void  )

Definition at line 58 of file gltexture.cpp.

Referenced by GLSingleView::EffectCube(), GLSingleView::EffectFlutter(), and MakeQuad().

◆ MakeQuad()

void GLTexture::MakeQuad ( float  alpha = 1.0F,
float  scale = 1.0F 
)

◆ SwapWidthHeight()

void GLTexture::SwapWidthHeight ( void  )
inline

Definition at line 46 of file gltexture.h.

Referenced by GLSingleView::Rotate(), and SetItem().

◆ SetItem()

void GLTexture::SetItem ( ThumbItem thumbItem,
const QSize &  sz 
)

◆ SetSize()

void GLTexture::SetSize ( const QSize &  sz)
inline

Definition at line 51 of file gltexture.h.

Referenced by SetItem().

◆ SetScale()

void GLTexture::SetScale ( float  x,
float  y 
)
inline

Definition at line 53 of file gltexture.h.

Referenced by ScaleTo().

◆ ScaleTo()

void GLTexture::ScaleTo ( const QSize &  dest,
ScaleMax  scaleMax 
)

◆ SetAngle()

void GLTexture::SetAngle ( int  newangle)
inline

Definition at line 56 of file gltexture.h.

Referenced by GLSingleView::Rotate().

◆ GetSize()

QSize GLTexture::GetSize ( void  ) const
inline

Definition at line 59 of file gltexture.h.

Referenced by GetDescription(), and ScaleTo().

◆ GetPixelCount()

uint GLTexture::GetPixelCount ( void  ) const
inline

Definition at line 60 of file gltexture.h.

◆ GetTextureX()

float GLTexture::GetTextureX ( void  ) const
inline

Definition at line 61 of file gltexture.h.

Referenced by GLSingleView::EffectCube(), GLSingleView::EffectFlutter(), and MakeQuad().

◆ GetTextureY()

float GLTexture::GetTextureY ( void  ) const
inline

Definition at line 62 of file gltexture.h.

Referenced by GLSingleView::EffectCube(), GLSingleView::EffectFlutter(), and MakeQuad().

◆ GetAngle()

int GLTexture::GetAngle ( void  ) const
inline

Definition at line 63 of file gltexture.h.

Referenced by Bind(), and GLSingleView::Rotate().

◆ GetDescription()

QString GLTexture::GetDescription ( const QString &  status) const

Definition at line 111 of file gltexture.cpp.

Referenced by GLSingleView::createTexInfo().

Member Data Documentation

◆ tex

GLuint GLTexture::tex {0}
private

Definition at line 67 of file gltexture.h.

Referenced by Bind(), Deinit(), and Init().

◆ angle

int GLTexture::angle {0}
private

Definition at line 68 of file gltexture.h.

Referenced by GetAngle(), GetDescription(), SetAngle(), and SetItem().

◆ item

ThumbItem* GLTexture::item {nullptr}
private

Definition at line 69 of file gltexture.h.

Referenced by GetDescription(), and SetItem().

◆ width

int GLTexture::width {512}
private

Definition at line 70 of file gltexture.h.

Referenced by GetPixelCount(), GetSize(), SetSize(), and SwapWidthHeight().

◆ height

int GLTexture::height {512}
private

Definition at line 71 of file gltexture.h.

Referenced by GetPixelCount(), GetSize(), SetSize(), and SwapWidthHeight().

◆ cx

float GLTexture::cx {1.0F}
private

Definition at line 72 of file gltexture.h.

Referenced by GetTextureX(), and SetScale().

◆ cy

float GLTexture::cy {1.0F}
private

Definition at line 73 of file gltexture.h.

Referenced by GetTextureY(), and SetScale().


The documentation for this class was generated from the following files: