ʹÓÃEclipse RCP½øÐÐ×ÀÃæ³ÌÐò¿ª·¢£¨Áù£©£ºÏòOpenGL½ø¾ü - ±à³ÌÈëÃÅÍø
esherÀàµÄ´úÂëÈçÏ£º
class Refresher implements Runnable {
¡¡¡¡ public static final int DELAY = 100;
¡¡¡¡ private GLCanvas canvas;
¡¡¡¡ public Refresher(GLCanvas canvas) {
¡¡¡¡¡¡¡¡ this.canvas = canvas;
¡¡¡¡ }
¡¡¡¡ public void run() {
¡¡¡¡¡¡¡¡ if (this.canvas != null && !this.canvas.isDisposed()) {
¡¡¡¡¡¡¡¡¡¡¡¡ if(!canvas.isCurrent()){
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ canvas.setCurrent();
¡¡¡¡¡¡¡¡¡¡¡¡ }
¡¡¡¡¡¡¡¡¡¡¡¡ //ÕâÀïÌí¼ÓOpenGL»æͼ´úÂë
¡¡¡¡¡¡¡¡¡¡¡¡ canvas.swapBuffers();
¡¡¡¡¡¡¡¡¡¡¡¡ this.canvas.getDisplay().timerExec(DELAY, this);
¡¡¡¡¡¡¡¡ }
¡¡¡¡ }
}
ÎÊÌâ½â¾ö£¬µÃµ½µÄЧ¹ûͼÈçÏ£º ʹÓÃEclipse RCP½øÐÐ×ÀÃæ³ÌÐò¿ª·¢£¨Áù£©£ºÏòOpenGL½ø¾ü(6)ʱ¼ä:2011-04-13 º£±ßÄÄOK£¬ÏÂÃæµÄÈÎÎñ¾ÍÊÇÍêÍêÈ«È«µÄʹÓÃOpenGLµÄ»æͼ¹¦ÄÜÁË£¬²»¹ÜÄãµÄOpenGL½Ì²ÄʹÓõÄÊÇ Ê²Ã´²Ù×÷ϵͳʲô±à³ÌÓïÑÔ£¬Ä㶼Äܼܺòµ¥µÄ°ÑËüµÄ¸ÅÄîÄõ½ÕâÀïÀ´Ê¹ÓᣠʹÓÃOpenGLµÄµÚÒ»¼þÊ£¬¾ÍÊÇÒªÉèÖÃͶӰ¾ØÕó¡¢****ͼºÍ¹Û²ìÕß¾ØÕó£¬Èç¹ûÄã²»ÖªµÀΪʲ ôҪÕâô×ö£¬Çë²é¿´OpenGLµÄ»ù´¡½Ì²Ä£¬ÔÚÕâÀÕÕ°á¾ÍÐÐÁË¡£ÎªÁËÈÃÎÒÃǵĿؼþÔÚÿ´Î¸Ä ±ä´óСµÄʱºò¶¼Äܹ»×öÕâЩÉèÖã¬ÎÒÃÇʹÓÃʼþ******£¬ÈçÏ£º
µ÷ÓÃglLoadIdentity()Ö®ºó£¬Êµ¼ÊÉϽ«µ±Ç°µãÒƵ½ÁËÆÁÄ»ÖÐÐÄ£¬X×ø±êÖá´Ó×óÖÁÓÒ£¬Y×ø±ê Öá´ÓÏÂÖÁÉÏ£¬Z×ø±êÖá´ÓÀïÖÁÍâ¡£Op |
ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»! |