Code covered by the BSD License  

Highlights from
OpenGL .NET Examples

image thumbnail
from OpenGL .NET Examples by Dirk-Jan Kroon
Matlab OpenGL .NET code and examples for R2009a and above

example_Shader_Texture3D.m
% This example will render a cube in which a MIP projection of a 3D vessel
% texture is render with shading code. It uses two render passes.
% In the first rendeirng stage the back-facing polygons of the cube are 
% rendered, and the texture coordinates of every pixels are stored in
% a depth texture. In the second stage rays are rendered from the front facing
% polygons to the coordinates determined by the depth-texture.
% 
% Warning this example will take a second of 10 before showing an image, 
% and can crash Matlab if the 3D texture is not loaded in time before other
% opengl functions are called.
% 
 

% Load Tao Light assemblies and add function path
LoadTaoOpenGl;

% Create the OpenGL window
OpenGL_Window('new','Shader_Texture3D_Painters');

Contact us at files@mathworks.com