Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ In order to create a handle, a code section like the following will be used:
// Describe the device we're about to make
DkDeviceMaker maker;
dkDeviceMakerDefaults(&maker);
maker.flags = DkDeviceFlags_OriginLowerLeft;
maker.flags = DkDeviceFlags_OriginLowerLeft | DkDeviceFlags_YAxisPointsUp;

// Create the device
DkDevice device = dkDeviceCreate(&maker);
Expand All @@ -79,7 +79,7 @@ DkDevice device = dkDeviceCreate(&maker);
// Create the device in one go
// In the C++ wrapper, Maker objects follow the factory pattern
dk::Device device = dk::DeviceMaker{}
.setFlags(DkDeviceFlags_OriginLowerLeft)
.setFlags(DkDeviceFlags_OriginLowerLeft | DkDeviceFlags_YAxisPointsUp)
.create();
```

Expand All @@ -103,7 +103,7 @@ In C++, an additional series of handle holder types exist (marked with `Unique`
// Create the device
// dk::UniqueDevice contains a destructor which will automatically call destroy()
dk::UniqueDevice device = dk::DeviceMaker{}
.setFlags(DkDeviceFlags_OriginLowerLeft)
.setFlags(DkDeviceFlags_OriginLowerLeft | DkDeviceFlags_YAxisPointsUp)
.create();
```

Expand Down Expand Up @@ -203,8 +203,8 @@ Field | Default | Description
`DepthMinusOneToOne` | | Clip space Z is [-1, 1] like OpenGL
`OriginUpperLeft` | ✓ | Image rows are stored sequentially from top to bottom, with 0.0 corresponding to the top edge of the image and 1.0 (or the image height if non-normalized) corresponding to the bottom
`OriginLowerLeft` | | Image rows are stored sequentially from bottom to top, with 0.0 corresponding to the bottom edge of the image and 1.0 (or the image height if non-normalized) corresponding to the top
`YAxisPointsUp` | | Clip space Y axis points up like OpenGL/Direct3D/Metal
`YAxisPointsDown` | | Clip space Y axis points down like Vulkan
`YAxisPointsUp` | | Clip space Y axis points up like OpenGL/Direct3D/Metal
`YAxisPointsDown` | | Clip space Y axis points down like Vulkan

The debugging version of the library can use an optional callback (`cbDebug`). There are two situations in which deko3d makes usage of the debug callback:

Expand Down
2 changes: 1 addition & 1 deletion include/deko3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ DK_CONSTEXPR void dkDeviceMakerDefaults(DkDeviceMaker* maker)
maker->cbDebug = NULL;
maker->cbAlloc = NULL;
maker->cbFree = NULL;
maker->flags = DkDeviceFlags_DepthZeroToOne | DkDeviceFlags_OriginUpperLeft;
maker->flags = DkDeviceFlags_DepthZeroToOne | DkDeviceFlags_OriginUpperLeft | DkDeviceFlags_YAxisPointsDown;
}

#define DK_MEMBLOCK_ALIGNMENT 0x1000
Expand Down