Code covered by the BSD License  

Highlights from
OpenGL .NET Examples

4.5

4.5 | 2 ratings Rate this file 13 Downloads (last 30 days) File Size: 4.23 MB File ID: #23792
image thumbnail

OpenGL .NET Examples

by Dirk-Jan Kroon

 

15 Apr 2009

Matlab OpenGL .NET code and examples for R2009a and above

| Watch this File

File Information
Description

Matlab R2009a and above now support .NET assemblies, which allows us to use .NET wrapped libraries such as OpenGL .NET in Matlab.

I have included OpenGL .NET assemblies including the source C# code from TAO, and a hand full examples. The examples range from a basic colored cube till a MIP render of a 3D texture with GLSL shading code. There is also example code to render Opengl and .NET forms "inside" a Matlab figure.

To work first install .NET recommend version 3.5. Try the examples and study the code.

Modifications of TAO code:
Matlab does not allow type specification of an output variable, so outputs must also be inputs to allow type specification. So I changed all array outputs in the C# code "[OUT]" to "[In, Out] ref" expect "[Out] out" commands.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Requires Windows with .NET installed.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
28 Apr 2009 Fazil P

You have an extra "/" in LoadTaoOpenGl.m, that's why the warning. Output of [functiondir '/TaoLight/Tao.OpenGl.dll'] returns
C:\Work\dotnet_mfiles\OpenGL\/TaoLight/Tao.OpenGl.dll

Fix:
Modify lines 6 and 7 to,
NET.addAssembly([functiondir 'TaoLight/Tao.OpenGl.dll']);
NET.addAssembly([functiondir 'TaoLight/Tao.Platform.Windows.dll']);

warning goes away.

Nice examples.

03 Feb 2010 Siyi Deng  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
opengl Dirk-Jan Kroon 15 Apr 2009 13:50:59
net Dirk-Jan Kroon 15 Apr 2009 13:50:59
control Dirk-Jan Kroon 15 Apr 2009 13:50:59
c Dirk-Jan Kroon 15 Apr 2009 13:50:59
tao Dirk-Jan Kroon 15 Apr 2009 13:50:59
shaders Dirk-Jan Kroon 15 Apr 2009 13:50:59
shader code Dirk-Jan Kroon 15 Apr 2009 13:50:59
glsl Dirk-Jan Kroon 15 Apr 2009 13:50:59
assemblies Dirk-Jan Kroon 15 Apr 2009 13:50:59
texture 3d Dirk-Jan Kroon 15 Apr 2009 13:50:59
shading Dirk-Jan Kroon 15 Apr 2009 13:50:59
polygons Dirk-Jan Kroon 15 Apr 2009 13:50:59

Contact us at files@mathworks.com