-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #801 from Devsh-Graphics-Programming/cpp_compat_in…
…trinsics_refactor Cpp compat intrinsics refactor
- Loading branch information
Showing
17 changed files
with
865 additions
and
169 deletions.
There are no files selected for viewing
Submodule examples_tests
updated
2 files
+14 −14 | 62_CAD/DrawResourcesFiller.cpp | |
+2 −2 | 62_CAD/DrawResourcesFiller.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef _NBL_BUILTIN_HLSL_ARRAY_ACCESSORS_HLSL_INCLUDED_ | ||
#define _NBL_BUILTIN_HLSL_ARRAY_ACCESSORS_HLSL_INCLUDED_ | ||
|
||
#include <nbl/builtin/hlsl/cpp_compat/basic.h> | ||
|
||
namespace nbl | ||
{ | ||
namespace hlsl | ||
{ | ||
template<typename ArrayType, typename ComponentType, typename I = uint32_t> | ||
struct array_get | ||
{ | ||
ComponentType operator()(NBL_CONST_REF_ARG(ArrayType) arr, const I ix) NBL_CONST_MEMBER_FUNC | ||
{ | ||
return arr[ix]; | ||
} | ||
}; | ||
|
||
template<typename ArrayType, typename ComponentType, typename I = uint32_t> | ||
struct array_set | ||
{ | ||
void operator()(NBL_REF_ARG(ArrayType) arr, I index, ComponentType val) NBL_CONST_MEMBER_FUNC | ||
{ | ||
arr[index] = val; | ||
} | ||
}; | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.