当前位置: 首页>>代码示例>>Java>>正文


Java Gdx.gl20方法代码示例

本文整理汇总了Java中com.badlogic.gdx.Gdx.gl20方法的典型用法代码示例。如果您正苦于以下问题:Java Gdx.gl20方法的具体用法?Java Gdx.gl20怎么用?Java Gdx.gl20使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.Gdx的用法示例。


在下文中一共展示了Gdx.gl20方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
@BeforeClass
public static void init() {
    // Note that we don't need to implement any of the listener's methods
    application = new HeadlessApplication(new ApplicationListener() {
        @Override public void create() {}
        @Override public void resize(int width, int height) {}
        @Override public void render() {}
        @Override public void pause() {}
        @Override public void resume() {}
        @Override public void dispose() {}
    });

    // Use Mockito to mock the OpenGL methods since we are running headlessly
    Gdx.gl20 = Mockito.mock(GL20.class);
    Gdx.gl = Gdx.gl20;
}
 
开发者ID:AndreFCruz,项目名称:feup-lpoo-armadillo,代码行数:17,代码来源:GameTest.java

示例2: render

import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
public void render(float deltaTime){
    if (elapsed >= fadeTime)
        return;

    if (delay > 0){
        delay -= deltaTime;
    }

    GL20 gl = Gdx.gl20;
    gl.glEnable(GL20.GL_BLEND);
    gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

    color.a = delay > 0 ? 1f : 1f - Interpolation.fade.apply( elapsed / fadeTime);

    if (shader==null)
        createShader();
    shader.begin();
    shader.setUniformf(u_color, color);
    mesh.render(shader, GL20.GL_TRIANGLE_FAN);

    shader.end();

    if (delay <= 0)
        elapsed += deltaTime;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:26,代码来源:FullScreenFader.java

示例3: main

import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
public static void main(String[] args)
  {
SpringApplication.run(HeadlessServerLauncher.class, args);
  	
  	ServerSettings.isHeadless = true;
  	LwjglNativesLoader.load();
Gdx.files = new LwjglFiles();
HeadlessNativesLoader.load();
MockGraphics mockGraphics = new MockGraphics();
Gdx.graphics = mockGraphics;
HeadlessNet headlessNet = new HeadlessNet();
Gdx.net = headlessNet;
Gdx.gl = new NullGL20();
Gdx.gl20 = new NullGL20();
Gdx.gl30 = new NullGL30();
HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration();
new HeadlessApplication(new GameServer(), config);
  }
 
开发者ID:MMORPG-Prototype,项目名称:MMORPG_Prototype,代码行数:19,代码来源:HeadlessServerLauncher.java

示例4: init

import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
@BeforeClass
public static void init() {
    // Note that we don't need to implement any of the listener's methods
    Gdx.app = new HeadlessApplication(new ApplicationListener() {
        @Override
        public void create() {
        }

        @Override
        public void resize(int width, int height) {
        }

        @Override
        public void render() {
        }

        @Override
        public void pause() {
        }

        @Override
        public void resume() {
        }

        @Override
        public void dispose() {
        }
    });

    // Use Mockito to mock the OpenGL methods since we are running headlessly
    Gdx.gl20 = Mockito.mock(GL20.class);
    Gdx.gl = Gdx.gl20;
}
 
开发者ID:MrStahlfelge,项目名称:gdx-controllerutils,代码行数:34,代码来源:ControllerMappingsTest.java


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