Efficiency of OpenGL gl_select Mode

Source: Internet
Author: User
Every OpenGL entry book will talk about the select mode of OpenGL. It uses a method to obtain the geometric image selected by the current mouse. Simply put, this method is the first
The entire projection matrix allows you to see the world by clicking a nearby square (the size can be set. And then start to draw. When you draw each time, you will determine if you will see it.
If you see this, you chose this ry. For more detailed procedures, see related books.
I will focus on its efficiency.
Today
I am in the Tube Bending Machine Program Add more Code To select the components of the machine. However, I found that the response speed was so slow that I could see a significant pause. In direct rendering
This problem does not occur, and it is quite smooth. Finally, I used the performancecounter timing to find the root cause of the problem step by step.
(Gl_select) after the settings, the execution of the same drawing command will be quite slow. After my test, I used the official 93.50 driver on my 6600gt video card to render the same image.
After the mode is selected, the average speed is lower than 10%, that is, the rendering time is increased by more than 10 times. The performance of simple graphic rendering is also less than 30% of that of normal rendering. The consequence of this is a serious delay.
Late.
At the beginning, I thought it was a problem with program optimization. However, even if all objects use the display list, this problem also exists. I think this may be a problem with OpenGL implementation.
In the evening, I installed the Quadro fx1100 professional graphics card (with the same chip as the geforce fx5700), used the same 93.50 driver, and then tested it. The situation has improved. The average speed in the selected mode is about 60% under the normal rendering mode. No latency is detected.
Then I tested it under the virtual machine, but the results were quite different. The svga video card under the virtual machine is about 10 times faster than normal rendering in the selection mode.
I am very confused. After all, the selection mode requires more operations and the speed should be slower. How can it be so fast? Is the test of a virtual machine credible? Is it a problem with NVIDIA drivers? Some people mentioned on the Internet that Maya runs slowly when it is in the NVIDIA graphics card mode. The problem may be caused by the driver.
In addition, there is no ATI graphics card around, so you cannot use the ATI graphics card for testing. However, many people on the Internet have reported that ATI has the same problem.
The solution is to write related programs by yourself. Reading replies from a person is relatively simple, but he uses the BSP data structure, which may not be suitable for general programs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.