當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。