Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. 
        The model is scaled by the same amount as the overlay, with a default of 1m.
970407
def setOverlayRenderModel(self, ulOverlayHandle, pchRenderModel):
        

        fn = self.function_table.setOverlayRenderModel
        pColor = HmdColor_t()
        result = fn(ulOverlayHandle, pchRenderModel, byref(pColor))
        return result, pColor
747385
def drawOverlay(self, painter, option, rect, icon):
        
        if icon and not icon.isNull():
            painter.drawPixmap(rect, icon.pixmap(rect.width(), rect.height()))
252937
function( gl, v, renderer ) {

			var n = v.length,
				units = allocTexUnits( renderer, n );

			gl.uniform1iv( this.addr, units );

			for ( var i = 0; i !== n; ++ i ) {

				renderer.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );

			}

		}
192116
private void updateBitmapShader() {
        Drawable drawable = getDrawable();
        Bitmap bitmap = null;
        if ((null != drawable) && (drawable instanceof BitmapDrawable)) {
            bitmap = ((BitmapDrawable) drawable).getBitmap();
        }

        // Clear the shader & abort is the new bitmap is null
        if (null == bitmap) {
            mBitmapPaint.setShader(null);
            return;
        }

        int bitmapWidth = bitmap.getWidth();
        int bitmapHeight = bitmap.getHeight();
        float x = 0, y = 0;
        int diameter = mRadius * 2;
        // Offset takes the border width in to account when calculating the the scale
        int borderWidth = shouldDrawBorder() ? mBorderWidth : 0;
        int offset = (borderWidth > 0) ? (borderWidth * 2) : 0;
        // Consider shadow too
        offset += mShadowRadius * 1.5f;
        float scale = (float) (diameter - offset) / (float) Math.min(bitmapHeight, bitmapWidth);

        x = (mWidth - bitmapWidth * scale) * 0.5f;
        y = (mHeight - bitmapHeight * scale) * 0.5f;

        // Apply scale and translation to matrix
        Matrix matrix = new Matrix();
        matrix.setScale(scale, scale);
        matrix.postTranslate(Math.round(x), Math.round(y));

        // Create the BitmapShader and apply the Matrix
        BitmapShader shader = new BitmapShader(bitmap,
                Shader.TileMode.CLAMP,
                Shader.TileMode.CLAMP);
        shader.setLocalMatrix(matrix);
        mBitmapPaint.setShader(shader);
    }
546821
@Override
    public void paint(Graphics g, Shape allocation)
    {
        if (view != null)
        {
            view.paint(g, allocation);
        }
    }
856192
public void setForegroundPaint(final Paint PAINT) {
        if (null == foregroundPaint) {
            _foregroundPaint = PAINT;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            foregroundPaint.set(PAINT);
        }
    }
1050905
protected void renderLayers (Graphics2D g, Component pcomp, Rectangle bounds,
        boolean[] clipped, Rectangle dirty)
    {
        JLayeredPane lpane = JLayeredPane.getLayeredPaneAbove(pcomp);
        if (lpane != null) {
            renderLayer(g, bounds, lpane, clipped, JLayeredPane.PALETTE_LAYER);
            renderLayer(g, bounds, lpane, clipped, JLayeredPane.MODAL_LAYER);
            renderLayer(g, bounds, lpane, clipped, JLayeredPane.POPUP_LAYER);
            renderLayer(g, bounds, lpane, clipped, JLayeredPane.DRAG_LAYER);
        }

        // if we have a MediaOverlay, let it know that any sprites in this region need to be
        // repainted as the components beneath them have just been redrawn
        if (_overlay != null) {
            _overlay.addDirtyRegion(dirty);
        }
    }
606521
function GraphicsRenderer(renderer)
{
    ObjectRenderer.call(this, renderer);

    this.graphicsDataPool = [];

    this.primitiveShader = null;
    this.complexPrimitiveShader = null;
}
1291393
function draw(renderer) {
         var color = renderer.getColor();
         var height = renderer.getHeight(); // draw the progress bar

         renderer.setColor("black");
         renderer.fillRect(this.pos.x, height / 2, this.width, this.height / 2);
         renderer.setColor("#55aa00");
         renderer.fillRect(this.pos.x, height / 2, this.progress, this.height / 2);
         renderer.setColor(color);
       }
957713
@VisibleForTesting void configureBounds() {
    Drawable underlyingDrawable = getCurrent();
    Rect bounds = getBounds();
    int viewWidth = bounds.width();
    int viewHeight = bounds.height();
    int underlyingWidth = mUnderlyingWidth = underlyingDrawable.getIntrinsicWidth();
    int underlyingHeight = mUnderlyingHeight = underlyingDrawable.getIntrinsicHeight();

    // If the drawable has no intrinsic size, we just fill our entire view.
    if (underlyingWidth <= 0 || underlyingHeight <= 0) {
      underlyingDrawable.setBounds(bounds);
      mDrawMatrix = null;
      return;
    }

    // If the drawable fits exactly, no transform needed.
    if (underlyingWidth == viewWidth && underlyingHeight == viewHeight) {
      underlyingDrawable.setBounds(bounds);
      mDrawMatrix = null;
      return;
    }

    // If we're told to scale to fit, we just fill our entire view.
    // (ScaleType.getTransform would do, but this is faster)
    if (mScaleType == ScaleType.FIT_XY) {
      underlyingDrawable.setBounds(bounds);
      mDrawMatrix = null;
      return;
    }

    // We need to do the scaling ourselves, so have the underlying drawable use its preferred size.
    underlyingDrawable.setBounds(0, 0, underlyingWidth, underlyingHeight);
    mScaleType.getTransform(
        mTempMatrix,
        bounds,
        underlyingWidth,
        underlyingHeight,
        (mFocusPoint != null) ? mFocusPoint.x : 0.5f,
        (mFocusPoint != null) ? mFocusPoint.y : 0.5f);
    mDrawMatrix = mTempMatrix;
  }
