java - Libgdx - loading asset -
LwjglGraphics: Created 3.2+ core profile references. This is experimental! # # A critical error has been discovered from the Java Runtime Environment PC = 0x00007f7860b7ba70, PID = 14,137, TID = 140153724787840 # # # SIGSEGV (0xb) in JRE version: OpenJDK Runtime Environment (7.0_65-B32) ( 1.7 build. 0_65-B32) # Java VM: OpenJDK 64-bit server VM (24.65-B04 mixed mode Linux amd64 compressed Oops) # Derivative: IcedTea 2.5.3 # Distribution: Ubuntu 14.04 LTS, package 7u71-2.5.3 -0ubuntu0.14.04.1 # Problematic frame: # c [libc.so.6 + 0x98a70] # # The main dump failed to write. Core dump has been disabled, try to enable core dumping: "ulimit -c unlimited" Java is saved ## after any error report file is started with more information as follows: # / home / Jf / WorkspacelibGDX / desktop / hs_err_pid14137.log #
There is a problem loading a property for the Libgdx Java project, it's a little while (no asset, just black screen) Runs for, then the program is closing When I comment line: "Batch Draw (Assets. Priest_back, 0, 0);" It runs normally, the screen is white and does not stop it. I do not think the problem with this code is - I do everything like this, as shown on the YouTube tutorial
Here is the code:
Public Square GameScreen Tools Screen {test game; Orthographic camera camera; SpriteBatch Batch; Public game screen (test game) {the.game = game; Camera = new orthographic camera (); Camera.setToOrtho (True, 1920, 1080); Batch = new spritebatch (); } @Override Public Zero Render (Boat Delta) {Gdx.gl.glClearColor (1F, 1F, 1F, 1F); Gdx.gl.glClear (GL30.GL_COLOR_BUFFER_BIT); Camera.update (); Batch.setProjectionMatrix (camera.combined); Batch.begin (); Batch.rara (assets .text_back, 0, 0); Batch.end (); } Assets of public squares {public static texture texture_back; Public static sprite sprite_back; Public static zero load () {texture_back = new texture (Gdx.files.internal ("menu / back.png")); Texture_back.setFilter (TextureFilter.Linear, TextureFilter.Linear); Sprite_back = New Sprite (Texture_back); Sprite_back.flip (false, true); }}
Your assset never loads, the phantom is null, you can never Do not call
Not that I like to do this, but try it:
public game screen (test game) {this.game = game; Camera = new orthographic camera (); Camera.setToOrtho (True, 1920, 1080); Batch = new spritebatch (); Asset.load (); }
It may be better to show your ways.
Comments
Post a Comment