本文整理汇总了Java中com.threed.jpct.FrameBuffer类的典型用法代码示例。如果您正苦于以下问题:Java FrameBuffer类的具体用法?Java FrameBuffer怎么用?Java FrameBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FrameBuffer类属于com.threed.jpct包,在下文中一共展示了FrameBuffer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JpctRasteriser
import com.threed.jpct.FrameBuffer; //导入依赖的package包/类
public JpctRasteriser(DisplayType displayType, final int displayWidth, final int displayHeight)
{
if (displayType == DisplayType.Window)
{
jframe = new JFrame("Hello world");
jframe.setSize(displayWidth, displayHeight);
jframe.setVisible(true);
jframe.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
jframe.addWindowListener(new WindowHandler());
}
else
{
throw new RuntimeException("Not implemented");
}
world = new com.threed.jpct.World();
world.setAmbientLight(255, 255, 255);
frameBuffer = new FrameBuffer(displayWidth, displayHeight, FrameBuffer.SAMPLINGMODE_NORMAL);
frameBuffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
}
开发者ID:tectonicus,项目名称:tectonicus,代码行数:22,代码来源:JpctRasteriser.java
示例2: loop
import com.threed.jpct.FrameBuffer; //导入依赖的package包/类
private void loop() throws Exception
{
frameBuffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
frameBuffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
while (jframe.isShowing())
{
if (box != null)
box.rotateY(0.01f);
frameBuffer.clear(java.awt.Color.green);
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.update();
frameBuffer.display(jframe.getGraphics());
Thread.sleep(10);
}
frameBuffer.disableRenderer(IRenderer.RENDERER_OPENGL);
frameBuffer.dispose();
jframe.dispose();
System.exit(0);
}
开发者ID:tectonicus,项目名称:tectonicus,代码行数:27,代码来源:JpctTest.java
示例3: onDrawFrame
import com.threed.jpct.FrameBuffer; //导入依赖的package包/类
@Override
public void onDrawFrame(GL10 gl) {
try{
if(texture!=null){
Log.i("FlagRenderer", "Texture to show: "+texture);
FlagManager.loadTexture(texture);
String oldTexture = flag.getUserObject()==null? null:((String)flag.getUserObject())+"";
flag.setTexture(texture);
flag.setUserObject(texture);
if(oldTexture!=null && TextureManager.getInstance().containsTexture(oldTexture))
TextureManager.getInstance().removeTexture(oldTexture);
texture = null;
}
framebuffer.clear();
if(prefs.getString(Settings.FLAG_MODE_SETTING, Settings.FLAG_MODE_FULLSCREEN).equals(Settings.FLAG_MODE_SKY)){
String background = null;
// if(prefs.getBoolean(Settings.DAY_TIME_SKY_BACKGROUND, true) && dayTimeUpdated)
// background = DayTimeAlarmManager.getAttualDayTimeString();
// else
background = prefs.getString(Settings.SKY_MODE_BACKGROUND_IMAGE, "sky_night");
FlagManager.loadTexture(background);
framebuffer.blit(TextureManager.getInstance().getTexture(background),
(BitmapUtils.getBestFittingScreenPow(width,height)-width)/2,
(BitmapUtils.getBestFittingScreenPow(width,height)-height)/2,
0,0,
width,height,FrameBuffer.OPAQUE_BLITTING);
}
world.renderScene(framebuffer);
Animator.EnableAnimations();
world.draw(framebuffer);
framebuffer.display();
}catch(OutOfMemoryError e){
// TextureManager.getInstance().removeAndUnload(Settings.SKY_USER_BACKGROUND, framebuffer);
prefs.edit().putString(Settings.SKY_MODE_BACKGROUND_IMAGE, "sky_night").commit();
System.gc();
}
}
开发者ID:danilox6,项目名称:flag3dlivewallpaperbase,代码行数:39,代码来源:FlagRenderer.java
示例4: setupEngine
import com.threed.jpct.FrameBuffer; //导入依赖的package包/类
/**
* Setup the engine. Create the world.
*/
private void setupEngine() {
fb = new FrameBuffer(1024, 768, FrameBuffer.SAMPLINGMODE_NORMAL);
fb.disableRenderer(IRenderer.RENDERER_SOFTWARE);
fb.enableRenderer(IRenderer.RENDERER_OPENGL);
world = new World();
}
开发者ID:andresjesse,项目名称:jpctblend,代码行数:11,代码来源:Gameplay.java
示例5: onSurfaceChanged
import com.threed.jpct.FrameBuffer; //导入依赖的package包/类
@Override
public void onSurfaceChanged(GL10 unused, int w, int h) {
super.onSurfaceChanged(unused, w, h);
mBuffer = new FrameBuffer(unused,w,h);
}
开发者ID:plattysoft,项目名称:ArToolKitJpctBaseLib,代码行数:6,代码来源:ArJcptRenderer.java
注:本文中的com.threed.jpct.FrameBuffer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论