• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RenderBuffer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中sun.java2d.pipe.RenderBuffer的典型用法代码示例。如果您正苦于以下问题:Java RenderBuffer类的具体用法?Java RenderBuffer怎么用?Java RenderBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RenderBuffer类属于sun.java2d.pipe包,在下文中一共展示了RenderBuffer类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: flush

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
public void flush() {
    invalidate();
    OGLRenderQueue rq = OGLRenderQueue.getInstance();
    rq.lock();
    try {
        // make sure we have a current context before
        // disposing the native resources (e.g. texture object)
        OGLContext.setScratchSurface(graphicsConfig);

        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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:OGLSurfaceData.java


示例2: dispose

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Disposes the native resources associated with the given OGLSurfaceData
 * (referenced by the pData parameter).  This method is invoked from
 * the native Dispose() method from the Disposer thread when the
 * Java-level OGLSurfaceData object is about to go away.  Note that we
 * also pass a reference to the native GLX/WGLGraphicsConfigInfo
 * (pConfigInfo) for the purposes of making a context current.
 */
static void dispose(long pData, long pConfigInfo) {
    OGLRenderQueue rq = OGLRenderQueue.getInstance();
    rq.lock();
    try {
        // make sure we have a current context before
        // disposing the native resources (e.g. texture object)
        OGLContext.setScratchSurface(pConfigInfo);

        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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:OGLSurfaceData.java


示例3: enqueueBlit

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Enqueues a BLIT operation with the given parameters.  Note that the
 * RenderQueue lock must be held before calling this method.
 */
private static void enqueueBlit(RenderQueue rq,
                                SurfaceData src, SurfaceData dst,
                                int packedParams,
                                int sx1, int sy1,
                                int sx2, int sy2,
                                double dx1, double dy1,
                                double dx2, double dy2)
{
    // assert rq.lock.isHeldByCurrentThread();
    RenderBuffer buf = rq.getBuffer();
    rq.ensureCapacityAndAlignment(72, 24);
    buf.putInt(BLIT);
    buf.putInt(packedParams);
    buf.putInt(sx1).putInt(sy1);
    buf.putInt(sx2).putInt(sy2);
    buf.putDouble(dx1).putDouble(dy1);
    buf.putDouble(dx2).putDouble(dy2);
    buf.putLong(src.getNativeOps());
    buf.putLong(dst.getNativeOps());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:OGLBlitLoops.java


示例4: disposeGraphicsConfig

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Disposes the native memory associated with the given native
 * graphics config info pointer on the single queue flushing thread.
 */
public static void disposeGraphicsConfig(long pConfigInfo) {
    OGLRenderQueue rq = getInstance();
    rq.lock();
    try {
        // make sure we make the context associated with the given
        // GraphicsConfig current before disposing the native resources
        OGLContext.setScratchSurface(pConfigInfo);

        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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:OGLRenderQueue.java


示例5: flush

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
@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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:D3DSurfaceData.java


示例6: dispose

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Disposes the native resources associated with the given D3DSurfaceData
 * (referenced by the pData parameter).  This method is invoked from
 * the native Dispose() method from the Disposer thread when the
 * Java-level D3DSurfaceData object is about to go away.
 */
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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:D3DSurfaceData.java


示例7: disposeGraphicsConfig

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Disposes the native memory associated with the given native
 * graphics config info pointer on the single queue flushing thread.
 */
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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:D3DRenderQueue.java


示例8: setScratchSurface

import sun.java2d.pipe.RenderBuffer; //导入依赖的package包/类
/**
 * Sets the current context on the native level to be the one passed as
 * the argument.
 * If the context is not the same as the defaultContext the latter
 * will be reset to null.
 *
 * This call is needed when copying from a SW surface to a Texture
 * (the upload test) or copying from d3d to SW surface to make sure we
 * have the correct current context.
 *
 * @param d3dc the context to be made current on the native level
 */
static void setScratchSurface(D3DContext d3dc) {
    // assert D3DRenderQueue.getInstance().lock.isHeldByCurrentThread();

    // invalidate the current context
    if (d3dc != currentContext) {
        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());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:D3DContext.java



注:本文中的sun.java2d.pipe.RenderBuffer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FilterIterator类代码示例发布时间:2022-05-21
下一篇:
Java XMLLanguageDriver类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap