本文整理了Java中com.jme3.renderer.Renderer.postFrame
方法的一些代码示例,展示了Renderer.postFrame
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Renderer.postFrame
方法的具体详情如下:
包路径:com.jme3.renderer.Renderer
类名称:Renderer
方法名:postFrame
[英]Called when a new frame has been rendered. Currently, this will simply delete any OpenGL objects from the GPU which have been garbage collected by the GC.
[中]在渲染新帧时调用。目前,这将简单地从GPU中删除任何被GC垃圾收集的OpenGL对象。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
protected void runLoop(){
if (!created.get()) {
throw new IllegalStateException();
}
listener.update();
checkGLError();
renderer.postFrame();
int frameRate = settings.getFrameRate();
if (frameRate >= 1) {
//FIXME
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void display(GLAutoDrawable glad) {
if (!created.get() && renderer != null){
listener.destroy();
logger.fine("Canvas destroyed.");
super.internalDestroy();
return;
}
int newWidth = Math.max(canvas.getWidth(), 1);
int newHeight = Math.max(canvas.getHeight(), 1);
if (width != newWidth || height != newHeight) {
width = newWidth;
height = newHeight;
if (listener != null) {
listener.reshape(width, height);
}
}
boolean flush = autoFlush.get();
if (flush && !wasAnimating){
animator.start();
wasAnimating = true;
}else if (!flush && wasAnimating){
animator.stop();
wasAnimating = false;
}
listener.update();
renderer.postFrame();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void display(GLAutoDrawable glad) {
if (!created.get() && renderer != null){
listener.destroy();
logger.fine("Canvas destroyed.");
super.internalDestroy();
return;
}
int newWidth = Math.max(canvas.getWidth(), 1);
int newHeight = Math.max(canvas.getHeight(), 1);
if (width != newWidth || height != newHeight) {
width = newWidth;
height = newHeight;
if (listener != null) {
listener.reshape(width, height);
}
}
boolean flush = autoFlush.get();
if (flush && !wasAnimating){
animator.start();
wasAnimating = true;
}else if (!flush && wasAnimating){
animator.stop();
wasAnimating = false;
}
listener.update();
renderer.postFrame();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
renderer.postFrame();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
renderer.postFrame();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
renderer.postFrame();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
renderer.postFrame();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
renderer.postFrame();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
protected void runLoop(){
if (!created.get()) {
throw new IllegalStateException();
}
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
try {
pbuffer = new Pbuffer(width, height, pixelFormat, null);
pbuffer.makeCurrent();
// Context MUST be reset here to avoid invalid objects!
renderer.invalidateState();
} catch (LWJGLException ex) {
listener.handleError("Failed to restore pbuffer content", ex);
}
}
listener.update();
assert checkGLError();
renderer.postFrame();
// Need to flush GL commands
// to see any result on the pbuffer's front buffer.
GL11.glFlush();
int frameRate = settings.getFrameRate();
if (frameRate >= 1) {
Display.sync(frameRate);
}
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
protected void runLoop(){
if (!created.get()) {
throw new IllegalStateException();
}
listener.update();
checkGLError();
renderer.postFrame();
int frameRate = settings.getFrameRate();
if (frameRate >= 1) {
//FIXME
}
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
@Override
public void display(GLAutoDrawable glad) {
if (!created.get() && renderer != null){
listener.destroy();
logger.fine("Canvas destroyed.");
super.internalDestroy();
return;
}
int newWidth = Math.max(canvas.getWidth(), 1);
int newHeight = Math.max(canvas.getHeight(), 1);
if (width != newWidth || height != newHeight) {
width = newWidth;
height = newHeight;
if (listener != null) {
listener.reshape(width, height);
}
}
boolean flush = autoFlush.get();
if (flush && !wasAnimating){
animator.start();
wasAnimating = true;
}else if (!flush && wasAnimating){
animator.stop();
wasAnimating = false;
}
listener.update();
renderer.postFrame();
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
@Override
public void display(GLAutoDrawable glad) {
if (!created.get() && renderer != null){
listener.destroy();
logger.fine("Canvas destroyed.");
super.internalDestroy();
return;
}
int newWidth = Math.max(canvas.getWidth(), 1);
int newHeight = Math.max(canvas.getHeight(), 1);
if (width != newWidth || height != newHeight) {
width = newWidth;
height = newHeight;
if (listener != null) {
listener.reshape(width, height);
}
}
boolean flush = autoFlush.get();
if (flush && !wasAnimating){
animator.start();
wasAnimating = true;
}else if (!flush && wasAnimating){
animator.stop();
wasAnimating = false;
}
listener.update();
renderer.postFrame();
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
renderer.postFrame();
代码示例来源:origin: org.jmonkeyengine/jme3-lwjgl3
renderer.postFrame();
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
renderer.postFrame();
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
renderer.postFrame();
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
protected void runLoop(){
if (!created.get()) {
throw new IllegalStateException();
}
if (pbuffer.isBufferLost()) {
pbuffer.destroy();
try {
pbuffer = new Pbuffer(width, height, pixelFormat, null);
pbuffer.makeCurrent();
// Context MUST be reset here to avoid invalid objects!
renderer.invalidateState();
} catch (LWJGLException ex) {
listener.handleError("Failed to restore pbuffer content", ex);
}
}
listener.update();
checkGLError();
renderer.postFrame();
// Need to flush GL commands
// to see any result on the pbuffer's front buffer.
GL11.glFlush();
int frameRate = settings.getFrameRate();
if (frameRate >= 1) {
Display.sync(frameRate);
}
}
内容来源于网络,如有侵权,请联系作者删除!