Package org.lwjgl

Examples of org.lwjgl.LWJGLException


        yspot = 0;
      }
      return new Cursor(width,height, x, yspot, 1, buf.asIntBuffer(), null);
    } catch (Throwable e) {
      Log.info("Chances are you cursor is too small for this platform");
      throw new LWJGLException(e);
    }
  }
View Full Code Here


        yspot = 0;
      }
      return new Cursor(imageData.getTexWidth(), imageData.getTexHeight(), x, yspot, 1, buf.asIntBuffer(), null);
    } catch (Throwable e) {
      Log.info("Chances are you cursor is too small for this platform");
      throw new LWJGLException(e);
    }
  }
View Full Code Here

      case LWJGLUtil.PLATFORM_MACOSX:
        libname = "OpenCL";
        library_names = new String[] { "OpenCL.dylib" }; // TODO: Fix this
        break;
      default:
        throw new LWJGLException("Unknown platform: " + LWJGLUtil.getPlatform());
    }

    final String[] oclPaths = LWJGLUtil.getLibraryPaths(libname, library_names, CL.class.getClassLoader());
    LWJGLUtil.log("Found " + oclPaths.length + " OpenCL paths");
    for ( String oclPath : oclPaths ) {
      try {
        nCreate(oclPath);
        created = true;
        break;
      } catch (LWJGLException e) {
        LWJGLUtil.log("Failed to load " + oclPath + ": " + e.getMessage());
      }
    }

    if ( !created && LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX ) {
      // Try to load OpenCL from the framework instead
      nCreateDefault();
      created = true;
    }

    if ( !created )
      throw new LWJGLException("Could not locate OpenCL library.");

    if ( !CLCapabilities.OpenCL10 )
      throw new RuntimeException("OpenCL 1.0 not supported.");
  }
View Full Code Here

  /**
   * The default paint() operation makes the context current and calls paintGL() which should
   * be overridden to do GL operations.
   */
  public final void paint(Graphics g) {
    LWJGLException exception = null;
    synchronized ( SYNC_LOCK ) {
      if ( !isDisplayable() )
        return;
      try {
        if ( peer_info == null ) {
View Full Code Here

        }
      });
      Integer screen = (Integer)getScreen_method.invoke(device);
      return screen;
    } catch (Exception e) {
      throw new LWJGLException(e);
    }
  }
View Full Code Here

        }
      });
      Integer visual = (Integer)getVisual_method.invoke(configuration);
      return visual;
    } catch (Exception e) {
      throw new LWJGLException(e);
    }
  }
View Full Code Here

  public static EGLDisplay eglGetDisplay(long display_id) throws LWJGLException {
    //LWJGLUtil.log("eglGetDisplay");
    final long pointer = neglGetDisplay(display_id);

    if ( pointer == EGL_NO_DISPLAY ) // No error is generated when this happens
      throw new LWJGLException("Failed to get EGL display from native display handle: " + display_id);

    return new EGLDisplay(pointer);
  }
View Full Code Here

  static void throwEGLError(String msg, final int error) throws LWJGLException {
    if ( error != EGL_SUCCESS )
      msg += " EGL error: " + Util.translateEGLErrorString(error);

    throw new LWJGLException(msg);
  }
View Full Code Here

   * @throws org.lwjgl.LWJGLException if EGL.eglGetError() returns anything else than EGL.EGL_SUCCESS
   */
  static void checkEGLError() throws LWJGLException {
    int err = eglGetError();
    if ( err != EGL_SUCCESS )
      throw new LWJGLException(translateEGLErrorString(err));
  }
View Full Code Here

            /** For some strange reason, the display mode is sometimes silently capped even though the mode is reported as supported */
            if ( requested_mode.getWidth() != real_mode.getWidth() || requested_mode.getHeight() != real_mode.getHeight() ) {
              getDevice().setFullScreenWindow(null);
              if (isDisplayable())
                dispose();
              throw new LWJGLException("AWT capped mode: requested mode = " + requested_mode.getWidth() + "x" + requested_mode.getHeight() +
                " but got " + real_mode.getWidth() + " " + real_mode.getHeight());
            }
            return null;
          }
        });
      } catch (PrivilegedActionException e) {
        throw new LWJGLException(e);
      }
    }
    pack();
    resize(x, y, mode.getWidth(), mode.getHeight());
    setVisible(true);
View Full Code Here

TOP

Related Classes of org.lwjgl.LWJGLException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.