Nebula
Loading...
Searching...
No Matches
image.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
12#include "ids/id.h"
13#include "ids/idallocator.h"
14#include "pixelformat.h"
15#include "io/uri.h"
16namespace CoreGraphics
17{
18
20
21
27
34
40void DestroyImage(const ImageId id);
41
48
50const byte* ImageGetBuffer(const ImageId id);
52const byte* ImageGetRedPtr(const ImageId id);
54const byte* ImageGetGreenPtr(const ImageId id);
56const byte* ImageGetBluePtr(const ImageId id);
58const byte* ImageGetAlphaPtr(const ImageId id);
60const SizeT ImageGetPixelStride(const ImageId id);
61
72
79
80
90
91typedef Ids::IdAllocator<
95
96} // namespace CoreGraphics
Pixel format enumeration.
Definition pixelformat.h:22
Code
enums
Definition pixelformat.h:26
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
An ID allocator associates an id with a slice in an N number of arrays.
Definition idallocator.h:39
#define ID_24_8_TYPE(x)
Definition id.h:132
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
const byte * ImageGetAlphaPtr(const ImageId id)
get pointer to first element if alpha channel
Definition image.cc:503
const byte * ImageGetGreenPtr(const ImageId id)
get pointer to first element of green channel
Definition image.cc:483
ImageDimensions ImageGetDimensions(const ImageId id)
get image dimensions
Definition image.cc:453
ImageId CreateImage(const ImageCreateInfoFile &info)
create image from file path
Definition image.cc:18
const SizeT ImageGetPixelStride(const ImageId id)
get pixel stride, using the above pointers makes it possible to get all reds, blues,...
Definition image.cc:513
Ids::IdAllocator< ImageLoadInfo > ImageAllocator
Definition image.h:93
void DestroyImage(const ImageId id)
destroy image
Definition image.cc:444
ImageAllocator imageAllocator
Definition image.cc:14
const byte * ImageGetRedPtr(const ImageId id)
get pointer to first element of red channel
Definition image.cc:473
ImageChannelPrimitive ImageGetChannelPrimitive(const ImageId id)
get channel primitive
Definition image.cc:523
const byte * ImageGetBuffer(const ImageId id)
get pointer to buffer
Definition image.cc:463
ImageChannelPrimitive
Definition image.h:63
@ Bit8Uint
Definition image.h:64
@ Bit32Float
Definition image.h:68
@ Bit16Float
Definition image.h:66
@ Bit32Uint
Definition image.h:67
@ Bit16Uint
Definition image.h:65
const byte * ImageGetBluePtr(const ImageId id)
get pointer to first element of blue channel
Definition image.cc:493
ImageContainer
Definition image.h:74
@ DDS
Definition image.h:77
@ JPEG
Definition image.h:76
@ PNG
Definition image.h:75
CoreGraphics::PixelFormat format
Definition image.h:30
SizeT width
Definition image.h:31
void * data
Definition image.h:32
SizeT depth
Definition image.h:31
SizeT height
Definition image.h:31
IO::URI path
Definition image.h:24
bool convertTo32Bit
Definition image.h:25
Definition image.h:43
SizeT depth
Definition image.h:44
SizeT width
Definition image.h:44
SizeT height
Definition image.h:44
Definition image.h:19
Definition image.h:82
uint8_t blueOffset
Definition image.h:87
byte * buffer
Definition image.h:88
SizeT width
Definition image.h:83
uint8_t alphaOffset
Definition image.h:87
PixelFormat::Code format
Definition image.h:85
ImageContainer container
Definition image.h:86
ImageChannelPrimitive primitive
Definition image.h:84
SizeT depth
Definition image.h:83
SizeT height
Definition image.h:83
uint8_t redOffset
Definition image.h:87
uint8_t greenOffset
Definition image.h:87
int SizeT
Definition types.h:49