epoc32/include/GLES2/gl2platform.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 #ifndef __gl2platform_h_
       
     2 #define __gl2platform_h_
       
     3 
       
     4 /*
       
     5  *  portions Copyright (c) 2008 - 2009 Nokia Corporation. All rights reserved.
       
     6  * Differences from the actual sample implementation provided by Khronos:
       
     7  * 1. This comment text.
       
     8  * 2. Doxygen comment with tag 'publishedPartner', and tag 'released'
       
     9  * 3. Modified GL_APICALL.  The symbian specific check has been moved to the
       
    10  *    top because with a clean epoc/build/* starting point, makmake.pl wincsw
       
    11  *    would pick up the Win32 defines section.  For vendor implementations,
       
    12  *    use in your .MMP file
       
    13  *    MACRO SYMBIAN_OGLES_DLL_EXPORTS.
       
    14  *    The GCC32 case has been removed because this does not fit with the symbian
       
    15  *    build system which uses GCCE instead.
       
    16  * 4. A vendor implementation is allowed to overwrite/modify this file;
       
    17  *    see Khronos API Implementers' Guidelines, Revision 0.91.0.
       
    18  */
       
    19 
       
    20 /**
       
    21 @publishedAll
       
    22 @released
       
    23 */
       
    24 
       
    25 /* $Id: gl2platform.h 4532 2007-11-26 11:12:44Z markc $ */
       
    26 
       
    27 #ifdef __cplusplus
       
    28 extern "C" {
       
    29 #endif
       
    30 
       
    31 /*
       
    32 ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
       
    33 ** Copyright (C) 2008 Silicon Graphics, Inc. All Rights Reserved.
       
    34 ** 
       
    35 ** Permission is hereby granted, free of charge, to any person obtaining 
       
    36 ** a copy of this software and associated documentation files 
       
    37 ** (the "Software"), to deal in the Software without restriction, 
       
    38 ** including without limitation the rights to use, copy, modify, merge, 
       
    39 ** publish, distribute, sublicense, and/or sell copies of the Software, 
       
    40 ** and to permit persons to whom the Software is furnished to do so, 
       
    41 ** subject to the following conditions:
       
    42 **  
       
    43 ** The above copyright notice including the dates of first 
       
    44 ** publication and either this permission notice or a reference to 
       
    45 ** http://oss.sgi.com/projects/FreeB/ shall be included in all copies 
       
    46 ** or substantial portions of the Software.
       
    47 ** 
       
    48 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
       
    49 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
       
    50 ** MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
       
    51 ** IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, 
       
    52 ** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
       
    53 ** OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
       
    54 ** THE USE OR OTHER DEALINGS IN THE SOFTWARE.
       
    55 ** 
       
    56 ** Except as contained in this notice, the name of Silicon Graphics, Inc. 
       
    57 ** shall not be used in advertising or otherwise to promote the sale, use 
       
    58 ** or other dealings in this Software without prior written authorization 
       
    59 ** from Silicon Graphics, Inc. 
       
    60 */
       
    61 
       
    62 /*
       
    63  * If the pre-included toolchain header does not specify the __SOFTFP macro,
       
    64  * this include defines it.
       
    65  */
       
    66 #include <e32def.h>
       
    67 
       
    68 /*-------------------------------------------------------------------------
       
    69  * Definition of GL_APICALL and GL_APIENTRY
       
    70  *-----------------------------------------------------------------------*/
       
    71 
       
    72 #if defined (__SYMBIAN32__)
       
    73 #   if defined (SYMBIAN_OGLES_DLL_EXPORTS)
       
    74 #       define GL_APICALL __declspec(dllexport)
       
    75 #   else
       
    76 #       define GL_APICALL __declspec(dllimport)
       
    77 #   endif
       
    78 #elif defined(_WIN32) || defined(__VC32__)       /* Win32 */
       
    79 #   if defined (_DLL_EXPORTS)
       
    80 #       define GL_APICALL __declspec(dllexport)
       
    81 #   else
       
    82 #       define GL_APICALL __declspec(dllimport)
       
    83 #   endif
       
    84 #elif defined (__ARMCC_VERSION)                  /* ADS */
       
    85 #   define GL_APICALL
       
    86 #elif defined (__GNUC__)                         /* GCC dependencies (kludge) */
       
    87 #   define GL_APICALL
       
    88 #endif
       
    89 
       
    90 #if !defined (GL_APICALL)
       
    91 #   error Unsupported platform!
       
    92 #endif
       
    93 
       
    94 #define GL_APIENTRY
       
    95 
       
    96 #ifdef __cplusplus
       
    97 }
       
    98 #endif
       
    99 
       
   100 #endif /* __gl2platform_h_ */