Comments (3)
Thanks! I haven't had much time to sink into my anari device lately but I'll definetly go through that file.
from anari-sdk.
Hi! This is definitely a gap in SDK documentation right now, so I'll do my best to direct you here.
Even though you're not planning on using helium
, the helide
device is still a reasonable reference point for some of the other miscellaneous things that device implementations need in order to work in the SDK:
ANARI_DEFINE_LIBRARY_ENTRYPOINT
(Example here) is whatanariLoadLibrary()
looks for when loading your library dynamically. You can probably just copy that file and change names to fit your library.- The jsons are only used for generating device/object info data for
anariGetDeviceExtensions
,anariGetObjectSubtypes
,anariGetObjectInfo
, andanariGetParameterInfo
. Those are about listing what extensions you implement that are in the core spec and then creating definitions for any extensions you add beyond the spec. The best strategy to use is to adapt an example json combined with CMake infrastructure for invoking the Python generation scripts (example here). - The main component you must implement is DeviceImpl -- yes it's a C++ pure-virtual class, but you don't have to use any C++ in order to implement it. The stuff
helium
does is inject a class layer in betweenDeviceImpl
and yours to handle some generic stuff (object lifetimes, array data + lifetime, parameter transactions, etc.), butDeviceImpl
itself is straight 1:1 with the public C API. If you understand the C API from the docs, then you should easily be able to implementDeviceImpl
with whatever you want to do....it's ultimately up to you.
Let me know if you have any other questions, as there's plenty of things to talk about when starting a device from scratch!
from anari-sdk.
FYI I just merged a README that explains the various aspects needed to get a device implementation going (viewable here)....I hope that helps! Let me know if anything is unclear, thanks!
from anari-sdk.
Related Issues (20)
- Please support MSYS2 MINGW64 HOT 4
- ANARIFeatures missing extension ANARI_KHR_STEREO_RENDERING HOT 2
- build failing, v0.3.0 and latest main HOT 5
- Create an offline version for the build HOT 3
- NULL pointer dereference in anariLoadLibrary if ANARI_LIBRARY is not set HOT 2
- Test fail with SIGILL HOT 1
- `primitive.index` not used for indexing into `vertex.color` HOT 1
- Vcpkg port HOT 2
- Wrong type for parameter `outOffset` of sampler `transform` HOT 1
- Missing CMake target for the debug backend layer HOT 1
- Comparing ANARIDataType in c++20
- Ensure spec compatibility with ANARI_BOOL in C++ wrappers
- Anari Python Bindings, Arrays of Arrays HOT 9
- Fails to build with Intel compilers. HOT 4
- Compiling on Windows - Visual Studio 2019 HOT 4
- Add SDK version as a #define
- Need to move anariGetObjectFeatures definition to the API.cpp implementation file HOT 4
- Building helide device fails for CMake 3.18 HOT 1
- Building GL Viewer on macOS fails due to missing GLES HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anari-sdk.