737906
def on_draw(self):
        
        self._update_meshes()
        gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT)
        gl.glLoadIdentity()

        # pull the new camera transform from the scene
        transform_camera = self.scene.graph.get(
            frame_to='world',
            frame_from=self.scene.camera.name)[0]

        # apply the camera transform to the matrix stack
        gl.glMultMatrixf(rendering.matrix_to_gl(transform_camera))

        # we want to render fully opaque objects first,
        # followed by objects which have transparency
        node_names = collections.deque(self.scene.graph.nodes_geometry)
        # how many nodes did we start with
        count_original = len(node_names)
        count = -1

        # if we are rendering an axis marker at the world
        if self._axis:
            # we stored it as a vertex list
            self._axis.draw(mode=gl.GL_TRIANGLES)

        while len(node_names) > 0:
            count += 1
            current_node = node_names.popleft()

            # get the transform from world to geometry and mesh name
            transform, geometry_name = self.scene.graph[current_node]

            # if no geometry at this frame continue without rendering
            if geometry_name is None:
                continue

            # if a geometry is marked as fixed apply the inverse view transform
            if self.fixed is not None and geometry_name in self.fixed:
                # remove altered camera transform from fixed geometry
                transform_fix = np.linalg.inv(
                    np.dot(self._initial_camera_transform, transform_camera))
                # apply the transform so the fixed geometry doesn't move
                transform = np.dot(transform, transform_fix)

            # get a reference to the mesh so we can check transparency
            mesh = self.scene.geometry[geometry_name]
            if mesh.is_empty:
                continue

            # add a new matrix to the model stack
            gl.glPushMatrix()
            # transform by the nodes transform
            gl.glMultMatrixf(rendering.matrix_to_gl(transform))

            # draw an axis marker for each mesh frame
            if self.view['axis'] == 'all':
                self._axis.draw(mode=gl.GL_TRIANGLES)

            # transparent things must be drawn last
            if (hasattr(mesh, 'visual') and
                hasattr(mesh.visual, 'transparency')
                    and mesh.visual.transparency):
                # put the current item onto the back of the queue
                if count < count_original:
                    # add the node to be drawn last
                    node_names.append(current_node)
                    # pop the matrix stack for now
                    gl.glPopMatrix()
                    # come back to this mesh later
                    continue

            # if we have texture enable the target texture
            texture = None
            if geometry_name in self.textures:
                texture = self.textures[geometry_name]
                gl.glEnable(texture.target)
                gl.glBindTexture(texture.target, texture.id)

            # get the mode of the current geometry
            mode = self.vertex_list_mode[geometry_name]
            # draw the mesh with its transform applied
            self.vertex_list[geometry_name].draw(mode=mode)
            # pop the matrix stack as we drew what we needed to draw
            gl.glPopMatrix()

            # disable texture after using
            if texture is not None:
                gl.glDisable(texture.target)
118960
function( gl, v, renderer ) {

			var n = v.length,
				units = allocTexUnits( renderer, n );

			gl.uniform1iv( this.addr, units );

			for ( var i = 0; i !== n; ++ i ) {

				renderer.setTexture2D( v[ i ] || emptyTexture, units[ i ] );

			}

		}
1017835
@Override
    public void paint(IAtomContainer atomContainer, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {

        if (atomContainer.getBondCount() > 0 || atomContainer.getAtomCount() == 1) {
            rendererModel.getParameter(Scale.class).setValue(
                    calculateScaleForBondLength(GeometryUtil.getBondLengthAverage(atomContainer)));
        } else if (atomContainer.getAtomCount() > 1) {
            rendererModel.getParameter(Scale.class).setValue(
                    calculateScaleForBondLength(estimatedBondLength(atomContainer)));
        }

        // the diagram to draw
        IRenderingElement diagram = generateDiagram(atomContainer);

        // the bounds of the model from 'Bounds' elements
        Rectangle2D modelBounds = getBounds(diagram);

        // no bounding elements, use the atom coordinates
        if (modelBounds == null) modelBounds = BoundsCalculator.calculateBounds(atomContainer);

        setupTransformToFit(bounds, modelBounds, resetCenter);

        this.paint(drawVisitor, diagram);
    }
351762
public void setPaint(Paint paint) {
        if (paint == null)
            return;
        this.paint = paint;
		realPaint = paint;

		if ((composite instanceof AlphaComposite) && (paint instanceof Color)) {
			
			AlphaComposite co = (AlphaComposite) composite;
			
			if (co.getRule() == 3) {
				Color c = (Color) paint;
				this.paint = new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) (c.getAlpha() * alpha));
				realPaint = paint;
			}
		}

    }
922629
public void setRenderInline(final boolean renderInline) {
		if (renderInline != getRenderInline()) {
			ImageEditModel model = getOrCreateComponentModel();
			model.renderInline = renderInline;
		}
	}
466564
function setColor(color) {
         this.backBufferContext2D.strokeStyle = this.backBufferContext2D.fillStyle = color instanceof me.Color ? color.toRGBA() : color;
       }
535867
public void setOpacity(double opacity) {
		getLayerInfo().setStyle(Double.toString(opacity));
		renderer.setOpacity(opacity);
	}