Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::editor::ghi Namespace Reference

Namespaces

namespace  opengl
 

Classes

class  BadAllocation
 General exception thrown on bad GHI allocation. More...
 
class  BasicGraphicsMemoryManager
 Memory manager with some basic functionalities. More...
 
class  DeviceCapabilityInfo
 
class  FramebufferDesc
 
class  FramebufferFormatInfo
 
class  FramebufferObject
 
class  GetTextureNativeHandle
 
class  GHI
 Graphics API abstraction. More...
 
class  GraphicsArena
 Graphics memory allocation helper. The arena is allocating lazily, i.e., constructing and copying an arena instance won't allocate any memory, the actual allocation occurs when memory is explicitly requested. In addition to memory reusability, this class also provides various fallback mechanisms to ensure every memory request can be fulfilled. More...
 
class  GraphicsContext
 
class  GraphicsMemoryBlock
 
class  GraphicsMemoryManager
 Manages memory for graphics. More...
 
class  GraphicsObjectManager
 Manages the creation and deletion of graphics-related resource objects. All create<XXX>() and delete<XXX>() along with some data manipulation methods are thread safe as long as they are called within the lifetime of current graphics context. During the lifetime of the current graphics context, the GHI abstraction may be loaded/unloaded and thread safe methods are allowed to fail gently (not crash or causing any data corruption) during the unloaded period. More...
 
class  HostMemoryBlock
 A chunk of cache aligned main memory. More...
 
class  IndexStorage
 
class  IndexStorageObject
 
class  MemoryObject
 
class  Mesh
 
class  MeshObject
 
class  MeshVertexLayoutInfo
 
class  NullContext
 
class  NullGHI
 
class  NullMemoryManager
 
class  NullObjectManager
 
class  Opengl
 
class  OpenglColorAttachment
 
class  OpenglContext
 
class  OpenglDepthStencilAttachment
 
class  OpenglFramebuffer
 
class  OpenglGHI
 
class  OpenglIndexStorage
 
class  OpenglMemoryManager
 
class  OpenglMesh
 
struct  OpenglObjectCreator
 
struct  OpenglObjectDeleter
 
class  OpenglObjectManager
 
struct  OpenglObjectManipulator
 
class  OpenglShader
 
class  OpenglShaderProgram
 
class  OpenglTexture
 
class  OpenglVertexStorage
 
class  OutOfDeviceMemory
 
class  OutOfHostMemory
 
class  SampleStateInfo
 
class  Shader
 
class  ShaderObject
 
class  ShaderProgram
 
class  ShaderProgramObject
 
class  ShaderSetInfo
 
class  Storage
 
class  TextureDesc
 
class  TextureFormatInfo
 
class  TextureObject
 
class  VertexAttributeLocatorInfo
 
class  VertexGroupFormatInfo
 
class  VertexStorage
 
class  VertexStorageObject
 

Typedefs

using TextureHandle = TWeakHandle<TextureObject, uint32, uint32>
 
using VertexStorageHandle = TWeakHandle<VertexStorageObject, uint32, uint32>
 
using IndexStorageHandle = TWeakHandle<IndexStorageObject, uint32, uint32>
 
using MeshHandle = TWeakHandle<MeshObject, uint32, uint32>
 
using ShaderHandle = TWeakHandle<ShaderObject, uint32, uint32>
 
using ShaderProgramHandle = TWeakHandle<ShaderProgramObject, uint32, uint32>
 
using FramebufferHandle = TWeakHandle<FramebufferObject, uint32, uint32>
 
using MemoryHandle = TWeakHandle<MemoryObject, uint32, uint32>
 
using TextureNativeHandle
 
using QueryPerformer = TQueryPerformer<GraphicsContext>
 
using Query = TQuery<GraphicsContext>
 
template<typename Performer >
using TQueryOf = TQuery<GraphicsContext, Performer>
 

Enumerations

enum class  EClearTarget : uint32f { None = math::flag_bit<uint32f, 0>() , Color = math::flag_bit<uint32f, 1>() , Depth = math::flag_bit<uint32f, 2>() , Stencil = math::flag_bit<uint32f, 3>() }
 
