Logo
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SharpKmyGfx::SpriteBatch Class Reference

#include <SpriteBatch.h>

Public Member Functions

 SpriteBatch ()
 
void Release ()
 
void setLayer (int layer)
 
void drawSprite (Texture ^tex, int x, int y, int ofsx, int ofsy, int w, int h, float rot, float u0, float v0, float u1, float v1, float r, float g, float b, float a, int zOrder, Shader ^shd, bool clip)
 
void drawSprite (SharpKmyMath::Matrix4 mtx, Texture^ tex, int ofsx, int ofsy, int w, int h, float u0, float v0, float u1, float v1, float r, float g, float b, float a, int zOrder, Shader^ shd, bool clip)
 
void setMask (Texture^ tex, int x, int y, int ofsx, int ofsy, int w, int h, float rot, float u0, float v0, float u1, float v1, float r, float g, float b, float a)
 
void setMask (SharpKmyMath::Matrix4 mtx, Texture^ tex, int ofsx, int ofsy, int w, int h, float u0, float v0, float u1, float v1, float r, float g, float b, float a)
 
void resetMask ()
 
void pushClip (SharpKmyMath::Matrix4 mtx, int clipX, int clipY, int clipWidth, int clipHeight, bool recurisve)
 
void popClip ()
 
void drawText (Font^ font, cli::array< byte >^ text, int x, int y, float r, float g, float b, float a, float scale, int zOrder, bool italic, bool clip)
 
void drawRect (int x, int y, int w, int h, float rot, float r, float g, float b, float a, float scale, int zOrder)
 
void drawLineRect (int x, int y, int offsetX, int offsetY, int w, int h, float rot, float r, float g, float b, float a, float scale, int zOrder)
 
void drawText (SharpKmyMath::Matrix4 mtx, Font^ font, cli::array< byte >^ text, float r, float g, float b, float a, int zOrder, bool italic, bool clip)
 
void drawRect (SharpKmyMath::Matrix4 mtx, int w, int h, float r, float g, float b, float a, int zOrder)
 
void drawLineRect (SharpKmyMath::Matrix4 mtx, int offsetX, int offsetY, int w, int h, float r, float g, float b, float a, int zOrder)
 
void setCameraMatrix (float fovy, float xAngle, float yAngle)
 
void setProjectionMatrix (SharpKmyMath::Matrix4 proj)
 
void setViewMatrix (SharpKmyMath::Matrix4 view)
 
void setScreenSizeX (int width, int height)
 
InternalCommandList createCommandList (Framebuffer^ fb, int screenWidth, int screenHeight)
 

Static Public Member Functions

static SharpKmyMath::Matrix4 makeMatrix (float posX, float posY, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float pivotX, float pivotY)
 

Public Attributes

kmyGfx::SpriteBatch * obj = nullptr
 

Constructor & Destructor Documentation

◆ SpriteBatch()

SharpKmyGfx::SpriteBatch::SpriteBatch ( )

Member Function Documentation

◆ createCommandList()

InternalCommandList SharpKmyGfx::SpriteBatch::createCommandList ( Framebuffer fb,
int  screenWidth,
int  screenHeight 
)

◆ drawLineRect() [1/2]

void SharpKmyGfx::SpriteBatch::drawLineRect ( int  x,
int  y,
int  offsetX,
int  offsetY,
int  w,
int  h,
float  rot,
float  r,
float  g,
float  b,
float  a,
float  scale,
int  zOrder 
)

◆ drawLineRect() [2/2]

void SharpKmyGfx::SpriteBatch::drawLineRect ( SharpKmyMath::Matrix4  mtx,
int  offsetX,
int  offsetY,
int  w,
int  h,
float  r,
float  g,
float  b,
float  a,
int  zOrder 
)

◆ drawRect() [1/2]

void SharpKmyGfx::SpriteBatch::drawRect ( int  x,
int  y,
int  w,
int  h,
float  rot,
float  r,
float  g,
float  b,
float  a,
float  scale,
int  zOrder 
)

