RenderDevice and fixed functions

7 views
Skip to first unread message

Vitaly Shevtsov

unread,
Apr 22, 2012, 7:02:36 AM4/22/12
to Рассылка G3D
Hello, Morgan and Corey!

I've found in G3D9 API Manual such strings:
Wherever possible, structure your code to use Framebuffer,
VertexRange, and Shader instead of fixed-function.
...
Fixed-function code is currently being phased out of the G3D API as it
is deprecated in OpenGL. Shader and VertexArray code is the preferred
rendering path.

So you recommend to use shader and VertexArray wherever it's possible.
But does it mean Surface::sortAndRender(...) is not preferable way to
render?

Thanks

--
Vitaly

Morgan McGuire

unread,
Apr 22, 2012, 11:01:09 AM4/22/12
to g3d-...@googlegroups.com
Good question!

Surface::sortAndRender will always be the fastest way to render on G3D.  If you are doing something that requires more complex manipulation or shading than Surface can support, then you need to go down to a lower level.  There are two lower levels in any OpenGL API: fixed function and programmable.  The fixed function API is inherently slow, so we're deprecating support for it to emphasize the programmable pipeline.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Vitaly Shevtsov

unread,
Apr 22, 2012, 11:19:21 AM4/22/12
to g3d-...@googlegroups.com
Clear )) Many thanks )

2012/4/22 Morgan McGuire <mor...@cs.williams.edu>:

--
Vitaly

Vitaly Shevtsov

unread,
Apr 22, 2012, 1:18:42 PM4/22/12
to g3d-...@googlegroups.com
btw, Is Surface::sortAndRender fastest because of culling of-screen surfaces?

2012/4/22 Vitaly Shevtsov <lok...@gmail.com>:

--
Vitaly

Morgan McGuire

unread,
Apr 22, 2012, 2:15:58 PM4/22/12
to g3d-...@googlegroups.com
It is fast because we make it fast.  It has enough high-level information about the scene that it can do culling, minimize render state changes, and batch process lights.  Whenever GPUs introduce a new way of optimizing, we add it to Surface.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan
Reply all
Reply to author
Forward
0 new messages