热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

javax.media.opengl.GL.glFlush()方法的使用及代码示例

本文整理了Java中javax.media.opengl.GL.glFlush()方法的一些代码示例,展示了GL.glFlush()的具体用法

本文整理了Java中javax.media.opengl.GL.glFlush()方法的一些代码示例,展示了GL.glFlush()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GL.glFlush()方法的具体详情如下:
包路径:javax.media.opengl.GL
类名称:GL
方法名:glFlush

GL.glFlush介绍

[英]Entry point to C language function: void glFlush(void)
Part of GL_ES_VERSION_2_0, GL_VERSION_ES_CL_CM, GL_VERSION_1_0
[中]C语言函数的入口点:void glFlush(void)
GL_ES_VERSION_2_0GL_VERSION_ES_CL_CMGL_VERSION_1_0的一部分

代码示例

代码示例来源:origin: jbox2d/jbox2d

@Override
public void display(GLAutoDrawable arg0) {
getGL().getGL2().glClear(GL2.GL_COLOR_BUFFER_BIT);
controller.updateTest();
getGL().glFlush();
}

代码示例来源:origin: com.ardor3d/ardor3d-jogl

public void flushGraphics() {
final GL gl = GLContext.getCurrentGL();
gl.glFlush();
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

@Override
public boolean release(final long ctx) {
try {
if( hasRendererQuirk(GLRendererQuirks.GLFlushBeforeRelease) && null != MacOSXCGLContext.this.getGLProcAddressTable() ) {
gl.glFlush();
}
} catch (final GLException gle) {
if(DEBUG) {
System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFlush() caught exception:");
gle.printStackTrace();
}
}
final int err = CGL.CGLSetCurrentContext(0);
if(DEBUG && CGL.kCGLNoError != err) {
System.err.println("CGL: Could not release current context: err 0x"+Integer.toHexString(err)+": "+this);
}
final int err2 = CGL.CGLUnlockContext(ctx);
if(DEBUG && CGL.kCGLNoError != err2) {
System.err.println("CGL: Could not unlock context: err 0x"+Integer.toHexString(err2)+": "+this);
}
return CGL.kCGLNoError == err && CGL.kCGLNoError == err2;
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

@Override
public boolean release(final long ctx) {
try {
if( hasRendererQuirk(GLRendererQuirks.GLFlushBeforeRelease) && null != MacOSXCGLContext.this.getGLProcAddressTable() ) {
gl.glFlush();
}
} catch (final GLException gle) {
if(DEBUG) {
System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFlush() caught exception:");
gle.printStackTrace();
}
}
final boolean res = CGL.clearCurrentContext(ctx);
final long cglCtx = CGL.getCGLContext(ctx);
if(0 == cglCtx) {
throw new InternalError("Null CGLContext for: "+this);
}
final int err = CGL.CGLUnlockContext(cglCtx);
if(DEBUG && CGL.kCGLNoError != err) {
System.err.println("CGL: Could not unlock context: err 0x"+Integer.toHexString(err)+": "+this);
}
return res && CGL.kCGLNoError == err;
}

代码示例来源:origin: com.ardor3d/ardor3d-jogl

public void flushFrame(final boolean doSwap) {
final GL gl = GLContext.getCurrentGL();
renderBuckets();
gl.glFlush();
if (doSwap) {
doApplyState(defaultStateList.get(RenderState.StateType.ColorMask));
if (Constants.stats) {
StatCollector.startStat(StatType.STAT_DISPLAYSWAP_TIMER);
}
checkCardError();
GLContext.getCurrent().getGLDrawable().swapBuffers();
if (Constants.stats) {
StatCollector.endStat(StatType.STAT_DISPLAYSWAP_TIMER);
}
}
if (Constants.stats) {
StatCollector.addStat(StatType.STAT_FRAMES, 1);
}
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

gl.glFlush();
gl.glFlush();
tileBuffer.position( readPixelSize );
tileBuffer.flip();
gl.glFlush();
imageBuffer.position( ibLim );
imageBuffer.flip();

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

gl.glFlush();
gl.glFlush();
tileBuffer.position( readPixelSize );
tileBuffer.flip();
gl.glFlush();
imageBuffer.position( ibLim );
imageBuffer.flip();

代码示例来源:origin: deegree/deegree3

gl.glFlush();

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

@Override
public final void swapBuffers() throws GLException {
if( !realized ) { // volatile OK (locked below)
return; // destroyed already
}
final int lockRes = lockSurface(); // it's recursive, so it's ok within [makeCurrent .. release]
if (NativeSurface.LOCK_SURFACE_NOT_READY == lockRes) {
return;
}
try {
if( realized ) { // volatile OK
final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)surface.getGraphicsConfiguration().getChosenCapabilities();
if ( caps.getDoubleBuffered() ) {
if(!surface.surfaceSwap()) {
swapBuffersImpl(true);
}
} else {
final GLContext ctx = GLContext.getCurrent();
if(null!=ctx && ctx.getGLDrawable()==this) {
ctx.getGL().glFlush();
}
swapBuffersImpl(false);
}
}
} finally {
unlockSurface();
}
surface.surfaceUpdated(this, surface, System.currentTimeMillis());
}

推荐阅读
author-avatar
渊博的大盗zhang_618
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有