EGLContext.java revision 9b18b515909354d7b48c8ebc33ec38e2c6bbdf37
1feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk/* 2feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** 3feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** Copyright 2012, The Android Open Source Project 4feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** 5feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** Licensed under the Apache License, Version 2.0 (the "License"); 6feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** you may not use this file except in compliance with the License. 7feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** You may obtain a copy of the License at 8feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** 9feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** http://www.apache.org/licenses/LICENSE-2.0 10feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** 11feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** Unless required by applicable law or agreed to in writing, software 12feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** distributed under the License is distributed on an "AS IS" BASIS, 13feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** See the License for the specific language governing permissions and 15feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk** limitations under the License. 16feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk*/ 17feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 185096defdaa4716ce81047a855d6e5ce3f8263600Igor Murashkinpackage android.opengl; 19feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 20feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk/** 21feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * Wrapper class for native EGLContext objects. 2228c49c9d202a9f4675c1c1e5d4562492d2107b79Ruben Brunk * 23feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 24feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkpublic class EGLContext extends EGLObjectHandle { 25feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk private EGLContext(int handle) { 26ed6b9dff563c5e22f040ff37e12c0d771e0478aeAndreas Gampe super(handle); 27feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 2828c49c9d202a9f4675c1c1e5d4562492d2107b79Ruben Brunk 29feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk @Override 303c8fa3b356fa8f24b55d3dc42d4313297542e9f2Ruben Brunk public boolean equals(Object o) { 313c8fa3b356fa8f24b55d3dc42d4313297542e9f2Ruben Brunk if (this == o) return true; 32feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk if (o == null || getClass() != o.getClass()) return false; 33feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 345096defdaa4716ce81047a855d6e5ce3f8263600Igor Murashkin EGLContext that = (EGLContext) o; 3528c49c9d202a9f4675c1c1e5d4562492d2107b79Ruben Brunk return getHandle() == that.getHandle(); 36feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 373c8fa3b356fa8f24b55d3dc42d4313297542e9f2Ruben Brunk} 383c8fa3b356fa8f24b55d3dc42d4313297542e9f2Ruben Brunk