LINUX.ORG.RU

Куча ошибок java и jogl?

 ,


0

1

Переписываю проект потихоньку рантайм ошибки не пойму Cars.java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cars;

/**
 *
 * @author Евгений
 */

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import java.awt.DisplayMode;
import java.io.IOException;

/*
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
*/

import com.jogamp.opengl.*;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.glu.*;


import javax.swing.JFrame;

import com.jogamp.opengl.util.FPSAnimator;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;





public class Cars implements GLEventListener {

   public static DisplayMode dm, dm_old;
   private GLU glu = new GLU();
   private float xrot,yrot,zrot;
   private int texture;
   static Scene1 scene;
   static Vector<String> drum;
   @Override
   public void display(GLAutoDrawable drawable) {
      final GL2 gl = drawable.getGL().getGL2();
      gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
      gl.glLoadIdentity(); // Reset The View
      gl.glTranslatef(0f, 0f, -5.0f);
      
      scene.ShowDrum(5, 6, drum, gl);

      gl.glFlush();
   }
   
   @Override
   public void dispose(GLAutoDrawable drawable) {
      // method body
   }
   
   @Override
   public void init(GLAutoDrawable drawable) {
	
      final GL2 gl = drawable.getGL().getGL2();
		
      gl.glShadeModel(GL2.GL_SMOOTH);
      gl.glClearColor(0f, 0f, 0f, 0f);
      gl.glClearDepth(1.0f);
      gl.glEnable(GL2.GL_DEPTH_TEST);
      gl.glDepthFunc(GL2.GL_LEQUAL);
      gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST);
      
      gl.glEnable(GL2.GL_TEXTURE_2D);
      
      try {
           scene.LoadDrum(gl);
      } catch (IOException ex) {
           Logger.getLogger(Cars.class.getName()).log(Level.SEVERE, null, ex);
      }
   }
      
   @Override
   public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
   
      // TODO Auto-generated method stub
      final GL2 gl = drawable.getGL().getGL2();
      if(height <= 0)
         height = 1;
			
      final float h = (float) width / (float) height;
      gl.glViewport(0, 0, width, height);
      gl.glMatrixMode(GL2.GL_PROJECTION);
      gl.glLoadIdentity();
		
      glu.gluPerspective(45.0f, h, 1.0, 20.0);
      gl.glMatrixMode(GL2.GL_MODELVIEW);
      gl.glLoadIdentity();
   }
 
   public static void main(String[] args) {
   
      scene = new Scene1();
      scene.Scene();
      drum = new Vector<String>();
      for(int i=0;i<30;i++)
        drum.add("auto1");
      // TODO Auto-generated method stub
      final GLProfile profile = GLProfile.get(GLProfile.GL2);
      GLCapabilities capabilities = new GLCapabilities(profile);
      
      // The canvas
      final GLCanvas glcanvas = new GLCanvas(capabilities);
      Cars r = new Cars();
		
      glcanvas.addGLEventListener(r);
      
      glcanvas.setSize(400, 400);
		
      final JFrame frame = new JFrame (" Textured Cube");
      
      frame.getContentPane().add(glcanvas);
      frame.setSize(frame.getContentPane().getPreferredSize());
      frame.setVisible(true);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      glcanvas.addMouseListener(new MouseAdapter()
      {
          public void mousePressed(MouseEvent e)
          {
              System.out.println(e.getX() + " " + e.getY());
          }
      });
      final FPSAnimator animator = new FPSAnimator(glcanvas, 300, true);
      animator.start();

    }
	
}

Scene1.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cars;

import com.jogamp.opengl.GL2;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureIO;
import java.io.File;
import java.io.IOException;
import java.util.Vector;

/**
 *
 * @author Евгений
 */
