Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h
32288 views
/*1* Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef WGLGraphicsConfig_h_Included26#define WGLGraphicsConfig_h_Included2728#include "jni.h"29#include "J2D_GL/gl.h"30#include "OGLSurfaceData.h"31#include "OGLContext.h"3233/**34* The WGLGraphicsConfigInfo structure contains information specific to a35* given WGLGraphicsConfig (pixel format).36*37* jint screen, pixfmt;38* The screen and PixelFormat for the associated WGLGraphicsConfig.39*40* OGLContext *context;41* The context associated with this WGLGraphicsConfig.42*/43typedef struct _WGLGraphicsConfigInfo {44jint screen;45jint pixfmt;46OGLContext *context;47} WGLGraphicsConfigInfo;4849/**50* The WGLCtxInfo structure contains the native WGLContext information51* required by and is encapsulated by the platform-independent OGLContext52* structure.53*54* HGLRC context;55* The core native WGL context. Rendering commands have no effect until a56* context is made current (active).57*58* HPBUFFERARB scratchSurface;59* HDC scratchSurfaceDC;60* The scratch surface (and its associated HDC), which are used to make a61* context current when we do not otherwise have a reference to an OpenGL62* surface for the purposes of making a context current.63*/64typedef struct _WGLCtxInfo {65HGLRC context;66HPBUFFERARB scratchSurface;67HDC scratchSurfaceDC;68} WGLCtxInfo;6970/**71* Utility methods72*/73HWND WGLGC_CreateScratchWindow(jint screennum);7475/**76* REMIND: ideally, this would be declared in AwtComponent.h, but including77* that C++ header file from C source files causes problems...78*/79extern HWND AwtComponent_GetHWnd(JNIEnv *env, jlong pData);8081#endif /* WGLGraphicsConfig_h_Included */828384