Code example for GL11

Methods: glScissor

0
		float parentMaxY = parentClipY + parentClipH;
		if (parentMaxY > 1 && currClipY + currClipH > parentMaxY) {
			currClipH = parentClipY + parentClipH - currClipY;
		} 
 
		gl.glScissor(currClipX, currClipY, currClipW, currClipH);
	} 
 
	public void initAll() { 
		initBackgroundColor(); 
		init(); 
		for (View child : children) {
			child.initAll();
		} 
		initialized = true;
	} 
 
	public void drawAll() { 
		if (!initialized)
			return; 
		// scissor ensures that each view can only draw within its rect