simple opengl example project?

does anyone have or know of the ‘simplest’ project that would demonstrate opengl drawing in unity pro? even drawing a quad would suffice, so long as the calls to draw are GL.

we can’t seem to engage the gl system to draw. so we need a simple debug case that works. an entire project that would encapsulate all state would be ideal.

thanks!

bronxbomberman (aka Jedd) has been doing some stuff in OpenGL and hopefully he’ll drop by and see this.

Dave, I think he knows OpenGL, just can’t get it to work in Unity. Since I don’t have Pro, I can’t actually give him a working example XD.

Sorry, I look forward to seeing how to use the GL class in Unity though :slight_smile:

Ah, my mistake then.

indeed, we’re pretty GL tested. and i started down the debug path until i realized that we could be looking at a very low level problem - like the build isn’t allowing GL code to draw in its context.

i appreciate the assistance.

NCarter has done OpenGL. Take a look here. The example here works. http://unity3d.com/Documentation/ScriptReference/Material.SetPass.html

thanks! that got something drawn to the screen (i was skeptical). and i was able to duplicate in c# (our native script) and c. so GL is in fact working. once we’re through, i’ll post a complete project that may be useful for debugging.

Here’s a project I used as the first lecture in a Computer Science Graphics course I teach for MacEwan University. It doesn’t do much, though, except use triangles to display a square or hexagon.

1952400–126271–OpenGLDemo.zip (155 KB)