dwmkerr / dwmkerr/sharpgl

build object with the SceneControl

Open
#189 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
804
Forks
294
Avg merge
3d 23h
Merged PRs (30d)
1

Description

Hello,

In order to translate the 3D rendering part of code of a WindowsFrom application (.Net/C#), i'm looking for a 3D sdk with a scenegraph. SharGL seems to me to contain this feature with its SceneControl. Starting from the sample SceneSample, i just tried to create an object : a cylinder + its top disk. To do this, i do:
```
Cylinder cylindre = new Cylinder() { Name = "Cylindre1" };
cylindre.BaseRadius = cylindre.TopRadius = 2;
cylindre.Height = 2;
Disk topDisk = new Disk() { Name = "TopDisk" };
topDisk.OuterRadius = 2;
topDisk.InnerRadius = 1;
topDisk.Transformation.TranslateZ = (float)cylindre.Height;
cylindre.Children.Add( topDisk );

cylindre.Transformation.TranslateZ = 4;
sceneControl1.Scene.SceneContainer.AddChild( cylindre );
```
Unfortunately, this gives an 'System.AccessViolationException ' during execution.
I assume i miss something, or mis understanding the usage.

Someone can help, or give a link to a sample with a basic object contruction?

regards
Pascal

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.