enum class  EGraphicsAPI { Unknown = 0 , OpenGL }
 
enum class  ESizedPixelFormat : uint8 {
  Empty = 0 , RGB_8 , RGBA_8 , RGB_16F ,
  RGBA_16F , RGB_32F , RGBA_32F , Depth_24_Stencil_8
}
 Combined pixel layout and component type information. Unless stated explicitly, the characters RGB does not mean the pixel is in RGB color space. It simply represents pixel components, using R, G, B as placeholders. More...
 
enum class  EPixelFormat : uint8 {
  Empty = 0 , R , RG , RGB ,
  RGBA , Depth , Stencil
}
 
enum class  EPixelComponent : uint8 {
  Empty = 0 , Int8 , UInt8 , Int16 ,
  UInt16 , Int32 , UInt32 , Int64 ,
  UInt64 , Float16 , Float32 , Float64
}
 
enum class  EFilterMode : uint8 { Point , Linear }
 
enum class  EWrapMode : uint8 { ClampToEdge , Repeat }
 
enum class  EStorageElement : uint8 {
  Empty = 0 , Int8 , UInt8 , Int16 ,
  UInt16 , Int32 , UInt32 , Int64 ,
  UInt64 , Float16 , Float32 , Float64
}
 
enum class  EStorageUsage : uint8 { Unspecified = 0 , Static , Dynamic }
 
enum class  EMeshDrawMode : uint8 {
  Points , LineSegments , LineCurveOpened , LineCurveClosed ,
  TriangleStrip , TriangleFan , Triangles
}
 
enum class  EShadingStage : uint8 { Unspecified = 0 , Vertex , Fragment , Compute }
 

Functions

 PH_DEFINE_INLINE_ENUM_FLAG_OPERATORS (EClearTarget)
 
 PH_DEFINE_LOG_GROUP (GHI, GHI)
 
 PH_DECLARE_LOG_GROUP (GHI)
 
std::size_t num_bytes (ESizedPixelFormat sizedFormat)
 
std::size_t num_bytes (EPixelComponent component)
 
std::size_t num_bytes (EStorageElement element)
 
template<CEnum DstEnumType>
DstEnumType translate_to (EPicturePixelComponent pictureComponent)
 
void swap (GraphicsMemoryBlock &first, GraphicsMemoryBlock &second)
 
void swap (HostMemoryBlock &first, HostMemoryBlock &second)
 
 PH_DEFINE_INTERNAL_LOG_GROUP (OpenglGHI, GHI)
 
 PH_DEFINE_INTERNAL_LOG_GROUP (OpenglObjectManager, GHI)
 
 PH_DEFINE_INTERNAL_LOG_GROUP (OpenglShader, GHI)
 
 PH_DEFINE_INTERNAL_LOG_GROUP (OpenglShaderProgram, GHI)
 

Typedef Documentation

◆ FramebufferHandle

◆ IndexStorageHandle

◆ MemoryHandle

◆ MeshHandle

◆ Query

◆ QueryPerformer

◆ ShaderHandle

◆ ShaderProgramHandle

◆ TextureHandle

◆ TextureNativeHandle

Initial value:
std::variant<
std::monostate,
uint64>

◆ TQueryOf

template<typename Performer >
using ph::editor::ghi::TQueryOf = TQuery<GraphicsContext, Performer>

◆ VertexStorageHandle

Enumeration Type Documentation

◆ EClearTarget

enum class ph::editor::ghi::EClearTarget : uint32f
strong
Enumerator
None 
Color 
Depth 
Stencil 

◆ EFilterMode

enum class ph::editor::ghi::EFilterMode : uint8
strong
Enumerator
Point 
Linear 

◆ EGraphicsAPI

enum class ph::editor::ghi::EGraphicsAPI
strong
Enumerator
Unknown 
OpenGL 

◆ EMeshDrawMode

enum class ph::editor::ghi::EMeshDrawMode : uint8
strong
Enumerator
Points 
LineSegments 
LineCurveOpened 
LineCurveClosed 
TriangleStrip 
TriangleFan 
Triangles 

