jGL
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
jGL Namespace Reference

A drawable graphic. More...

Namespaces

namespace  GL
 
namespace  Vulkan
 

Classes

struct  AbstractjGLUniform
 
struct  BoundingBox
 A bounding box template. More...
 
class  DesktopDisplay
 
class  Display
 
struct  Event
 
class  Font
 
class  Glyph
 
struct  Id
 
class  jGLInstance
 
struct  jGLUniform
 
struct  NormalisedTextureRegion
 Rectangular region of a texture, normalised by the textures dimensions. More...
 
class  OrthoCam
 An orthographic camera for 2D. More...
 
class  Particles
 
struct  Primitive
 
struct  Sampler2D
 
struct  Shader
 Generic shader program with vertex and fragment shader. More...
 
class  Shape
 A drawable shape. More...
 
class  ShapeRenderer
 Renders shapes with optional rendering priority. More...
 
class  Sprite
 
class  SpriteRenderer
 Renders sprites in batches, with optional render priority. More...
 
class  Texture
 
struct  TexturedParticle
 Particle with a texture, with a position, orientation, and scale, colour, and texture region. More...
 
struct  TextureRegion
 Rectangular region of a texture in pixels. More...
 
struct  Transform
 Position, rotation, and scale. More...
 
class  WorldBoundingBox
 A world space bounding box. More...
 

Typedefs

typedef uint64_t RenderPriority
 Higher priority is drawn last.
 
typedef BoundingBox< uint16_t > ScreenBoundingBox
 A screen space bounding box.
 
typedef std::string ShapeId
 
typedef std::string SpriteId
 User name for a Shape.
 

Enumerations

enum class  EventType { NONE , PRESS , RELEASE , HOLD }
 

Functions

std::ostream & operator<< (std::ostream &os, Id const &value)
 
std::string to_string (const Id &i)
 
void defaultKeyEventCallback (GLFWwindow *window, int key, int scancode, int action, int mods)
 
void defaultMouseButtonCallback (GLFWwindow *window, int button, int action, int mods)
 
void defaultScrollCallback (GLFWwindow *window, double x, double y)
 
void parseAction (GLFWwindow *window, int code, int action)
 
EventType glfwCodeToEvent (int action)
 
template<class T >
const jGLUniform NULL_UNIFORM ("", static_cast< T >(NAN))
 
bool operator== (const Shader &lhs, const Shader &rhs)
 

Variables

const Id NULL_ID = Id()
 
template<class T >
const std::regex UNIFORM_DATA_REGEX
 
template<>
const std::regex UNIFORM_DATA_REGEX< int > = std::regex("uniform int (\\S+);")
 
template<>
const std::regex UNIFORM_DATA_REGEX< float > = std::regex("uniform float (\\S+);")
 
template<>
const std::regex UNIFORM_DATA_REGEX< Sampler2D > = std::regex("uniform(\\slowp\\s|\\shighp\\s|\\smediump\\s|\\s)sampler2D (\\S+);")
 

Detailed Description

A drawable graphic.

Observes a Transform (position, orientation, scale), and a Texture.

Rendered using the TextureRegion (pixel units) region of the Texture, at the alpha value.

Typedef Documentation

◆ RenderPriority

Higher priority is drawn last.

◆ ScreenBoundingBox

A screen space bounding box.

◆ ShapeId

typedef std::string jGL::ShapeId

◆ SpriteId

User name for a Shape.

User name for a Sprite.

Enumeration Type Documentation

◆ EventType

enum class jGL::EventType
strong
Enumerator
NONE 
PRESS 
RELEASE 
HOLD 

Function Documentation

◆ defaultKeyEventCallback()

void jGL::defaultKeyEventCallback ( GLFWwindow *  window,
int  key,
int  scancode,
int  action,
int  mods 
)

◆ defaultMouseButtonCallback()

void jGL::defaultMouseButtonCallback ( GLFWwindow *  window,
int  button,
int  action,
int  mods 
)

◆ defaultScrollCallback()

void jGL::defaultScrollCallback ( GLFWwindow *  window,
double  x,
double  y 
)

◆ glfwCodeToEvent()

EventType jGL::glfwCodeToEvent ( int  action)

◆ NULL_UNIFORM()

template<class T >
const jGLUniform jGL::NULL_UNIFORM ( ""  ,
static_cast< T >  NAN 
)

◆ operator<<()

std::ostream & jGL::operator<< ( std::ostream &  os,
Id const &  value 
)

◆ operator==()

bool jGL::operator== ( const Shader lhs,
const Shader rhs 
)

◆ parseAction()

void jGL::parseAction ( GLFWwindow *  window,
int  code,
int  action 
)

◆ to_string()

std::string jGL::to_string ( const Id i)

Variable Documentation

◆ NULL_ID

const Id jGL::NULL_ID = Id()

◆ UNIFORM_DATA_REGEX

template<class T >
const std::regex jGL::UNIFORM_DATA_REGEX

◆ UNIFORM_DATA_REGEX< float >

template<>
const std::regex jGL::UNIFORM_DATA_REGEX< float > = std::regex("uniform float (\\S+);")
inline

◆ UNIFORM_DATA_REGEX< int >

template<>
const std::regex jGL::UNIFORM_DATA_REGEX< int > = std::regex("uniform int (\\S+);")
inline

◆ UNIFORM_DATA_REGEX< Sampler2D >

template<>
const std::regex jGL::UNIFORM_DATA_REGEX< Sampler2D > = std::regex("uniform(\\slowp\\s|\\shighp\\s|\\smediump\\s|\\s)sampler2D (\\S+);")
inline