Examples of RenderBuffer

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics
  • com.thecherno.cherno.engine.interfaces.RenderBuffer
    @author Yan
  • sun.java2d.pipe.RenderBuffer
    The RenderBuffer class is a simplified, high-performance, Unsafe wrapper used for buffering rendering operations in a single-threaded rendering environment. It's functionality is similar to the ByteBuffer and related NIO classes. However, the methods in this class perform little to no alignment or bounds checks for performance reasons. Therefore, it is the caller's responsibility to ensure that all put() calls are properly aligned and within bounds: - int and float values must be aligned on 4-byte boundaries - long and double values must be aligned on 8-byte boundaries This class only includes the bare minimum of methods to support single-threaded rendering. For example, there is no put(double[]) method because we currently have no need for such a method in the STR classes.

  • Examples of sun.java2d.pipe.RenderBuffer

            // invalidate the current context
            currentContext = null;

            // set the scratch context
            OGLRenderQueue rq = OGLRenderQueue.getInstance();
            RenderBuffer buf = rq.getBuffer();
            rq.ensureCapacityAndAlignment(12, 4);
            buf.putInt(SET_SCRATCH_SURFACE);
            buf.putLong(pConfigInfo);
        }
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

        @Override
        public void flush() {
            D3DRenderQueue rq = D3DRenderQueue.getInstance();
            rq.lock();
            try {
                RenderBuffer buf = rq.getBuffer();
                rq.ensureCapacityAndAlignment(12, 4);
                buf.putInt(FLUSH_SURFACE);
                buf.putLong(getNativeOps());

                // this call is expected to complete synchronously, so flush now
                rq.flushNow();
            } finally {
                rq.unlock();
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

         */
        static void dispose(long pData) {
            D3DRenderQueue rq = D3DRenderQueue.getInstance();
            rq.lock();
            try {
                RenderBuffer buf = rq.getBuffer();
                rq.ensureCapacityAndAlignment(12, 4);
                buf.putInt(DISPOSE_SURFACE);
                buf.putLong(pData);

                // this call is expected to complete synchronously, so flush now
                rq.flushNow();
            } finally {
                rq.unlock();
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

                }
            } else {
                rq.lock();
            }
            try {
                RenderBuffer buf = rq.getBuffer();
                rq.ensureCapacityAndAlignment(28, 4);
                buf.putInt(SWAP_BUFFERS);
                buf.putLong(pData);
                buf.putInt(x1);
                buf.putInt(y1);
                buf.putInt(x2);
                buf.putInt(y2);
                rq.flushNow();
            } finally {
                rq.unlock();
            }
        }
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

                // make sure the RenderQueue keeps a hard reference to the
                // destination (sysmem) SurfaceData to prevent it from being
                // disposed while the operation is processed on the QFT
                rq.addReference(dst);

                RenderBuffer buf = rq.getBuffer();
                D3DContext.setScratchSurface(((D3DSurfaceData)src).getContext());

                rq.ensureCapacityAndAlignment(48, 32);
                buf.putInt(SURFACE_TO_SW_BLIT);
                buf.putInt(sx).putInt(sy);
                buf.putInt(dx).putInt(dy);
                buf.putInt(w).putInt(h);
                buf.putInt(typeval);
                buf.putLong(src.getNativeOps());
                buf.putLong(dst.getNativeOps());

                // always flush immediately
                rq.flushNow();
            } finally {
                rq.unlock();
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

        public static void disposeGraphicsConfig(long pConfigInfo) {
            D3DRenderQueue rq = getInstance();
            rq.lock();
            try {

                RenderBuffer buf = rq.getBuffer();
                rq.ensureCapacityAndAlignment(12, 4);
                buf.putInt(DISPOSE_CONFIG);
                buf.putLong(pConfigInfo);

                // this call is expected to complete synchronously, so flush now
                rq.flushNow();
            } finally {
                rq.unlock();
    View Full Code Here

    Examples of sun.java2d.pipe.RenderBuffer

                currentContext = null;
            }

            // set the scratch context
            D3DRenderQueue rq = D3DRenderQueue.getInstance();
            RenderBuffer buf = rq.getBuffer();
            rq.ensureCapacity(8);
            buf.putInt(SET_SCRATCH_SURFACE);
            buf.putInt(d3dc.getDevice().getScreen());
        }
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.