◆ EPixelComponent

enum class ph::editor::ghi::EPixelComponent : uint8
strong
Enumerator
Empty 
Int8 
UInt8 
Int16 
UInt16 
Int32 
UInt32 
Int64 
UInt64 
Float16 
Float32 
Float64 

◆ EPixelFormat

enum class ph::editor::ghi::EPixelFormat : uint8
strong
Enumerator
Empty 
RG 
RGB 
RGBA 
Depth 
Stencil 

◆ EShadingStage

enum class ph::editor::ghi::EShadingStage : uint8
strong
Enumerator
Unspecified 
Vertex 
Fragment 
Compute 

◆ ESizedPixelFormat

enum class ph::editor::ghi::ESizedPixelFormat : uint8
strong

Combined pixel layout and component type information. Unless stated explicitly, the characters RGB does not mean the pixel is in RGB color space. It simply represents pixel components, using R, G, B as placeholders.

Enumerator
Empty 
RGB_8 
RGBA_8 
RGB_16F 
RGBA_16F 
RGB_32F 
RGBA_32F 
Depth_24_Stencil_8 

◆ EStorageElement

enum class ph::editor::ghi::EStorageElement : uint8
strong
Enumerator
Empty 
Int8 
UInt8 
Int16 
UInt16 
Int32 
UInt32 
Int64 
UInt64 
Float16 
Float32 
Float64 

◆ EStorageUsage

enum class ph::editor::ghi::EStorageUsage : uint8
strong
Enumerator
Unspecified 
Static 
Dynamic 

◆ EWrapMode

enum class ph::editor::ghi::EWrapMode : uint8
strong
Enumerator
ClampToEdge 
Repeat 

Function Documentation

◆ num_bytes() [1/3]

std::size_t ph::editor::ghi::num_bytes ( EPixelComponent component)
inline

◆ num_bytes() [2/3]

std::size_t ph::editor::ghi::num_bytes ( ESizedPixelFormat sizedFormat)
inline

◆ num_bytes() [3/3]

std::size_t ph::editor::ghi::num_bytes ( EStorageElement element)
inline

◆ PH_DECLARE_LOG_GROUP()

ph::editor::ghi::PH_DECLARE_LOG_GROUP ( GHI )

◆ PH_DEFINE_INLINE_ENUM_FLAG_OPERATORS()

ph::editor::ghi::PH_DEFINE_INLINE_ENUM_FLAG_OPERATORS ( EClearTarget )

◆ PH_DEFINE_INTERNAL_LOG_GROUP() [1/4]

ph::editor::ghi::PH_DEFINE_INTERNAL_LOG_GROUP ( OpenglGHI ,
GHI  )

◆ PH_DEFINE_INTERNAL_LOG_GROUP() [2/4]

ph::editor::ghi::PH_DEFINE_INTERNAL_LOG_GROUP ( OpenglObjectManager ,
GHI  )

◆ PH_DEFINE_INTERNAL_LOG_GROUP() [3/4]

ph::editor::ghi::PH_DEFINE_INTERNAL_LOG_GROUP ( OpenglShader ,
GHI  )

◆ PH_DEFINE_INTERNAL_LOG_GROUP() [4/4]

ph::editor::ghi::PH_DEFINE_INTERNAL_LOG_GROUP ( OpenglShaderProgram ,
GHI  )

◆ PH_DEFINE_LOG_GROUP()

ph::editor::ghi::PH_DEFINE_LOG_GROUP ( GHI ,
GHI  )

◆ swap() [1/2]

void ph::editor::ghi::swap ( GraphicsMemoryBlock & first,
GraphicsMemoryBlock & second )
noexcept

◆ swap() [2/2]

void ph::editor::ghi::swap ( HostMemoryBlock & first,
HostMemoryBlock & second )
inlinenoexcept

◆ translate_to()

template<CEnum DstEnumType>
DstEnumType ph::editor::ghi::translate_to ( EPicturePixelComponent pictureComponent)