public class Scene1 { 
    class Image
    {
	int IndexTexture;
	String Name;
	int number;
    }
    static final int CountDrum = 5;
    static final int CountTextureOnDrum = 6;
    static final int CountTexture = 1;
    public Vector<String> vectordrum;
    int CountIndexTexture;
    Image[] image;
    File im;
    Texture t;
    float xl, xr, yd, yu;
    int Scene()
    {
	image = new Image[CountTexture];
        CountIndexTexture = 0;
        vectordrum = new Vector<String>();
        return 0;
    }
    int LoadDrum(final GL2 gl) throws IOException
    {
        //if (iter == 0)
	{
		vectordrum.add("auto1");//1
                CountIndexTexture++;
		im = new File("content\\drum\\auto1.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "auto1";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
        /*
	//if (iter == 1)
	{
		vectordrum.add("auto2");//2
		im = new File("content\\drum\\auto2.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "auto2";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
	//if (iter == 2)
	{

		vectordrum.add("auto3");//3
		im = new File("content\\drum\\auto3.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "auto3";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
	//if (iter == 3)
	{
		vectordrum.add("auto4");//4
		im = new File("content\\drum\\auto4.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "auto4";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
	//if (iter == 4)
	{
		vectordrum.add("auto5");//5
		im = new File("content\\drum\\auto5.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "auto5";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
        //if (iter == 15)
	{
		vectordrum.add("bonus");//16
		im = new File("content\\drum\\bonus.png");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "bonus";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
	//if (iter == 16)
	{
		vectordrum.add("wild");//17
		im = new File("content\\drum\\wild.jpg");
                t = TextureIO.newTexture(im, true);
                image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
		image[CountIndexTexture - 1].Name = "wild";
		image[CountIndexTexture - 1].number = CountIndexTexture - 1;
	}
        */
	//if (iter > 15)
		return 0;
	//else
	//	return 1;
    }
    int FindTexture(String name)
    {
	int result = -1;
	for (int i = 0; i<CountTexture; i++)
	{
		if (image[i].Name.equals(name))
		{
			result = image[i].number;
                        break;
		}
	}
	return result;
    }
    void ShowDrum(int countdrums, int counttextureondrums,Vector<String> drum,final GL2 gl)
    {
	int k = -1;
	for (int i = 0; i<countdrums; i++)
	{
		gl.glPushMatrix();
		//glRotatef(rotate[i], 1, 0, 0);
		for (int j = 0; j < counttextureondrums; j++)
		{
			gl.glBindTexture(GL2.GL_TEXTURE_2D, image[FindTexture(drum.get(++k))].IndexTexture);
			EnableTexture(i, j,gl);
		}
		gl.glPopMatrix();
	}
    }
    void EnableTexture(int n, int m,final GL2 gl)
    {
        if(n == 0)
        {
            if(m == 0){
                xl = -0.78f;//08
                xr = -0.48f;
                yd = 0.3f;
                yu = 0.68f;//09
                EnablePolygonFrontUp(xl, xr, yd, yu,gl);
            }
            if (m == 1) {
                xl = -0.78f;
                xr = -0.48f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonFrontMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 2) {
                xl = -0.78f;
                xr = -0.48f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonFrontDown(xl, xr, yd, yu,gl);
            }
            if (m == 3) {
                xl = -0.78f;
                xr = -0.48f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonBackUp(xl, xr, yd, yu,gl);
            }
            if (m == 4) {
                xl = -0.78f;
                xr = -0.48f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonBackMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 5) {
                xl = -0.78f;
                xr = -0.48f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonBackDown(xl, xr, yd, yu,gl);
            }
        }
            //front up
            //front middle
        if(n == 1)
        {
            if (m == 0) {
                xl = -0.48f;
                xr = -0.16f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonFrontUp(xl, xr, yd, yu,gl);
            }
            if(m == 1){
                xl = -0.48f;
                xr = -0.16f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonFrontMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 2) {
                xl = -0.48f;
                xr = -0.16f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonFrontDown(xl, xr, yd, yu,gl);
            }
            if (m == 3) {
                xl = -0.48f;
                xr = -0.16f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonBackUp(xl, xr, yd, yu,gl);
            }
            if (m == 4) {
                xl = -0.48f;
                xr = -0.16f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonBackMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 5) {
                xl = -0.48f;
                xr = -0.16f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonBackDown(xl, xr, yd, yu,gl);
            }
        }
            //front middle
            //front down
        if(n == 2)
        {
            if (m == 0) {
                xl = -0.16f;
                xr = 0.16f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonFrontUp(xl, xr, yd, yu,gl);
            }
            if (m == 1) {
                xl = -0.16f;
                xr = 0.16f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonFrontMiddle(xl, xr, yd, yu,gl);
            }
            if(m == 2){
                xl = -0.16f;
                xr = 0.16f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonFrontDown(xl, xr, yd, yu,gl);
            }
            if (m == 3) {
                xl = -0.16f;
                xr = 0.16f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonBackUp(xl, xr, yd, yu,gl);
            }
            if (m == 4) {
                xl = -0.16f;
                xr = 0.16f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonBackMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 5) {
                xl = -0.16f;
                xr = 0.16f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonBackDown(xl, xr, yd, yu,gl);
            }
        }
            //front down
            //back up
        if(n == 3)
        {
            if (m == 0) {
                xl = 0.16f;
                xr = 0.48f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonFrontUp(xl, xr, yd, yu,gl);
            }
            if (m == 1) {
                xl = 0.16f;
                xr = 0.48f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonFrontMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 2) {
                xl = 0.16f;
                xr = 0.48f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonFrontDown(xl, xr, yd, yu,gl);
            }
            if(m == 3){
                xl = 0.16f;
                xr = 0.48f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonBackUp(xl, xr, yd, yu,gl);
            }
            if (m == 4) {
                xl = 0.16f;
                xr = 0.48f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonBackMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 5) {
                xl = 0.16f;
                xr = 0.48f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonBackDown(xl, xr, yd, yu,gl);
            }
        }
            //back up
            //back middle
        if(n == 4)
        {
            if (m == 0) {
                xl = 0.48f;
                xr = 0.78f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonFrontUp(xl, xr, yd, yu,gl);
            }
            if (m == 1) {
                xl = 0.48f;
                xr = 0.78f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonFrontMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 2) {
                xl = 0.48f;
                xr = 0.78f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonFrontDown(xl, xr, yd, yu,gl);
            }
            if (m == 3) {
                xl = 0.48f;
                xr = 0.78f;
                yd = 0.3f;
                yu = 0.68f;
                EnablePolygonBackUp(xl, xr, yd, yu,gl);
            }
            if(m == 4){
                xl = 0.48f;
                xr = 0.78f;
                yd = -0.3f;
                yu = 0.3f;
                EnablePolygonBackMiddle(xl, xr, yd, yu,gl);
            }
            if (m == 5) {
            
                xl = 0.48f;
                xr = 0.78f;
                yd = -0.68f;
                yu = -0.3f;
                EnablePolygonBackDown(xl, xr, yd, yu,gl);
            }
        }
	//back middle
    }
    void EnablePolygonFrontUp(float xleft, float xright, float ydown, float yup,final GL2 gl)
    {
	gl.glBegin(GL2.GL_POLYGON);
	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, yup, 0.0f);
	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, ydown, .6f);
	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, ydown, .6f);
	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, yup, 0.0f);
	gl.glEnd();

}
void EnablePolygonFrontMiddle(float xleft, float xright, float ydown, float yup,final GL2 gl)
{
	gl.glBegin(GL2.GL_POLYGON);

	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, yup, .6f);

	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, ydown, .6f);

	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, ydown, .6f);

	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, yup, .6f);

	gl.glEnd();
}
void EnablePolygonFrontDown(float xleft, float xright, float ydown, float yup,final GL2 gl)
{
	gl.glBegin(GL2.GL_POLYGON);

	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, yup, .6f);

	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, ydown, 0.0f);

	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, ydown, 0.0f);

	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, yup, .6f);

	gl.glEnd();
}
void EnablePolygonBackUp(float xleft, float xright, float ydown, float yup,final GL2 gl)
{
	gl.glBegin(GL2.GL_POLYGON);

	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, ydown, -.6f);

	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, yup, 0.0f);

	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, yup, 0.0f);

	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, ydown, -.6f);

	gl.glEnd();
}
void EnablePolygonBackMiddle(float xleft, float xright, float ydown, float yup,final GL2 gl)
{
	gl.glBegin(GL2.GL_POLYGON);

	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, ydown, -.6f);

	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, yup, -.6f);

	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, yup, -.6f);

	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, ydown, -.6f);

	gl.glEnd();
}
void EnablePolygonBackDown(float xleft, float xright, float ydown, float yup,final GL2 gl)
{
	gl.glBegin(GL2.GL_POLYGON);

	gl.glTexCoord2f(1.0f, 1.0f);
	gl.glVertex3f(xleft, ydown, 0.0f);

	gl.glTexCoord2f(1.0f, 0.0f);
	gl.glVertex3f(xleft, yup, -.6f);

	gl.glTexCoord2f(0.0f, 0.0f);
	gl.glVertex3f(xright, yup, -.6f);

	gl.glTexCoord2f(0.0f, 1.0f);
	gl.glVertex3f(xright, ydown, 0.0f);

	gl.glEnd();
    }
}