◆ drawRect() [2/2]

void SharpKmyGfx::SpriteBatch::drawRect ( SharpKmyMath::Matrix4  mtx,
int  w,
int  h,
float  r,
float  g,
float  b,
float  a,
int  zOrder 
)

◆ drawSprite() [1/2]

void SharpKmyGfx::SpriteBatch::drawSprite ( SharpKmyMath::Matrix4  mtx,
Texture tex,
int  ofsx,
int  ofsy,
int  w,
int  h,
float  u0,
float  v0,
float  u1,
float  v1,
float  r,
float  g,
float  b,
float  a,
int  zOrder,
Shader shd,
bool  clip 
)

◆ drawSprite() [2/2]

void SharpKmyGfx::SpriteBatch::drawSprite ( Texture tex,
int  x,
int  y,
int  ofsx,
int  ofsy,
int  w,
int  h,
float  rot,
float  u0,
float  v0,
float  u1,
float  v1,
float  r,
float  g,
float  b,
float  a,
int  zOrder,
Shader shd,
bool  clip 
)

◆ drawText() [1/2]

void SharpKmyGfx::SpriteBatch::drawText ( Font font,
cli::array< byte >^  text,
int  x,
int  y,
float  r,
float  g,
float  b,
float  a,
float  scale,
int  zOrder,
bool  italic,
bool  clip 
)

◆ drawText() [2/2]

void SharpKmyGfx::SpriteBatch::drawText ( SharpKmyMath::Matrix4  mtx,
Font font,
cli::array< byte >^  text,
float  r,
float  g,
float  b,
float  a,
int  zOrder,
bool  italic,
bool  clip 
)

◆ makeMatrix()

SharpKmyMath::Matrix4 SharpKmyGfx::SpriteBatch::makeMatrix ( float  posX,
float  posY,
float  rotX,
float  rotY,
float  rotZ,
float  scaleX,
float  scaleY,
float  pivotX,
float  pivotY 
)
static

◆ popClip()

void SharpKmyGfx::SpriteBatch::popClip ( )

◆ pushClip()

void SharpKmyGfx::SpriteBatch::pushClip ( SharpKmyMath::Matrix4  mtx,
int  clipX,
int  clipY,
int  clipWidth,
int  clipHeight,
bool  recurisve 
)

◆ Release()

void SharpKmyGfx::SpriteBatch::Release ( )

◆ resetMask()

void SharpKmyGfx::SpriteBatch::resetMask ( )

◆ setCameraMatrix()

void SharpKmyGfx::SpriteBatch::setCameraMatrix ( float  fovy,
float  xAngle,
float  yAngle 
)

◆ setLayer()

void SharpKmyGfx::SpriteBatch::setLayer ( int  layer)

◆ setMask() [1/2]

void SharpKmyGfx::SpriteBatch::setMask ( SharpKmyMath::Matrix4  mtx,
Texture tex,
int  ofsx,
int  ofsy,
int  w,
int  h,
float  u0,
float  v0,
float  u1,
float  v1,
float  r,
float  g,
float  b,
float  a 
)

◆ setMask() [2/2]

void SharpKmyGfx::SpriteBatch::setMask ( Texture tex,
int  x,
int  y,
int  ofsx,
int  ofsy,
int  w,
int  h,
float  rot,
float  u0,
float  v0,
float  u1,
float  v1,
float  r,
float  g,
float  b,
float  a 
)

◆ setProjectionMatrix()

void SharpKmyGfx::SpriteBatch::setProjectionMatrix ( SharpKmyMath::Matrix4  proj)

◆ setScreenSizeX()

void SharpKmyGfx::SpriteBatch::setScreenSizeX ( int  width,
int  height 
)

◆ setViewMatrix()

void SharpKmyGfx::SpriteBatch::setViewMatrix ( SharpKmyMath::Matrix4  view)

Member Data Documentation

◆ obj

kmyGfx::SpriteBatch* SharpKmyGfx::SpriteBatch::obj = nullptr