< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m

Print this page




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #import <stdlib.h>
  27 #import <JavaNativeFoundation/JavaNativeFoundation.h>
  28 
  29 #import "sun_java2d_opengl_CGLSurfaceData.h"
  30 
  31 #import "jni.h"
  32 #import "jni_util.h"
  33 #import "OGLRenderQueue.h"
  34 #import "CGLGraphicsConfig.h"
  35 #import "CGLSurfaceData.h"
  36 #import "CGLLayer.h"
  37 #import "ThreadUtilities.h"
  38 
  39 /* JDK's glext.h is already included and will prevent the Apple glext.h
  40  * being included, so define the externs directly
  41  */
  42 extern void glBindFramebufferEXT(GLenum target, GLuint framebuffer);
  43 extern CGLError CGLTexImageIOSurface2D(
  44         CGLContextObj ctx, GLenum target, GLenum internal_format,
  45         GLsizei width, GLsizei height, GLenum format, GLenum type,
  46         IOSurfaceRef ioSurface, GLuint plane);
  47 
  48 /**
  49  * The methods in this file implement the native windowing system specific
  50  * layer (CGL) for the OpenGL-based Java 2D pipeline.
  51  */
  52 
  53 #pragma mark -
  54 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
  55 
  56 // TODO: hack that's called from OGLRenderQueue to test out unlockFocus behavior




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #import <stdlib.h>

  27 
  28 #import "sun_java2d_opengl_CGLSurfaceData.h"
  29 

  30 #import "jni_util.h"
  31 #import "OGLRenderQueue.h"
  32 #import "CGLGraphicsConfig.h"
  33 #import "CGLSurfaceData.h"

  34 #import "ThreadUtilities.h"
  35 
  36 /* JDK's glext.h is already included and will prevent the Apple glext.h
  37  * being included, so define the externs directly
  38  */
  39 extern void glBindFramebufferEXT(GLenum target, GLuint framebuffer);
  40 extern CGLError CGLTexImageIOSurface2D(
  41         CGLContextObj ctx, GLenum target, GLenum internal_format,
  42         GLsizei width, GLsizei height, GLenum format, GLenum type,
  43         IOSurfaceRef ioSurface, GLuint plane);
  44 
  45 /**
  46  * The methods in this file implement the native windowing system specific
  47  * layer (CGL) for the OpenGL-based Java 2D pipeline.
  48  */
  49 
  50 #pragma mark -
  51 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
  52 
  53 // TODO: hack that's called from OGLRenderQueue to test out unlockFocus behavior


< prev index next >