On 07/26/2013 06:18 PM, ZhiLi wrote:
Hello everyone,

I am an university student working on school project related to OpenGL.
Now I am using mesa library (version 9.0.3) as an implementation of OpenGL.
I have a few questions about Mesa library.

glBegin()/glEnd() pair is used for immediate mode rendering, so I study
the source code to find out
how these functions work.

In file "vbo_exec_api.c" line 800, the comment says function
vbo_exec_Begin is called via glBegin().

However, in all library files, I cannot find where and how glBegin()
calls the function.

Could you give some hints and explanations? I am really appreciating
your help. Thanks.

Li Zhi

When starting to work on Mesa, many people get really confused when trying to use GDB to step into GL functions. They often think they need to understand how GL dispatch works before they be an effective developer.

However, most of the time, you don't actually need to worry about how GL functions get dispatched. You can usually just assume that glFoo() will call _mesa_Foo(), which will be defined src/mesa/main/*.c.

Drawing functions are a little special and instead appear as "vbo_exec_Foo" in src/mesa/vbo/vbo_exec_array.c.

Pierre did a great job actually answering your question; this is just an extra bit of advice.

--Ken
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to