This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogic.gdx.tests.g3d; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.InputMultiplexer; | |
import com.badlogic.gdx.assets.AssetManager; | |
import com.badlogic.gdx.graphics.Camera; | |
import com.badlogic.gdx.graphics.GL10; | |
import com.badlogic.gdx.graphics.PerspectiveCamera; | |
import com.badlogic.gdx.graphics.g3d.Model; | |
import com.badlogic.gdx.graphics.g3d.ModelBatch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Grid<T extends Grid.GridCell> { | |
public interface GridCell { | |
int getX(); | |
int getY(); | |
void setLocation(int x, int y); | |
} | |
public interface CellProvider<T extends GridCell> { | |
T obtainCell(); | |
void releaseCell(T b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attribute vec3 a_position; | |
uniform mat4 u_projViewTrans; | |
attribute vec3 a_normal; | |
uniform mat3 u_normalMatrix; | |
varying vec3 v_normal; | |
uniform mat4 u_worldTrans; | |
const float u_shininess = 20.0; | |
varying vec3 v_lightDiffuse; | |
uniform vec3 u_ambientCubemap[6]; | |
varying vec3 v_lightSpecular; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogic.gdx.tests.g3d; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.assets.AssetManager; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL10; | |
import com.badlogic.gdx.graphics.PerspectiveCamera; | |
import com.badlogic.gdx.graphics.Texture; | |
import com.badlogic.gdx.graphics.VertexAttributes.Usage; | |
import com.badlogic.gdx.graphics.g3d.Environment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogic.gdx.tests.g3d; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.Camera; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL10; | |
import com.badlogic.gdx.graphics.Mesh; | |
import com.badlogic.gdx.graphics.Texture; | |
import com.badlogic.gdx.graphics.VertexAttribute; | |
import com.badlogic.gdx.graphics.VertexAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomTextureTest extends GdxTest { | |
public static class BgTextureUnitAttribute extends IntAttribute{ | |
public static final String Alias = "bgTtextureUnit"; | |
public final static long Type = register(Alias); | |
public BgTextureUnitAttribute(long type, int textureNum) { | |
super(type, textureNum); | |
} | |
} | |
public static class BgTextureShader extends DefaultShader { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
#define LOWP lowp | |
#define MED mediump | |
#define HIGH highp | |
precision mediump float; | |
#else | |
#define MED | |
#define LOWP | |
#define HIGH | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogic.gdx.graphics.g3d.utils; | |
import java.nio.Buffer; | |
import java.nio.ByteBuffer; | |
import java.nio.FloatBuffer; | |
import java.nio.ShortBuffer; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.Mesh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogic.gdx.tests.g3d; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.Input.Keys; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.g3d.Model; | |
import com.badlogic.gdx.graphics.g3d.ModelBatch; | |
import com.badlogic.gdx.graphics.g3d.ModelInstance; | |
import com.badlogic.gdx.graphics.g3d.attributes.BlendingAttribute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
#define LOWP lowp | |
precision mediump float; | |
#else | |
#define LOWP | |
#endif | |
const float offset = 1.0 / 128.0; | |
varying vec2 v_texCoords; | |
uniform sampler2D u_texture; |
OlderNewer