The efficiency problem of OpenGL Gl_select mode (Turn) __ Virtual machine
Source: Internet
Author: User
the efficiency problem of OpenGL Gl_select mode Http://www.cnblogs.com/hesicong/archive/2007/02/12/648647.aspx every book in OpenGL primer will talk about the Select mode of OpenGL, It takes a method that allows you to get the current mouse-selected geometry. The simple way to do this is to first adjust the projection matrix so that you can see the world by selecting a square (size setting) near the mouse. And then you start drawing, and every time you paint it, you will judge if you will see it. If you see it, then you are choosing the geometry. More specific procedures can be found in the relevant books.
What I'm going to focus on is its efficiency.
Today, I have added some code to the pipe Bender program to enable you to select the various parts of the machine. But the reaction was so slow every time I picked it up that I could see a noticeable pause. And in the direct rendering of the time there is no such a problem, quite smooth. Finally I use PerformanceCounter timing, step by step to find the root of the problem, found that after Glrendermode (gl_select) settings, in the execution of the same drawing instructions will be very slow. After my test, in my 6600GT graphics card, using the official 93.50 driver, rendering the same screen, with the selection mode after the average speed of less than 10%, that is, more than 10 times times the rendering time. Simpler graphics render performance is also less than 30% of the normal rendering. The result is a serious delay.
At first I thought it was my program optimization problem, but even though all objects use a display list, there are problems. I thought this might be the problem with OpenGL implementation.
In the evening I put the Quadro FX1100 Professional graphics card (chip and GeForce FX5700) installed, use the same 93.50 drive, and then test. The average speed in the selection mode is about 60% below the normal rendering mode, as found to be improving. No delay has been felt.
Then I tested it under the virtual machine, but it was a different phenomenon. The SVGA video card under the virtual machine is about 10 times times faster than normal rendering under selection mode.
Is very confused, after all, choose the mode below to some more operations, speed should be slower, how fast so much. Is the test of the virtual machine believable? Is Nvidia's driver's problem. It was also mentioned on the web that Maya was slow to run on the top model of the Nvidia graphics card, which might be the problem with the driver.
The other side and there is no ATI graphics card, so temporarily can not use ATI graphics card for testing. But many people from the network feedback that ATI also has the same problem.
Solution also has, is that they write the relevant procedures, to see a person's reply is relatively simple, and he used the BSP data structure, for general procedures may not be applicable to it.
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.