2362N/A * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Note that the RenderQueue lock must be acquired before calling any of 0N/A * the methods in this class. 0N/A * Convenience method that delegates to setScratchSurface() below. 0N/A * Makes the given GraphicsConfig's context current to its associated 0N/A * "scratch surface". Each GraphicsConfig maintains a native context 0N/A * (GLXContext on Unix, HGLRC on Windows) as well as a native pbuffer 0N/A * known as the "scratch surface". By making the context current to the 0N/A * scratch surface, we are assured that we have a current context for 0N/A * the relevant GraphicsConfig, and can therefore perform operations 0N/A * depending on the capabilities of that GraphicsConfig. For example, 0N/A * if the GraphicsConfig supports the GL_ARB_texture_non_power_of_two 0N/A * extension, then we should be able to make a non-pow2 texture for this 0N/A * GraphicsConfig once we make the context current to the scratch surface. 0N/A * This method should be used for operations with an OpenGL texture 0N/A * as the destination surface (e.g. a sw->texture blit loop), or in those 0N/A * situations where we may not otherwise have a current context (e.g. 0N/A * when disposing a texture-based surface). 0N/A // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); 0N/A // invalidate the current context 0N/A // set the scratch context 0N/A * Invalidates the currentContext field to ensure that we properly 0N/A * revalidate the OGLContext (make it current, etc.) next time through 0N/A * the validate() method. This is typically invoked from methods 0N/A * that affect the current context state (e.g. disposing a context or 0N/A // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); 430N/A // invalidate the current Java-level context so that we 430N/A // revalidate everything the next time around 430N/A // invalidate the context reference at the native level, and 0N/A // then flush the queue so that we have no pending operations 0N/A // dependent on the current context 430N/A * Returns a string representing adapter id (vendor, renderer, version). 430N/A * Must be called on the rendering thread. 430N/A * @return an id string for the adapter 430N/A // assert rq.lock.isHeldByCurrentThread(); 430N/A // reset all attributes of this and current contexts 430N/A // save the state on the native level 430N/A // assert rq.lock.isHeldByCurrentThread(); 430N/A // reset all attributes of this and current contexts 430N/A // restore the state on the native level 430N/A * Indicates the presence of the GL_EXT_framebuffer_object extension. 430N/A * This cap will only be set if the fbobject system property has been 430N/A * enabled and we are able to create an FBO with depth buffer. 430N/A /** Indicates that the context supports a stored alpha channel. */ 430N/A /** Indicates that the context is doublebuffered. */ 430N/A * Indicates the presence of the GL_ARB_fragment_shader extension. 430N/A * This cap will only be set if the lcdshader system property has been 430N/A * enabled and the hardware supports the minimum number of texture units 430N/A * Indicates the presence of the GL_ARB_fragment_shader extension. 430N/A * This cap will only be set if the biopshader system property has been 430N/A * enabled and the hardware meets our minimum requirements. 430N/A * Indicates the presence of the GL_ARB_fragment_shader extension. 430N/A * This cap will only be set if the gradshader system property has been 430N/A * enabled and the hardware meets our minimum requirements. 430N/A /** Indicates the presence of the GL_ARB_texture_rectangle extension. */