Последнее исправление: bad_master (всего исправлений: 1)
Ответ на: комментарий от bvn13

Я в джаве новичок по сути, кажется что проблема когда я передаю gl в класс Scene1

bad_master
() автор топика

пиши тесты, так найдешь где у тебя ошибки.

fsb4000 ★★★★★
()

import java.util.Vector;

Смеркалось. На дворе стоял 2020-й год.

:facepalm:

Bass ★★★★★
()
Ответ на: комментарий от rukez
Caused by: java.lang.NullPointerException
	at cars.Scene1.FindTexture(Scene1.java:123)
	at cars.Scene1.ShowDrum(Scene1.java:140)
	at cars.Cars.display(Cars.java:60)
	at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
	at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
	at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
	... 28 more
bad_master
() автор топика
Последнее исправление: bad_master (всего исправлений: 1)
Ответ на: комментарий от bad_master
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
	at com.jogamp.opengl.Threading.invoke(Threading.java:223)
	at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
	at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
	at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
	at sun.awt.RepaintArea.paint(RepaintArea.java:240)
	at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
	at java.awt.Component.dispatchEventImpl(Component.java:4965)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
bad_master
() автор топика
Ответ на: комментарий от bad_master
Exception in thread "main-FPSAWTAnimator#00-Timer0" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:92)
	at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
	at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
	at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
	at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:201)
	at com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202)
	at com.jogamp.opengl.Threading.invoke(Threading.java:221)
	at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
	... 4 more
Caused by: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
bad_master
() автор топика
Ответ на: комментарий от bad_master
Caused by: java.lang.NullPointerException
	at cars.Scene1.LoadDrum(Scene1.java:52)
	at cars.Cars.init(Cars.java:85)
	at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
	at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
	at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
	... 16 more
bad_master
() автор топика
Ответ на: комментарий от bad_master
Exception in thread "main-FPSAWTAnimator#00-Timer0" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:92)
	at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
	at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
	at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
	at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
	at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:201)
	at com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202)
	at com.jogamp.opengl.Threading.invoke(Threading.java:221)
	at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
	... 4 more
bad_master
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.