Package org.lwjgl.opengl

Examples of org.lwjgl.opengl.PixelFormat


   
    //Display.setDisplayMode(dm[0]);
   
    Display.setTitle(GAME_TITLE);
    Display.setFullscreen(false);
    Display.create(new PixelFormat(8,0,0,AA_SAMPLES));
   
    //vsync
    Display.setVSyncEnabled(VSYNC);
   
    glMatrixMode(GL_PROJECTION);
View Full Code Here


   */
  private void init() throws SlickException {
    try {
      Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight(), image.getFilter());

      pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), null, null);
      // Initialise state of the pbuffer context.
      pbuffer.makeCurrent();

      initGL();
      image.draw(0,0);
View Full Code Here

  private void init() throws SlickException {
    try {
      Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight(), image.getFilter());
     
      final RenderTexture rt = new RenderTexture(false, true, false, false, RenderTexture.RENDER_TEXTURE_2D, 0);
      pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), rt, null);

      // Initialise state of the pbuffer context.
      pbuffer.makeCurrent();

      initGL();
View Full Code Here

       * @throws Exception Failure to create display
       */
      private void createDisplay() throws Exception {
         try {
            // create display with alpha
            Display.create(new PixelFormat(8,8,GameContainer.stencil ? 8 : 0));
            alphaSupport = true;
         } catch (Exception e) {
            // if we couldn't get alpha, let us know
            alphaSupport = false;
             Display.destroy();
View Full Code Here

   *
   * @throws SlickException Indicates a failure to create the shared drawable
   */
  public static void enableSharedContext() throws SlickException {
    try {
      SHARED_DRAWABLE = new Pbuffer(64, 64, new PixelFormat(8, 0, 0), null);
    } catch (LWJGLException e) {
      throw new SlickException("Unable to create the pbuffer used for shard context, buffers not supported", e);
    }
  }
View Full Code Here

    Log.info("TargetDisplayMode: "+targetDisplayMode);
   
    AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
            try {
              PixelFormat format = new PixelFormat(8,8,stencil ? 8 : 0,samples);
             
              tryCreateDisplay(format);
              supportsMultiSample = true;
            } catch (Exception e) {
              Display.destroy();
             
              try {
                PixelFormat format = new PixelFormat(8,8,stencil ? 8 : 0);
               
                tryCreateDisplay(format);
                alphaSupport = false;
              } catch (Exception e2) {
                Display.destroy();
                // if we couldn't get alpha, let us know
                try {
                  tryCreateDisplay(new PixelFormat());
                } catch (Exception e3) {
                  Log.error(e3);
                }
              }
            }
View Full Code Here

TOP

Related Classes of org.lwjgl.opengl.PixelFormat

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.