下面这个递归方法使用有错误么?

public void	RecursRender( TriTreeNode tri, int leftX, int leftY, int rightX, int rightY, int apexX, int apexY, GL10 gl )
                 {
			
			if ( tri.LeftChild != null )					
			{
				int centerX = (leftX + rightX)>>1;	
				int centerY = (leftY + rightY)>>1;	

				RecursRender( tri.LeftChild,  apexX,   apexY, leftX, leftY, centerX, centerY, GL10 gl );
				RecursRender( tri.RightChild, rightX, rightY, apexX, apexY, centerX, centerY, GL10 gl );
			}
			else{
			//省略,不是重点
			}
		}
//这里GL10 gl这个参数分别在定义时和迭代都调用合法么?事实上,eclipse报错了,提示GL10 cannot be resolved to a variable,应该如何修改


JustV
浏览 1240回答 1
1回答

JustV

已经检查出错误了。。。在递归调用时,gl变量直接填变量名就行了,不该继续带着类型名!
打开App,查看更多内容
随时随地看视频慕课网APP