private void pauseGame() {
if (paused)
return;
paused = true;
final Window.WindowStyle pauseWindowStyle = new Window.WindowStyle();
pauseWindowStyle.titleFont = game.getFonts().get("moonhouse64");
pauseWindowStyle.background = new TextureRegionDrawable(new TextureRegion(background));
pauseWindow = new PauseWindow(pauseWindowStyle, game.getFonts().get("moonhouse64"), new Runnable() {
@Override
public void run() {
unpauseGame();
}
}, new Runnable() {
@Override
public void run() {
save();
}
}, game, uiAssets, button);
pauseWindow.setBounds(viewport.getWorldWidth() / 2 - viewport.getWorldWidth() / 3, viewport.getWorldHeight() / 2 - viewport.getWorldHeight() / 3, viewport.getWorldWidth() / 3 * 2, viewport.getWorldHeight() / 3 * 2);
stage.addActor(pauseWindow);
}
java类com.badlogic.gdx.graphics.g2d.TextureRegion的实例源码
GameScreen.java 文件源码
项目:Tower-Defense-Galaxy
阅读 25
收藏 0
点赞 0
评论 0
ScreenSetting.java 文件源码
项目:enklave
阅读 22
收藏 0
点赞 0
评论 0
private void addChangeFaction(){
groupChangeFaction = new Group();
Image background = new Image(new TextureRegion(manager.getAssetsSettings().getTexture(NameFiles.extensionImgBackground)));
background.setSize(Width - Width * 0.03f, Height * 0.1f);
background.setPosition(Width / 2 - background.getWidth() / 2, Height * 0.3f);
groupChangeFaction.addActor(background);
Label labelFac = new Label("Change Faction",new Label.LabelStyle(Font.getFont((int)(Height*0.025f)),Color.WHITE));
labelFac.setPosition(background.getX()+background.getWidth()*0.05f,background.getY()+background.getHeight()/2-labelFac.getHeight()/2);
labelFac.addListener(new ClickListener(){
@Override
public void clicked(InputEvent event, float x, float y) {
manager.loadAssetsChoiceFaction();
gameManager.setScreen(new ScreenCircleLoading(gameManager,new ScreenChoiceFaction(gameManager),manager.getAssetsChoiceFaction()));
}
});
groupChangeFaction.addActor(labelFac);
}
GameObjectHighlightGraphic.java 文件源码
项目:MMORPG_Prototype
阅读 36
收藏 0
点赞 0
评论 0
private Texture createHighlightingGraphic(TextureRegion textureRegion)
{
TextureData textureData = textureRegion.getTexture().getTextureData();
textureData.prepare();
Pixmap sourcePixmap = textureData.consumePixmap();
Pixmap destinationPixmap = new Pixmap(textureRegion.getRegionWidth(), textureRegion.getRegionHeight(), Format.RGBA8888);
Color color = new Color();
for (int x = 0; x < textureRegion.getRegionWidth(); x++)
{
for (int y = 0; y < textureRegion.getRegionHeight(); y++)
{
int colorInt = sourcePixmap.getPixel(textureRegion.getRegionX() + x, textureRegion.getRegionY() + y);
Color.rgba8888ToColor(color, colorInt);
destinationPixmap.setColor(1.0f, 1f, 1.0f, 1);
if (color.a > 0.004f)
destinationPixmap.drawPixel(x, y);
}
}
Texture result = new Texture(destinationPixmap);
textureData.disposePixmap();
destinationPixmap.dispose();
return result;
}
TileTouchCheck.java 文件源码
项目:miniventure
阅读 28
收藏 0
点赞 0
评论 0
private TileTouchCheck(Pixmap pixelMap, TextureRegion region) {
this.width = region.getRegionWidth();
this.height = region.getRegionHeight();
map = new int[width * height];
int i = -1;
// pixmap coordinates have the origin in the top left corner; shift it so it goes from the bottom left instead
for (int x = 0; x < width; x++) {
for (int y = height-1; y >= 0; y--) {
Color color = new Color(pixelMap.getPixel(region.getRegionX() + x, region.getRegionY() + y));
i++;
if(color.a == 0) continue; // set to zero, tile doesn't matter
if(color.equals(Color.WHITE)) // the tile must be different from the center tile
map[i] = WHITE;
else if(color.equals(Color.BLACK)) // the tile must be equal to the center tile
map[i] = BLACK;
}
}
}
BackgroundFragment.java 文件源码
项目:Mindustry
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void build() {
Core.scene.table().addRect((a, b, w, h) -> {
Draw.color();
TextureRegion back = Draw.region("background");
float backscl = Unit.dp.scl(5f);
Draw.alpha(0.7f);
Core.batch.draw(back, w/2 - back.getRegionWidth()*backscl/2 +240f, h/2 - back.getRegionHeight()*backscl/2 + 250f,
back.getRegionWidth()*backscl, back.getRegionHeight()*backscl);
float logoscl = (int)Unit.dp.scl(7);
TextureRegion logo = Core.skin.getRegion("logotext");
float logow = logo.getRegionWidth()*logoscl;
float logoh = logo.getRegionHeight()*logoscl;
Draw.color();
Core.batch.draw(logo, w/2 - logow/2, h - logoh + 15, logow, logoh);
}).visible(() -> GameState.is(State.menu)).grow();
}
AmbientOcclusion.java 文件源码
项目:Cubes_2
阅读 23
收藏 0
点赞 0
评论 0
private static TextureRegion y(Area area, int x_y, int y_y, int z_y) {
int i = 0;
if (exists(area, x_y + 1, y_y, z_y - 1))
i |= A;
if (exists(area, x_y + 1, y_y, z_y))
i |= B;
if (exists(area, x_y + 1, y_y, z_y + 1))
i |= C;
if (exists(area, x_y, y_y, z_y - 1))
i |= D;
if (exists(area, x_y, y_y, z_y + 1))
i |= E;
y_1(area, x_y, y_y, z_y, i);
return loadedRegions[i];
}
VRCamera.java 文件源码
项目:Tower-Defense-Galaxy
阅读 24
收藏 0
点赞 0
评论 0
public VRCamera(int width, int height, int viewportWidth, int viewportHeight) {
leftCamera = new PerspectiveCamera(90, viewportWidth, viewportHeight);
rightCamera = new PerspectiveCamera(90, viewportWidth, viewportHeight);
leftBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, width, height, true);
rightBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, width, height, true);
leftTexture = new TextureRegion();
rightTexture = new TextureRegion();
batch = new SpriteBatch();
this.width = width;
this.height = height;
this.viewportWidth = viewportWidth;
this.viewportHeight = viewportHeight;
tmpVector3 = new Vector3();
position = new Vector3(250, 20, 250);
positionLeft = new Vector3(249.5f, 20, 250);
positionRight = new Vector3(250.5f, 20, 250);
direction = new Vector3();
up = new Vector3(0, 1, 0);
eyeDistance = 0.5f;
}
DrawTextureRegionComponent.java 文件源码
项目:SpaceChaos
阅读 25
收藏 0
点赞 0
评论 0
public void setTextureRegion(TextureRegion textureRegion, boolean setNewDimension) {
TextureRegion oldTextureRegion = this.textureRegion;
this.textureRegion = textureRegion;
if (oldTextureRegion == this.textureRegion) {
// we dont need to notify listeners
return;
}
if (setNewDimension) {
// set new width and height
this.positionComponent.setDimension(textureRegion.getRegionWidth(), textureRegion.getRegionHeight());
}
this.textureRegionChangedListenerList.stream().forEach(listener -> {
// check if dev mode is enabled
/*
* if (DevMode.isEnabled()) { //log listener
* System.out.println("DrawTextureRegionComponent call listener: " +
* listener.getClass().getName()); }
*/
listener.onTextureRegionChanged(oldTextureRegion, this.textureRegion);
});
}
DrawableMap.java 文件源码
项目:Climatar
阅读 31
收藏 0
点赞 0
评论 0
public void draw(Coordinates<Integer> coords, Pixmap map) {
int terrainID = world.get(coords.y).get(coords.x);
// tileID runs 0 through 8, conveniently in the
// same order as our split tiles texture...
int ty = (int) terrainID / 3;
int tx = terrainID % 3;
TextureRegion tileRegion = tileRegions[ty][tx];
map.drawPixmap(tilesPixmap,
coords.x * tileSize,
coords.y * tileSize,
tileRegion.getRegionX(),
tileRegion.getRegionY(),
tileRegion.getRegionWidth(),
tileRegion.getRegionHeight());
}
Balanceball.java 文件源码
项目:fluffybalance
阅读 26
收藏 0
点赞 0
评论 0
private void initBall() {
float radius = 26;
mBall = new Circle(0.f, 0.f, radius);
mBallTextureRegion = new TextureRegion(new Texture(Gdx.files.internal("ball.png")));
// create physics body
BodyDef bodyDef = new BodyDef();
bodyDef.type = BodyDef.BodyType.DynamicBody;
bodyDef.position.set(mBall.x, mBall.y);
CircleShape ballShape = new CircleShape();
ballShape.setRadius(mBall.radius - 2.f);
mBallBody = mWorld.createBody(bodyDef);
mBallBody.setUserData(new BodyUserDate(BODY_USER_DATA_TYPE_BALL));
Fixture fixture = mBallBody.createFixture(ballShape, 0.5f);
fixture.setFriction(BALL_FRICTION_BASE);
fixture.setRestitution(0.4f);
ballShape.dispose();
}
RenderSystem.java 文件源码
项目:penguins-in-space
阅读 21
收藏 0
点赞 0
评论 0
@Override
protected void processEntity(Entity entity, float deltaTime) {
TransformComponent transform = transformMapper.get(entity);
DrawableComponent drawable = drawableMapper.get(entity);
TextureRegion region = drawable.texture;
float width = region.getRegionWidth();
float height = region.getRegionHeight();
float originX = width * 0.5f;
float originY = height * 0.5f;
float x = transform.position.x - originX;
float y = transform.position.y - originY;
if (debug) drawBounds(entity);
batch.draw(drawable.texture, x, y, originX, originY, width, height, transform.scale.x, transform.scale.y, transform.rotation.angle());
PlayerClass playerClass = playerMapper.get(entity);
if (playerClass != null && !playerClass.isSelf) {
font.draw(batch, playerClass.displayName, x, y, width, -1, true);
}
}
ScreenRaider.java 文件源码
项目:enklave
阅读 26
收藏 0
点赞 0
评论 0
private void addBackground(){
decalBackground = Decal.newDecal(new TextureRegion(managerAssets.getAssetsCrafting().getTexture(NameFiles.backgroundCrafting)));
decalBackground.setDimensions(100,200);
decalBackground.setPosition(0,0,0);
environment = new Environment();
// environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 1f, 1f, 1f, 1f));
environment.set(new ColorAttribute(ColorAttribute.Diffuse));
environment.set(new ColorAttribute(ColorAttribute.Specular));
environment.set(new ColorAttribute(ColorAttribute.Reflection));
environment.add(new DirectionalLight().set(0.51f, 0.5f, 0.5f, 0f, -2f, -30f));
Model model = managerAssets.getAssetsRaider().getModel(NameFiles.raiderFull);
model.nodes.get(2).translation.set(-12,28.6f,-5.5f);
// model.nodes.get(0).translation.set(0,28f,29.2f);
// model.nodes.get(2).translation.set(0,13,-1);
instance = new ModelInstance(model);
instance.transform.trn(0,-20,25).rotate(0,1,0,-25);
instance.transform.scale(1.5f,1.5f,1.5f);
}
ScreenSetting.java 文件源码
项目:enklave
阅读 35
收藏 0
点赞 0
评论 0
private void addTestCombat(){
groupTestCombat = new Group();
Image background = new Image(new TextureRegion(manager.getAssetsSettings().getTexture(NameFiles.extensionImgBackground)));
background.setSize(Width - Width * 0.03f, Height * 0.1f);
background.setPosition(Width / 2 - background.getWidth() / 2, Height * 0.15f);
groupChangeFaction.addActor(background);
Label labelFac = new Label("Combat Training",new Label.LabelStyle(Font.getFont((int)(Height*0.025f)),Color.WHITE));
labelFac.setPosition(background.getX()+background.getWidth()*0.05f,background.getY()+background.getHeight()/2-labelFac.getHeight()/2);
labelFac.addListener(new ClickListener(){
@Override
public void clicked(InputEvent event, float x, float y) {
manager.loadAssetsEnklaveScreen();
new GetEnklaveDetails().makeRequest(16066, manager);
gameManager.screenEnklave.setEnklave3D(new Vector2(0,0));
gameManager.setScreen(new ScreenCircleLoading(gameManager,gameManager.screenEnklave,manager.getAssertEnklaveScreen()));;
}
});
groupChangeFaction.addActor(labelFac);
}
ObjectiveDialog.java 文件源码
项目:Hexpert
阅读 31
收藏 0
点赞 0
评论 0
public void setObjectives(Objective[] objectives, boolean[] objectiveStatus)
{
this.objectives = objectives;
this.objectiveStatus = objectiveStatus;
if(objectives.length != objectiveStatus.length)
throw new IllegalArgumentException();
getContentTable().clearChildren();
getBackground().setMinHeight(200 + 100 * objectives.length);
getContentTable().setDebug(false);
for(int i = 0; i < objectives.length; i++)
{
ImageButton imgCheck = new ImageButton(new TextureRegionDrawable(
new TextureRegion((Texture)
hexpert.assetManager.get(objectiveStatus[i] ? TEXTURE_CORRECT : TEXTURE_BAD
))));
Label labelObjective = new Label(objectives[i].toString(hexpert.i18NBundle), getSkin());
getContentTable().add(imgCheck).width(100).height(80);
imgCheck.getImageCell().expand().fill();
getContentTable().add(labelObjective);
getContentTable().row();
}
}
CharacterSheet.java 文件源码
项目:project-divine-intervention
阅读 29
收藏 0
点赞 0
评论 0
public CharacterSheet(TextureRegion[] idle, TextureRegion[] forward, TextureRegion[] backward, TextureRegion[] attack, TextureRegion[] in, TextureRegion[] out) {
this.idle = idle;
this.forward = forward;
this.backward = backward;
this.attack = attack;
this.in = in;
this.out = out;
}
Sprite.java 文件源码
项目:cocos2d-java
阅读 28
收藏 0
点赞 0
评论 0
/**set a new textureRegion to the Sprite
* @param reset true 会重置尺寸/中心点数据 */
public void setSpriteFrame(TextureRegion newFrame, boolean reset) {
_sprite.setRegion(newFrame);
if(reset) {
super.setAnchorPoint(0.5f, 0.5f);
super.setContentSize(newFrame.getRegionWidth(), newFrame.getRegionHeight());
SET_DIRTY_RECURSIVELY();
}
}
PhaseItem.java 文件源码
项目:savethebunny
阅读 24
收藏 0
点赞 0
评论 0
public PhaseItem(TextureRegion textureRegion, int phaseNum, String title, String subtitle, float positionX, float positionY) {
super(textureRegion);
this.phaseNum = phaseNum;
this.position.x = positionX;
this.position.y = positionY;
this.title = title;
this.subtitle = subtitle;
this.titleX = this.position.x + (this.dimension.x / 2) - (title.length() * 10);
this.titleY = this.position.y + this.dimension.y - 10;
this.subtitleX = this.position.x + (this.dimension.x / 2) - (subtitle.length() * 10);
this.subtitleY = this.position.y + 50;
}
CompliantBatch.java 文件源码
项目:gdx-cclibs
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void draw (TextureRegion region, float width, float height, Affine2 transform) {
float[] vertices = tempVertices;
vertices[U1] = region.getU();
vertices[V1] = region.getV2();
vertices[U2] = region.getU();
vertices[V2] = region.getV();
vertices[U3] = region.getU2();
vertices[V3] = region.getV();
vertices[U4] = region.getU2();
vertices[V4] = region.getV2();
float color = this.color;
vertices[C1] = color;
vertices[C2] = color;
vertices[C3] = color;
vertices[C4] = color;
// construct corner points
vertices[X1] = transform.m02;
vertices[Y1] = transform.m12;
vertices[X2] = transform.m01 * height + transform.m02;
vertices[Y2] = transform.m11 * height + transform.m12;
vertices[X3] = transform.m00 * width + transform.m01 * height + transform.m02;
vertices[Y3] = transform.m10 * width + transform.m11 * height + transform.m12;
vertices[X4] = transform.m00 * width + transform.m02;
vertices[Y4] = transform.m10 * width + transform.m12;
draw(region.getTexture(), vertices, 0, 20);
}
Sorter.java 文件源码
项目:Mindustry
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void buildTable(Tile tile, Table table){
SorterEntity entity = tile.entity();
Array<Item> items = Item.getAllItems();
ButtonGroup<ImageButton> group = new ButtonGroup<>();
Table cont = new Table();
cont.margin(4);
cont.marginBottom(5);
cont.add().colspan(4).height(105f);
cont.row();
for(int i = 0; i < items.size; i ++){
final int f = i;
ImageButton button = cont.addImageButton("white", "toggle", 24, () -> {
entity.sortItem = items.get(f);
setConfigure(tile, (byte)f);
}).size(38, 42).padBottom(-5.1f).group(group).get();
button.getStyle().imageUp = new TextureRegionDrawable(new TextureRegion(Draw.region("icon-"+items.get(i).name)));
button.setChecked(entity.sortItem.id == f);
if(i%4 == 3){
cont.row();
}
}
table.add(cont);
}
Bird.java 文件源码
项目:GDX-Engine
阅读 26
收藏 0
点赞 0
评论 0
public Bird(IGameService services, TextureRegion tr, Sling sling) {
super(services, tr);
float ratio = (RADIUS * 2f) / getRegionWidth();
setScale(ratio);
this.sling = sling;
}
GameService.java 文件源码
项目:GDX-Engine
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void draw(TextureRegion region, Vector2 position, Vector2 origin,
Vector2 size, Vector2 scale, float rotation) {
batch.draw(region, position.x, position.y, origin.x, origin.y, size.x,
size.y, scale.x, scale.y, rotation);
}
PixelBuffer.java 文件源码
项目:Planet-Generator
阅读 29
收藏 0
点赞 0
评论 0
public PixelBuffer() {
super(Pixmap.Format.RGBA8888, Scene.BUFFER_WIDTH, Scene.BUFFER_HEIGHT, false);
getColorBufferTexture().setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);
pixelBufferRegion = new TextureRegion(getColorBufferTexture(), 0, 0, Scene.BUFFER_WIDTH, Scene.BUFFER_HEIGHT);
pixelBufferRegion.flip(false, true);
}
PowerUpView.java 文件源码
项目:feup-lpoo-armadillo
阅读 31
收藏 0
点赞 0
评论 0
/**
* Creates the animation used for this PowerUp Type.
*
* @param game the game this view belongs to. Needed to access the
* asset manager to get textures.
* @param fileName the path to the file that contains the animation sheet.
* @return the animation used for this PowerUp
*/
private Animation<TextureRegion> createAnimation(Armadillo game, String fileName) {
Texture texture = game.getAssetManager().get(fileName);
TextureRegion[][] regions = TextureRegion.split(texture, texture.getWidth() / NUM_FRAMES, texture.getHeight());
TextureRegion[] frames = new TextureRegion[NUM_FRAMES];
System.arraycopy(regions[0], 0, frames, 0, NUM_FRAMES);
return new Animation<>(FRAME_TIME, frames);
}
ScreenRooms.java 文件源码
项目:enklave
阅读 26
收藏 0
点赞 0
评论 0
private void addtimerbuildroom(){
grouptimerbuild = new Group();
Image bg = new Image(new TextureRegion(manager.getAssetsRooms().getTexture(NameFiles.extensionImgBackground)));
bg.setSize(Gdx.graphics.getWidth() / 2.75f, Gdx.graphics.getHeight() *0.32f);
bg.setPosition(Gdx.graphics.getWidth() / 2 - bg.getWidth() / 2, Gdx.graphics.getHeight() / 5f);
grouptimerbuild.addActor(bg);
Label labelBuildingRoom = new Label("Building Room",new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.025)), Color.WHITE));
labelBuildingRoom.setPosition(Gdx.graphics.getWidth() / 2 - labelBuildingRoom.getWidth() / 2, Gdx.graphics.getHeight() / 2.2f);
grouptimerbuild.addActor(labelBuildingRoom);
labelprocent = new Label("0%",new Label.LabelStyle(new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.03)),Color.WHITE)));
labelprocent.setPosition(Gdx.graphics.getWidth() / 2 - labelprocent.getWidth() / 2, Gdx.graphics.getHeight() / 3.1f);
grouptimerbuild.addActor(labelprocent);
grouptimerbuild.setVisible(false);
}
Clouds.java 文件源码
项目:libgdx-learnlib
阅读 27
收藏 0
点赞 0
评论 0
private void init() {
dimension.set(3.0f, 1.5f);
regClouds = new Array<TextureRegion>();
regClouds.add(Assets.instance.levelDecoration.cloud01);
regClouds.add(Assets.instance.levelDecoration.cloud02);
regClouds.add(Assets.instance.levelDecoration.cloud03);
int distFac = 5;
int numClouds = (int) (length / distFac);
clouds = new Array<Cloud>(2 * numClouds);
for (int i = 0; i < numClouds; i++) {
Cloud cloud = spawnCloud();
cloud.position.x = i * distFac;
clouds.add(cloud);
}
}
Monster.java 文件源码
项目:MMORPG_Prototype
阅读 25
收藏 0
点赞 0
评论 0
public Monster(long id, CustomAnimation<TextureRegion> moveLeftAnimation,
CustomAnimation<TextureRegion> moveRightAnimation, CustomAnimation<TextureRegion> moveDownAnimation,
CustomAnimation<TextureRegion> moveUpAnimation, MonsterProperties properties, CollisionMap<GameObject> collisionMap)
{
super(id, moveLeftAnimation, moveRightAnimation, moveDownAnimation, moveUpAnimation, collisionMap);
this.properties = properties;
}
Feather.java 文件源码
项目:libgdx-learnlib
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void render(SpriteBatch spriteBatch) {
if (collected) {
return;
}
TextureRegion reg = null;
reg = regGoldCoin;
spriteBatch.draw(reg.getTexture(), position.x, position.y, origin.x, origin.y,
dimension.x, dimension.y, scale.x, scale.y, rotation,
reg.getRegionX(), reg.getRegionY(), reg.getRegionWidth(), reg.getRegionHeight(), false, false);
}
AssetLoader.java 文件源码
项目:MyRoom
阅读 27
收藏 0
点赞 0
评论 0
public static void load() {
texture = new Texture(Gdx.files.internal("data/texture.png"));
texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
bg = new TextureRegion(texture, 0, 0, 136, 43);
bg.flip(false, true);
grass = new TextureRegion(texture, 0, 43, 143, 11);
grass.flip(false, true);
birdDown = new TextureRegion(texture, 136, 0, 17, 12);
birdDown.flip(false, true);
bird= new TextureRegion(texture,153,0,17,12);
bird.flip(false,true);
birdUp=new TextureRegion(texture,170,0,17,12);
birdUp.flip(false,true);
TextureRegion[] birds = {birdDown, bird, birdUp};
birdAnimation=new Animation(0.06f,birds);
birdAnimation.setPlayMode(Animation.PlayMode.LOOP_PINGPONG);
skullUp =new TextureRegion(texture,192,0,24,14);
skullDown = new TextureRegion(skullUp);
skullDown.flip(false,true);
bar = new TextureRegion(texture, 136, 16, 22, 3);
bar.flip(false,true);
}
AnimationFactory.java 文件源码
项目:penguins-in-space
阅读 28
收藏 0
点赞 0
评论 0
private Array<TextureRegion> createShortExplosion() {
Array<TextureRegion> explosions = new Array<>();
Texture texture = assetService.getTexture(AssetService.TextureAsset.BOMB_EXPLOSION);
TextureRegion[][] split = TextureRegion.split(texture, 128, 128);
for (TextureRegion[] row : split) {
for (TextureRegion region : row) {
explosions.add(region);
explosions.add(region);
}
}
return explosions;
}
VRContext.java 文件源码
项目:Tower-Defense-Galaxy
阅读 28
收藏 0
点赞 0
评论 0
VRPerEyeData(FrameBuffer buffer, TextureRegion region, VRCamera cameras) {
this.buffer = buffer;
this.region = region;
this.camera = cameras;
this.texture = org.lwjgl.openvr.Texture.create();
this.texture.set(buffer.getColorBufferTexture().getTextureObjectHandle(), VR.ETextureType_TextureType_OpenGL, VR.EColorSpace_ColorSpace_Gamma);
}