CoriEngine
Loading...
Searching...
No Matches
Cori::Graphics Namespace Reference

Almost everything connected to graphics is in this namespace. More...

Namespaces

namespace  Internal

Classes

struct  Animation
 Owning handle to the animation inside the AnimationPack, when paired with Animation::PlayParams can be passed to QuadAnimator. More...
class  AnimationPack
 Represents a pack of sprite animations that were loaded from the drive from the pair of an image file and json config. More...
class  CameraController
 A class that is used to manipulate Camera of the Scene. Each Scene has one of those. More...
class  CoriGraphicsAPI
class  Font
 Font asset to be used when rendering text. Pretty expensive to create if not cached, always preload it. More...
class  Image
 Used to load an image. It can flip and image and add padding to it. Mainly used for texture loading. More...
class  IndexBuffer
class  Renderer2D
 The main engine renderer. More...
class  RenderingContext
class  ShaderProgram
class  SpriteAtlas
 Holds the sprite atlas and UVs for sprites in it. All spite atlases are padded, so no sprite atlas bleeding will occur. More...
class  Texture
 Abstract class for textures. More...
class  Texture2D
 A regular 2D texture with 1 layer. More...
struct  UVs
class  VBElement
class  VBLayout
class  VertexArray
class  VertexBuffer

Concepts

concept  IsAnimationWithParams

Typedefs

using AnimationWithParams = std::pair<Animation, Animation::PlayParams>
 Pair of Animation and Animation::PlayParams.

Enumerations

enum class  ShaderDataType {
  None = 0 , Float , Vec2 , Vec3 ,
  Vec4 , Mat3 , Mat4 , Int ,
  Int2 , Int3 , Int4 , UInt ,
  UInt2 , UInt3 , UInt4 , Bool
}
enum class  GraphicsAPIs { None = 0 , OpenGL = 1 , Vulkan = 2 }

Functions

static constexpr size_t ShaderDataTypeSize (ShaderDataType type)
static constexpr size_t ShaderDataTypeComponentCount (ShaderDataType type)
consteval glm::vec4 NormalizeHexColor32 (const uint32_t hex)
 Converts the RGBA in a hex format to a normalized vec4.
consteval glm::vec3 NormalizeHexColor24 (const uint32_t hex)
 Converts the RGB in a hex format to a normalized vec3. Last byte corresponding to Alpha chanel is ignored.
static const char * APIEnumToName (const GraphicsAPIs api)

Detailed Description

Almost everything connected to graphics is in this namespace.

Typedef Documentation

◆ AnimationWithParams

Enumeration Type Documentation

◆ GraphicsAPIs

enum class Cori::Graphics::GraphicsAPIs
strong
Enumerator
None 

Invalid enumerator.

OpenGL 

The only one available for now.

Vulkan 

I want to support vulkan, BUT later-later.

Definition at line 5 of file GraphicsAPIs.hpp.

◆ ShaderDataType

enum class Cori::Graphics::ShaderDataType
strong
Enumerator
None 
Float 
Vec2 
Vec3 
Vec4 
Mat3 
Mat4 
Int 
Int2 
Int3 
Int4 
UInt 
UInt2 
UInt3 
UInt4 
Bool 

Definition at line 5 of file Buffers.hpp.

Function Documentation

◆ APIEnumToName()

const char * Cori::Graphics::APIEnumToName ( const GraphicsAPIs api)
staticnodiscard

Definition at line 20 of file GraphicsAPIs.hpp.

◆ NormalizeHexColor24()

glm::vec3 Cori::Graphics::NormalizeHexColor24 ( const uint32_t hex)
consteval

Converts the RGB in a hex format to a normalized vec3. Last byte corresponding to Alpha chanel is ignored.

Parameters
hexValue to convert.
Returns
Normalized vec3 with the color data.

Definition at line 24 of file Color.hpp.

◆ NormalizeHexColor32()

glm::vec4 Cori::Graphics::NormalizeHexColor32 ( const uint32_t hex)
consteval

Converts the RGBA in a hex format to a normalized vec4.

Parameters
hexValue to convert.
Returns
Normalized vec4 with the color data.

Definition at line 10 of file Color.hpp.

◆ ShaderDataTypeComponentCount()

constexpr size_t Cori::Graphics::ShaderDataTypeComponentCount ( ShaderDataType type)
staticconstexpr

Definition at line 40 of file Buffers.hpp.

◆ ShaderDataTypeSize()

constexpr size_t Cori::Graphics::ShaderDataTypeSize ( ShaderDataType type)
staticconstexpr

Definition at line 13 of file Buffers.hpp.