1 /* 2 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 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 #ifndef D3DBufImgOps_h_Included 27 #define D3DBufImgOps_h_Included 28 29 #include "D3DContext.h" 30 31 /**************************** ConvolveOp support ****************************/ 32 33 /** 34 * Flags that can be bitwise-or'ed together to control how the shader 35 * source code is generated. 36 */ 37 #define CONVOLVE_EDGE_ZERO_FILL (1 << 0) 38 #define CONVOLVE_5X5 (1 << 1) 39 #define MAX_CONVOLVE (1 << 2) 40 41 HRESULT D3DBufImgOps_EnableConvolveOp(D3DContext *oglc, jlong pSrcOps, 42 jboolean edgeZeroFill, 43 jint kernelWidth, jint KernelHeight, 44 unsigned char *kernelVals); 45 HRESULT D3DBufImgOps_DisableConvolveOp(D3DContext *oglc); 46 47 /**************************** RescaleOp support *****************************/ 48 49 /** 50 * Flags that can be bitwise-or'ed together to control how the shader 51 * source code is generated. 52 */ 53 #define RESCALE_NON_PREMULT (1 << 0) 54 #define MAX_RESCALE (1 << 1) 55 56 HRESULT D3DBufImgOps_EnableRescaleOp(D3DContext *oglc, 57 jboolean nonPremult, 58 unsigned char *scaleFactors, 59 unsigned char *offsets); 60 HRESULT D3DBufImgOps_DisableRescaleOp(D3DContext *oglc); 61 62 /**************************** LookupOp support ******************************/ 63 64 /** 65 * Flags that can be bitwise-or'ed together to control how the shader 66 * source code is generated. 67 */ 68 #define LOOKUP_USE_SRC_ALPHA (1 << 0) 69 #define LOOKUP_NON_PREMULT (1 << 1) 70 #define MAX_LOOKUP (1 << 2) 71 72 HRESULT D3DBufImgOps_EnableLookupOp(D3DContext *oglc, 73 jboolean nonPremult, jboolean shortData, 74 jint numBands, jint bandLength, jint offset, 75 void *tableValues); 76 HRESULT D3DBufImgOps_DisableLookupOp(D3DContext *oglc); 77 78 #endif /* D3DBufImgOps_h_Included */ 79