Closed griemens closed 7 years ago
CC @agadoul @gcorvala @andgonro
Hi, Our CoreSdk (Preview) has this feature indeed. It is not yet clean and therefore not all features are easy to use and the Api might change in the next version. So I can try to drive you to create a vbo.
Create a coreSdk model like desribe in the CountDown example: https://github.com/walkinside/sdk-beta/blob/master/examples/preview/Core%20SDK/Example%202.%20Countdown/CountdownModel.cs
overide the method Initialize.
in the method initiliaze, create VRGenericVertexArray (context.Renderer.MakeGenericVertexArray). The format is an integer, we did not have time to use an enum which would have been easier for developers. Which vertex format do you need? I could tell you which magic integer to use.
use the context given to subscribe to create a vbo from the generic vertex array. context.Renderer.MakeVertexBufferObject.
create a vbo using the vbo in the same manner.
override render method, bind your vao and call context.Renderer.Draw.
And voila. I hope this is explained well enough.
I keep in mind to have a Sdk example showing this feature in the close future. Thanks for your interest and your support, Axel.
Excellent! going to give it a try, and when I have a sample running will upload the code to github.
The vertex format I need is Position (x,y,z) and UV (x,y)
magic number should be 18.
You can combine them. here is the supported type.
enum { VR_VF_XY_F = (1 << 0), // XY position: 2 floats VR_VF_XYZ_F = (1 << 1), // XYZ position: 3 floats VR_VF_NORMAL_F = (1 << 2), // normal: 3 floats VR_VF_RGBA_B = (1 << 3), // color: 4 bytes VR_VF_TEX0_UV_F = (1 << 4), // tex coords 0, 2 floats };
I assume this has been resolved. Feel free to re-open in case of questions.
Hi,
In the examples collection I can only find 2d examples and a light example. Will it be possible to draw 3D content using this SDK ?
I would like to render my own waypath for ITS.
A scenario has more then 60 actions and I need to render only the current section of the waypath. Rendering a full way path as walkinside does is not usefull.
Thanks,