forked from libgdx/libgdx
-
Notifications
You must be signed in to change notification settings - Fork 0
Fullscreen & vsync
badlogic edited this page Sep 14, 2013
·
1 revision
To see if full-screen is currently enabled, simply use
boolean fullscreen = Gdx.graphics.isFullscreen();To set full-screen and/or vSync on start-up, specify the corresponding flags in your LwjglApplicationConfiguration:
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.width = 1280;
cfg.height = 720;
// fullscreen
cfg.fullscreen = true;
// vSync
cfg.vSyncEnabled = true;
new LwjglApplication(new YourApplicationListener(), cfg);
}Full-screen cannot be enabled by setting a flag, you have to set a new DisplayMode. To enable/disable full-screen at any given time, use (working on desktop only)
// set resolution to HD ready (1280 x 720) and set full-screen to true
Gdx.graphics.setDisplayMode(1280, 720, true);
// set resolution to default and set full-screen to true
Gdx.graphics.setDisplayMode(Gdx.graphics.getDesktopDisplayMode().width, Gdx.graphics.getDesktopDisplayMode().height, true);To enable/disable vSync at any given time, use
Gdx.graphics.setVSync(true);-
Developer's Guide
- Introduction
- Setting up your Development Environment (Eclipse, Intellij IDEA, NetBeans)
- Creating, Running, Debugging and Packaging your Project
- Working from Source
- The Application Framework
- A Simple Game
- File Handling
- Networking
- Preferences
- Input Handling
- Memory Management
- Audio
-
Graphics
- Configuration & Querying Graphics ??
- Fullscreen & VSync
- Continuous & Non-Continuous Rendering
- Clearing the Screen
- Take a Screenshot
- Profiling
- Viewports
- OpenGL ES Support * Configuration & Querying OpenGL ?? * Direct Access ?? * Utility Classes * Rendering Shapes * Textures & TextureRegions * Meshes * Shaders * Frame Buffer Objects
- 2D Graphics * SpriteBatch, TextureRegions, and Sprites * 2D Animation * Clipping, with the use of ScissorStack * Orthographic camera * Mapping Touch Coordinates ?? * NinePatches * Bitmap Fonts * Distance field fonts * Color Markup Language * Using TextureAtlases * Pixmaps * Packing Atlases Offline * Packing Atlases at Runtime * Texture Compression * 2D Particle Effects * Tile Maps * scene2d * scene2d.ui * Table * Skin
- 3D Graphics * Quick Start * Models * Material and environment * ModelBatch * ModelBuilder, MeshBuilder and MeshPartBuilder * 3D animations and skinning * Importing Blender models in LibGDX * 3D Particle Effects * Perspective Camera ?? * Picking ?? * Decals
- Managing Your Assets
- Internationalization and Localization
- Utilities
-
Math Utilities
- Interpolation
- Vectors, Matrices, Quaternions
- Circles, Planes, Rays, etc.
- Path interface & Splines
- Bounding Volumes ??
- Intersection & Overlap Testing ??
- Tools
- Extensions
- Artificial Intelligence
- gdx-pay: In-App-Purchasing
- gdx-freetype
-
Physics
* Box2D
* Bullet Physics * Setup * Using the wrapper * Using models * Contact callbacks * Custom classes * Debugging
- Using libgdx with other JVM languages
- Third Party Services
- Articles