< prev index next >

src/java.desktop/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java

Print this page




  48     /** Indicates that the context supports non-square textures. */
  49     public static final int CAPS_TEXNONSQUARE      = (1 << 6);
  50     /** Indicates that the context supports pixel shader 2.0 or better. */
  51     public static final int CAPS_PS20              = (1 << 7);
  52     /** Indicates that the context supports pixel shader 3.0 or better. */
  53     public static final int CAPS_PS30              = (1 << 8);
  54     /*
  55      *  Pipeline contexts should use this for defining pipeline-specific
  56      *  capabilities, for example:
  57      *    int CAPS_D3D_1 = (FIRST_PRIVATE_CAP << 0);
  58      *    int CAPS_D3D_2 = (FIRST_PRIVATE_CAP << 1);
  59      */
  60     protected static final int FIRST_PRIVATE_CAP   = (1 << 16);
  61 
  62     protected final int caps;
  63     protected final String adapterId;
  64 
  65     /**
  66      * Constructs a {@code ContextCapabilities} object.
  67      * @param caps an {@code int} representing the capabilities
  68      * @param a {@code String} representing the name of the adapter, or null,
  69      * in which case the adapterId will be set to "unknown adapter".
  70      */
  71     protected ContextCapabilities(int caps, String adapterId) {
  72         this.caps = caps;
  73         this.adapterId = adapterId != null ? adapterId : "unknown adapter";
  74     }
  75 
  76     /**
  77      * Returns a string representing the name of the graphics adapter if such
  78      * could be determined. It is guaranteed to never return {@code null}.
  79      * @return string representing adapter id
  80      */
  81     public String getAdapterId() {
  82         return adapterId;
  83     }
  84 
  85     /**
  86      * Returns an {@code int} with capabilities (OR-ed constants defined in
  87      * this class and its pipeline-specific subclasses).
  88      * @return capabilities as {@code int}




  48     /** Indicates that the context supports non-square textures. */
  49     public static final int CAPS_TEXNONSQUARE      = (1 << 6);
  50     /** Indicates that the context supports pixel shader 2.0 or better. */
  51     public static final int CAPS_PS20              = (1 << 7);
  52     /** Indicates that the context supports pixel shader 3.0 or better. */
  53     public static final int CAPS_PS30              = (1 << 8);
  54     /*
  55      *  Pipeline contexts should use this for defining pipeline-specific
  56      *  capabilities, for example:
  57      *    int CAPS_D3D_1 = (FIRST_PRIVATE_CAP << 0);
  58      *    int CAPS_D3D_2 = (FIRST_PRIVATE_CAP << 1);
  59      */
  60     protected static final int FIRST_PRIVATE_CAP   = (1 << 16);
  61 
  62     protected final int caps;
  63     protected final String adapterId;
  64 
  65     /**
  66      * Constructs a {@code ContextCapabilities} object.
  67      * @param caps an {@code int} representing the capabilities
  68      * @param adapterId {@code String} representing the name of the adapter, or null,
  69      * in which case the adapterId will be set to "unknown adapter".
  70      */
  71     protected ContextCapabilities(int caps, String adapterId) {
  72         this.caps = caps;
  73         this.adapterId = adapterId != null ? adapterId : "unknown adapter";
  74     }
  75 
  76     /**
  77      * Returns a string representing the name of the graphics adapter if such
  78      * could be determined. It is guaranteed to never return {@code null}.
  79      * @return string representing adapter id
  80      */
  81     public String getAdapterId() {
  82         return adapterId;
  83     }
  84 
  85     /**
  86      * Returns an {@code int} with capabilities (OR-ed constants defined in
  87      * this class and its pipeline-specific subclasses).
  88      * @return capabilities as {@code int}


< prev index next >