PDA

View Full Version : OpenGL from Matlab



09-06-2002, 04:00 AM
I am sorry for my newbie question. According to the Matlab Manual, Matlab supports OpenGL. I would like to know more detail how it works, and compatibility.
Would anyone know any documentation or web?
I had looked through Mathworks and Google search. But I have not got any luck yet.
Thank you very much for your help in advance.

Gavin
09-06-2002, 04:20 AM
You seen these then?
http://www.mathworks.com/support/openGLrelnotes.shtml http://www.mathworks.com/support/solutions/data/29745.shtml

09-06-2002, 08:39 AM
Originally posted by Gavin:
You seen these then?
http://www.mathworks.com/support/openGLrelnotes.shtml http://www.mathworks.com/support/solutions/data/29745.shtml

Yes, I have. I thought someone might have any experiences and suggestions; for instance, save an image by Matlab commands, and open it and process it by OpenGL commands.
Anyway, I am going to try. Thank you very much for your comments.

JoeMac
09-06-2002, 02:45 PM
I'm fairly new to Matlab, but fairly old to GL. http://www.opengl.org/discussion_boards/ubb/smile.gif I just found myself thinking the same question. My first guess would be to compile any C/OpenGL rendering commands in a mex file and call them that way. Haven't tried it yet, but I plan to soon.
Joe

marcus256
09-07-2002, 02:19 AM
Hello.

I think that the OpenGL support in Matlab is that the Matlab figures (2D/3D plots) can be OpenGL accelerated, which is very nice. I work alot with Matlab at work, and my computer there has a sucky Matrox G200 card with very low class OpenGL drivers, so I never get OpenGL acceleration there. Since many plots (especially 3D plots or huge data sets) are very slow to work with, OpenGL acceleration would have been very nice.

You know, Matlab's 3D figures support things like lighting and texturing - ideal for OpenGL http://www.opengl.org/discussion_boards/ubb/wink.gif

09-07-2002, 09:37 AM
Could I give you further basic questions?
(forgive me since I am a new for OpenGL)
-Is it possible to call OpenGL commands directly from Matlab's command line (or coding in ".m" file)? In case for C, we need to include OpenGL libraries. Is there anything equivalent for Matlab (if it can be used)?
-Would anyone have any experiences not only for rendering but also for saving and reading images in Matlab & OpenGL; that is, create an image by Matlab, and then read and add effects by OpenGL within Matlab... any incompatibility in format and colour-depth?
Thank you very much...

Gavin
09-09-2002, 01:33 AM
What are you expecting from the fact that Matlab uses OpenGL? As marcus says it looks like it just means that iMatlab uses OpenGL as its renderer so your plots are nicer and faster!