/* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free ** Software License B, Version 1.1 (the "License"), the contents of this ** file are subject only to the provisions of the License. You may not use ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: ** ** http://oss.sgi.com/projects/FreeB ** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. ** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. ** ** Additional Notice Provisions: This software was created using the ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has ** not been independently verified as being compliant with the OpenGL(R) ** version 1.2.1 Specification. */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the ** License. You may obtain a copy of the License at Silicon Graphics, Inc., ** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 ** or at http://www.sgi.com/software/opensource/glx/license.html. ** ** Software distributed under the License is distributed on an "AS IS" ** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY ** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR ** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific ** language governing rights and limitations under the License. ** ** The Original Software is GLX version 1.2 source code, released February, ** 1999. The developer of the Original Software is Silicon Graphics, Inc. ** Those portions of the Subject Software created by Silicon Graphics, Inc. ** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. */ /* ** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are met: ** ** * Redistributions of source code must retain the above copyright notice, ** this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright notice, ** this list of conditions and the following disclaimer in the documentation ** and/or other materials provided with the distribution. ** * The name of the author may be used to endorse or promote products ** derived from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF ** THE POSSIBILITY OF SUCH DAMAGE. */ /* ** The OpenGL Extension Wrangler Library ** Copyright (C) 2002 Milan Ikits ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Lesser General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with this library; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include static FILE* f; static void glewPrintExt (const char* name, int defined) { unsigned int i; fprintf(f, "\n%s:", name); for (i=0; i<42-strlen(name); i++) fprintf(f, " "); fprintf(f, "%s\n", defined ? "OK" : "MISSING"); for (i=0; i= 199901L) static void glxewInfo_OML_sync_control () { char me[] = "GLX_OML_sync_control"; glewPrintExt(me, glxew.OML_sync_control); glewInfoFunc(glXGetSyncValuesOML == NULL, "glXGetSyncValuesOML"); glewInfoFunc(glXGetMscRateOML == NULL, "glXGetMscRateOML"); glewInfoFunc(glXSwapBuffersMscOML == NULL, "glXSwapBuffersMscOML"); glewInfoFunc(glXWaitForMscOML == NULL, "glXWaitForMscOML"); glewInfoFunc(glXWaitForSbcOML == NULL, "glXWaitForSbcOML"); } #endif /* __STDC_VERSION__ */ #endif /* GLX_OML_sync_control */ /* ------------------------------- SGI_cushion ---------------------------- */ #ifdef GLX_SGI_cushion static void glxewInfo_SGI_cushion () { char me[] = "GLX_SGI_cushion"; glewPrintExt(me, glxew.SGI_cushion); glewInfoFunc(glXCushionSGI == NULL, "glXCushionSGI"); } #endif /* GLX_SGI_cushion */ /* -------------------------- SGI_make_current_read ----------------------- */ #ifdef GLX_SGI_make_current_read static void glxewInfo_SGI_make_current_read () { char me[] = "GLX_SGI_make_current_read"; glewPrintExt(me, glxew.SGI_make_current_read); glewInfoFunc(glXMakeCurrentReadSGI == NULL, "glXMakeCurrentReadSGI"); glewInfoFunc(glXGetCurrentReadDrawableSGI == NULL, "glXGetCurrentReadDrawableSGI"); } #endif /* GLX_SGI_make_current_read */ /* ---------------------------- SGI_swap_control -------------------------- */ #ifdef GLX_SGI_swap_control static void glxewInfo_SGI_swap_control () { char me[] = "GLX_SGI_swap_control"; glewPrintExt(me, glxew.SGI_swap_control); glewInfoFunc(glXSwapIntervalSGI == NULL, "glXSwapIntervalSGI"); } #endif /* GLX_SGI_swap_control */ /* ----------------------------- SGI_video_sync --------------------------- */ #ifdef GLX_SGI_video_sync static void glxewInfo_SGI_video_sync () { char me[] = "GLX_SGI_video_sync"; glewPrintExt(me, glxew.SGI_video_sync); glewInfoFunc(glXGetVideoSyncSGI == NULL, "glXGetVideoSyncSGI"); glewInfoFunc(glXWaitVideoSyncSGI == NULL, "glXWaitVideoSyncSGI"); glewInfoFunc(glXGetRefreshRateSGI == NULL, "glXGetRefreshRateSGI"); } #endif /* GLX_SGI_video_sync */ /* ------------------------------ SGIX_fbconfig --------------------------- */ #ifdef GLX_SGIX_fbconfig static void glxewInfo_SGIX_fbconfig () { char me[] = "GLX_SGIX_fbconfig"; glewPrintExt(me, glxew.SGIX_fbconfig); glewInfoFunc(glXGetFBConfigAttribSGIX == NULL, "glXGetFBConfigAttribSGIX"); glewInfoFunc(glXChooseFBConfigSGIX == NULL, "glXChooseFBConfigSGIX"); glewInfoFunc(glXCreateGLXPixmapWithConfigSGIX == NULL, "glXCreateGLXPixmapWithConfigSGIX"); glewInfoFunc(glXCreateContextWithConfigSGIX == NULL, "glXCreateContextWithConfigSGIX"); glewInfoFunc(glXGetVisualFromFBConfigSGIX == NULL, "glXGetVisualFromFBConfigSGIX"); glewInfoFunc(glXGetFBConfigFromVisualSGIX == NULL, "glXGetFBConfigFromVisualSGIX"); } #endif /* GLX_SGIX_fbconfig */ /* ------------------------------- SGIX_pbuffer --------------------------- */ #ifdef GLX_SGIX_pbuffer static void glxewInfo_SGIX_pbuffer () { char me[] = "GLX_SGIX_pbuffer"; glewPrintExt(me, glxew.SGIX_pbuffer); glewInfoFunc(glXCreateGLXPbufferSGIX == NULL, "glXCreateGLXPbufferSGIX"); glewInfoFunc(glXDestroyGLXPbufferSGIX == NULL, "glXDestroyGLXPbufferSGIX"); glewInfoFunc(glXQueryGLXPbufferSGIX == NULL, "glXQueryGLXPbufferSGIX"); glewInfoFunc(glXSelectEventSGIX == NULL, "glXSelectEventSGIX"); glewInfoFunc(glXGetSelectedEventSGIX == NULL, "glXGetSelectedEventSGIX"); } #endif /* GLX_SGIX_pbuffer */ /* ---------------------------- SGIX_swap_barrier ------------------------- */ #ifdef GLX_SGIX_swap_barrier static void glxewInfo_SGIX_swap_barrier () { char me[] = "GLX_SGIX_swap_barrier"; glewPrintExt(me, glxew.SGIX_swap_barrier); glewInfoFunc(glXBindSwapBarrierSGIX == NULL, "glXBindSwapBarrierSGIX"); glewInfoFunc(glXQueryMaxSwapBarriersSGIX == NULL, "glXQueryMaxSwapBarriersSGIX"); } #endif /* GLX_SGIX_swap_barrier */ /* ----------------------------- SGIX_swap_group -------------------------- */ #ifdef GLX_SGIX_swap_group static void glxewInfo_SGIX_swap_group () { char me[] = "GLX_SGIX_swap_group"; glewPrintExt(me, glxew.SGIX_swap_group); glewInfoFunc(glXJoinSwapGroupSGIX == NULL, "glXJoinSwapGroupSGIX"); } #endif /* GLX_SGIX_swap_group */ /* ------------------------ SUN_get_transparent_index --------------------- */ #ifdef GLX_SUN_get_transparent_index static void glxewInfo_SUN_get_transparent_index () { char me[] = "GLX_SUN_get_transparent_index"; glewPrintExt(me, glxew.SUN_get_transparent_index); glewInfoFunc(glXGetTransparentIndexSUN == NULL, "glXGetTransparentIndexSUN"); } #endif /* GLX_SUN_get_transparent_index */ #endif /* _WIN32 */ /* ------------------------------------------------------------------------ */ static void glewInfo () { /* test core opengl */ #ifdef GL_VERSION_1_1 glewPrintExt("GL_11", glew.GL_11); #endif #ifdef GL_VERSION_1_2 glewInfo_12(); #endif #ifdef GL_VERSION_1_3 glewInfo_13(); #endif #ifdef GL_VERSION_1_4 glewInfo_14(); #endif /* test extensions */ #ifdef GL_ARB_depth_texture glewPrintExt("GL_ARB_depth_texture", glew.ARB_depth_texture); #endif #ifdef GL_ARB_fragment_program glewPrintExt("GL_ARB_fragment_program", glew.ARB_fragment_program); #endif #ifdef GL_ARB_imaging glewInfo_ARB_imaging(); #endif #ifdef GL_ARB_matrix_palette glewInfo_ARB_matrix_palette(); #endif #ifdef GL_ARB_multisample glewInfo_ARB_multisample(); #endif #ifdef GL_ARB_multitexture glewInfo_ARB_multitexture(); #endif #ifdef GL_ARB_point_parameters glewInfo_ARB_point_parameters(); #endif #ifdef GL_ARB_shadow glewPrintExt("GL_ARB_shadow", glew.ARB_shadow); #endif #ifdef GL_ARB_shadow_ambient glewPrintExt("GL_ARB_shadow_ambient", glew.ARB_shadow_ambient); #endif #ifdef GL_ARB_texture_border_clamp glewPrintExt("GL_ARB_texture_border_clamp", glew.ARB_texture_border_clamp); #endif #ifdef GL_ARB_texture_compression glewInfo_ARB_texture_compression(); #endif #ifdef GL_ARB_transpose_matrix glewInfo_ARB_transpose_matrix(); #endif #ifdef GL_ARB_texture_cube_map glewPrintExt("GL_ARB_texture_cube_map", glew.ARB_texture_cube_map); #endif #ifdef GL_ARB_texture_env_add glewPrintExt("GL_ARB_texture_env_add", glew.ARB_texture_env_add); #endif #ifdef GL_ARB_texture_env_combine glewPrintExt("GL_ARB_texture_env_combine", glew.ARB_texture_env_combine); #endif #ifdef GL_ARB_texture_env_crossbar glewPrintExt("GL_ARB_texture_env_crossbar", glew.ARB_texture_env_crossbar); #endif #ifdef GL_ARB_texture_env_dot3 glewPrintExt("GL_ARB_texture_env_dot3", glew.ARB_texture_env_dot3); #endif #ifdef GL_ARB_texture_mirrored_repeat glewPrintExt("GL_ARB_texture_mirrored_repeat", glew.ARB_texture_mirrored_repeat); #endif #ifdef GL_ARB_vertex_blend glewInfo_ARB_vertex_blend(); #endif #ifdef GL_ARB_vertex_program glewInfo_ARB_vertex_program(); #endif #ifdef GL_ARB_window_pos glewInfo_ARB_window_pos(); #endif #ifdef GL_EXT_abgr glewPrintExt("GL_EXT_abgr", glew.EXT_abgr); #endif #ifdef GL_EXT_bgra glewPrintExt("GL_EXT_bgra", glew.EXT_bgra); #endif #ifdef GL_EXT_blend_color glewInfo_EXT_blend_color(); #endif #ifdef GL_EXT_blend_func_separate glewInfo_EXT_blend_func_separate(); #endif #ifdef GL_EXT_blend_minmax glewInfo_EXT_blend_minmax(); #endif #ifdef GL_EXT_blend_subtract glewPrintExt("GL_EXT_blend_subtract", glew.EXT_blend_subtract); #endif #ifdef GL_EXT_clip_volume_hint glewPrintExt("GL_EXT_clip_volume_hint", glew.EXT_clip_volume_hint); #endif #ifdef GL_EXT_compiled_vertex_array glewInfo_EXT_compiled_vertex_array(); #endif #ifdef GL_EXT_cull_vertex glewInfo_EXT_cull_vertex(); #endif #ifdef GL_EXT_draw_range_elements glewInfo_EXT_draw_range_elements(); #endif #ifdef GL_EXT_fog_coord glewInfo_EXT_fog_coord(); #endif #ifdef GL_EXT_multi_draw_arrays glewInfo_EXT_multi_draw_arrays(); #endif #ifdef GL_EXT_packed_pixels glewPrintExt("GL_EXT_packed_pixels", glew.EXT_packed_pixels); #endif #ifdef GL_EXT_point_parameters glewInfo_EXT_point_parameters(); #endif #ifdef GL_EXT_secondary_color glewInfo_EXT_secondary_color(); #endif #ifdef GL_EXT_separate_specular_color glewPrintExt("GL_EXT_separate_specular_color", glew.EXT_separate_specular_color); #endif #ifdef GL_EXT_shadow_funcs glewPrintExt("GL_EXT_shadow_funcs", glew.EXT_shadow_funcs); #endif #ifdef GL_EXT_stencil_two_side glewInfo_EXT_stencil_two_side(); #endif #ifdef GL_EXT_stencil_wrap glewPrintExt("GL_EXT_stencil_two_side", glew.EXT_stencil_wrap); #endif #ifdef GL_EXT_texture_compression_s3tc glewPrintExt("GL_EXT_texture_compression_s3tc", glew.EXT_texture_compression_s3tc); #endif #ifdef GL_EXT_texture_env_combine glewPrintExt("GL_EXT_texture_env_combine", glew.EXT_texture_env_combine); #endif #ifdef GL_EXT_texture_filter_anisotropic glewPrintExt("GL_EXT_texture_filter_anisotropic", glew.EXT_texture_filter_anisotropic); #endif #ifdef GL_EXT_texture_lod_bias glewPrintExt("GL_EXT_texture_lod_bias", glew.EXT_texture_lod_bias); #endif #ifdef GL_EXT_texture_rectangle glewPrintExt("GL_EXT_texture_rectangle", glew.EXT_texture_rectangle); #endif #ifdef GL_EXT_vertex_shader glewInfo_EXT_vertex_shader(); #endif #ifdef GL_EXT_vertex_weighting glewInfo_EXT_vertex_weighting(); #endif #ifdef GL_SGIS_generate_mipmap glewPrintExt("GL_SGIS_generate_mipmap", glew.SGIS_generate_mipmap); #endif #ifdef GL_SGIS_texture_lod glewPrintExt("GL_SGIS_texture_lod", glew.SGIS_texture_lod); #endif #ifdef GL_SGIX_depth_texture glewPrintExt("GL_SGIX_depth_texture", glew.SGIX_depth_texture); #endif #ifdef GL_SGIX_shadow glewPrintExt("GL_SGIX_shadow", glew.SGIX_shadow); #endif #ifdef GL_HP_occlusion_test glewPrintExt("GL_HP_occlusion_test", glew.HP_occlusion_test); #endif #ifdef GL_S3_s3tc glewPrintExt("GL_S3_s3tc", glew.S3_s3tc); #endif #ifdef GL_WIN_swap_hint glewInfo_WIN_swap_hint(); #endif #ifdef GL_ATI_draw_buffers glewInfo_ATI_draw_buffers(); #endif #ifdef GL_ATI_element_array glewInfo_ATI_element_array(); #endif #ifdef GL_ATI_envmap_bumpmap glewInfo_ATI_envmap_bumpmap(); #endif #ifdef GL_ATI_fragment_shader glewInfo_ATI_fragment_shader(); #endif #ifdef GL_ATI_map_object_buffer glewInfo_ATI_map_object_buffer(); #endif #ifdef GL_ATI_mapped_texture glewInfo_ATI_mapped_texture(); #endif #ifdef GL_ATI_point_cull_mode glewPrintExt("GL_ATI_point_cull_mode", glew.ATI_point_cull_mode); #endif #ifdef GL_ATI_pn_triangles glewInfo_ATI_pn_triangles(); #endif #ifdef GL_ATI_separate_stencil glewInfo_ATI_separate_stencil(); #endif #ifdef GL_ATI_text_fragment_shader glewPrintExt("GL_ATI_text_fragment_shader", glew.ATI_text_fragment_shader); #endif #ifdef GL_ATI_texture_float glewPrintExt("GL_ATI_texture_float", glew.ATI_texture_float); #endif #ifdef GL_ATI_texture_mirror_once glewPrintExt("GL_ATI_texture_mirror_once", glew.ATI_texture_mirror_once); #endif #ifdef GL_ATI_timestamp glewInfo_ATI_timestamp(); #endif #ifdef GL_ATI_vertex_array_object glewInfo_ATI_vertex_array_object(); #endif #ifdef GL_ATI_vertex_attrib_array_object glewInfo_ATI_vertex_attrib_array_object(); #endif #ifdef GL_ATI_vertex_streams glewInfo_ATI_vertex_streams(); #endif #ifdef GL_ATIX_point_sprites glewPrintExt("GL_ATIX_point_sprites", glew.ATIX_point_sprites); #endif #ifdef GL_ATIX_texture_env_combine3 glewPrintExt("GL_ATIX_texture_env_combine3", glew.ATIX_texture_env_combine3); #endif #ifdef GL_ATIX_texture_env_route glewPrintExt("GL_ATIX_texture_env_route", glew.ATIX_texture_env_route); #endif #ifdef GL_ATIX_vertex_shader_output_point_size glewPrintExt("GL_ATIX_vertex_shader_output_point_size", glew.ATIX_vertex_shader_output_point_size); #endif #ifdef GL_NV_blend_square glewPrintExt("GL_NV_blend_square", glew.NV_blend_square); #endif #ifdef GL_NV_copy_depth_to_color glewPrintExt("GL_NV_copy_depth_to_color", glew.NV_copy_depth_to_color); #endif #ifdef GL_NV_depth_clamp glewPrintExt("GL_NV_depth_clamp", glew.NV_depth_clamp); #endif #ifdef GL_NV_element_array glewInfo_NV_element_array(); #endif #ifdef GL_NV_evaluators glewInfo_NV_evaluators(); #endif #ifdef GL_NV_fence glewInfo_NV_fence(); #endif #ifdef GL_NV_float_buffer glewPrintExt("GL_NV_float_buffer", glew.NV_float_buffer); #endif #ifdef GL_NV_fog_distance glewPrintExt("GL_NV_fog_distance", glew.NV_fog_distance); #endif #ifdef GL_NV_fragment_program glewInfo_NV_fragment_program(); #endif #ifdef GL_NV_half_float glewPrintExt("GL_NV_half_float", glew.NV_half_float); #endif #ifdef GL_NV_light_max_exponent glewPrintExt("GL_NV_light_max_exponent", glew.NV_light_max_exponent); #endif #ifdef GL_NV_multisample_filter_hint glewPrintExt("GL_NV_multisample_filter_hint", glew.NV_multisample_filter_hint); #endif #ifdef GL_NV_occlusion_query glewInfo_NV_occlusion_query(); #endif #ifdef GL_NV_packed_depth_stencil glewPrintExt("GL_NV_packed_depth_stencil", glew.NV_packed_depth_stencil); #endif #ifdef GL_NV_pixel_data_range glewInfo_NV_pixel_data_range(); #endif #ifdef GL_NV_point_sprite glewInfo_NV_point_sprite(); #endif #ifdef GL_NV_primitive_restart glewInfo_NV_primitive_restart(); #endif #ifdef GL_NV_register_combiners glewInfo_NV_register_combiners(); #endif #ifdef GL_NV_register_combiners2 glewInfo_NV_register_combiners2(); #endif #ifdef GL_NV_texgen_emboss glewPrintExt("GL_NV_texgen_emboss", glew.NV_texgen_emboss); #endif #ifdef GL_NV_texgen_reflection glewPrintExt("GL_NV_texgen_reflection", glew.NV_texgen_reflection); #endif #ifdef GL_NV_texture_compression_vtc glewPrintExt("GL_NV_texture_compression_vtc", glew.NV_texture_compression_vtc); #endif #ifdef GL_NV_texture_env_combine4 glewPrintExt("GL_NV_texture_env_combine4", glew.NV_texture_env_combine4); #endif #ifdef GL_NV_texture_rectangle glewPrintExt("GL_NV_texture_rectangle", glew.NV_texture_rectangle); #endif #ifdef GL_NV_texture_shader glewPrintExt("GL_NV_texture_shader", glew.NV_texture_shader); #endif #ifdef GL_NV_texture_shader2 glewPrintExt("GL_NV_texture_shader2", glew.NV_texture_shader2); #endif #ifdef GL_NV_texture_shader3 glewPrintExt("GL_NV_texture_shader3", glew.NV_texture_shader3); #endif #ifdef GL_NV_vertex_array_range glewInfo_NV_vertex_array_range(); #endif #ifdef GL_NV_vertex_array_range2 glewPrintExt("GL_NV_vertex_array_range2", glew.NV_vertex_array_range2); #endif #ifdef GL_NV_vertex_program glewInfo_NV_vertex_program(); #endif #ifdef GL_NV_vertex_program1_1 glewPrintExt("GL_NV_vertex_program1_1", glew.NV_vertex_program1_1); #endif #ifdef GL_NV_vertex_program2 glewPrintExt("GL_NV_vertex_program2", glew.NV_vertex_program2); #endif } /* ------------------------------------------------------------------------ */ #ifdef _WIN32 static void wglewInfo () { #ifdef WGL_ARB_buffer_region wglewInfo_ARB_buffer_region(); #endif #ifdef WGL_ARB_make_current_read wglewInfo_ARB_make_current_read(); #endif #ifdef WGL_ARB_multisample glewPrintExt("WGL_ARB_multisample", wglew.ARB_multisample); #endif #ifdef WGL_ARB_pbuffer wglewInfo_ARB_pbuffer(); #endif #ifdef WGL_ARB_pixel_format wglewInfo_ARB_pixel_format(); #endif #ifdef WGL_ARB_render_texture wglewInfo_ARB_render_texture(); #endif #ifdef WGL_EXT_depth_float glewPrintExt("WGL_EXT_depth_float", wglew.EXT_depth_float); #endif #ifdef WGL_EXT_display_color_table wglewInfo_EXT_display_color_table(); #endif #ifdef WGL_EXT_make_current_read wglewInfo_EXT_make_current_read(); #endif #ifdef WGL_EXT_multisample glewPrintExt("WGL_EXT_multisample", wglew.EXT_multisample); #endif #ifdef WGL_EXT_pixel_format wglewInfo_EXT_pixel_format(); #endif #ifdef WGL_EXT_pbuffer wglewInfo_EXT_pbuffer(); #endif #ifdef WGL_EXT_swap_control wglewInfo_EXT_swap_control(); #endif #ifdef WGL_I3D_digital_video_control wglewInfo_I3D_digital_video_control(); #endif #ifdef WGL_I3D_gamma wglewInfo_I3D_gamma(); #endif #ifdef WGL_I3D_genlock wglewInfo_I3D_genlock(); #endif #ifdef WGL_I3D_image_buffer wglewInfo_I3D_image_buffer(); #endif #ifdef WGL_I3D_swap_frame_lock wglewInfo_I3D_swap_frame_lock(); #endif #ifdef WGL_I3D_swap_frame_usage wglewInfo_I3D_swap_frame_usage(); #endif #ifdef WGL_OML_sync_control wglewInfo_OML_sync_control(); #endif #ifdef WGL_ATI_pixel_format_float glewPrintExt("WGL_ATI_pixel_format_float", wglew.ATI_pixel_format_float); #endif #ifdef WGL_NV_float_buffer glewPrintExt("WGL_NV_float_buffer", wglew.NV_float_buffer); #endif #ifdef WGL_NV_render_depth_texture glewPrintExt("WGL_NV_render_depth_texture", wglew.NV_render_depth_texture); #endif #ifdef WGL_NV_render_texture_rectangle glewPrintExt("WGL_NV_render_texture_rectangle", wglew.NV_render_texture_rectangle); #endif #ifdef WGL_NV_vertex_array_range wglewInfo_NV_vertex_array_range(); #endif } #else /* _UNIX */ static void glxewInfo () { #ifdef GLX_VERSION_1_0 glxewInfo_10(); #endif #ifdef GLX_VERSION_1_1 glxewInfo_11(); #endif #ifdef GLX_VERSION_1_2 glxewInfo_12(); #endif #ifdef GLX_VERSION_1_3 glxewInfo_13(); #endif #ifdef GLX_VERSION_1_4 glewPrintExt("GLX_14", glxew.GLX_14); #endif #ifdef GLX_ARB_get_proc_address glewPrintExt("GLX_ARB_get_proc_address", glxew.ARB_get_proc_address); #endif #ifdef GLX_ARB_multisample glewPrintExt("GLX_ARB_multisample", glxew.ARB_multisample); #endif #ifdef GLX_EXT_import_context glxewInfo_EXT_import_context(); #endif #ifdef GLX_EXT_visual_info glewPrintExt("GLX_EXT_visual_info", glxew.EXT_visual_info); #endif #ifdef GLX_EXT_visual_rating glewPrintExt("GLX_EXT_visual_rating", glxew.EXT_visual_rating); #endif #ifdef GLX_MESA_copy_sub_buffer glxewInfo_MESA_copy_sub_buffer(); #endif #ifdef GLX_MESA_pixmap_colormap glxewInfo_MESA_pixmap_colormap(); #endif #ifdef GLX_MESA_release_buffers glxewInfo_MESA_release_buffers(); #endif #ifdef GLX_MESA_set_3dfx_mode glxewInfo_MESA_set_3dfx_mode(); #endif #ifdef GLX_NV_vertex_array_range glxewInfo_NV_vertex_array_range(); #endif #ifdef GLX_OML_swap_method glewPrintExt("GLX_OML_swap_method", glxew.OML_swap_method); #endif #ifdef GLX_OML_sync_control #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) glxewInfo_OML_sync_control(); #endif /* __STDC_VERSION__ */ #endif #ifdef GLX_SGI_cushion glxewInfo_SGI_cushion(); #endif #ifdef GLX_SGI_make_current_read glxewInfo_SGI_make_current_read(); #endif #ifdef GLX_SGI_swap_control glxewInfo_SGI_swap_control(); #endif #ifdef GLX_SGI_video_sync glxewInfo_SGI_video_sync(); #endif #ifdef GLX_SGIS_blended_overlay glewPrintExt("GLX_SGIS_blended_overlay", glxew.SGIS_blended_overlay); #endif #ifdef GLX_SGIS_multisample glewPrintExt("GLX_SGIS_multisample", glxew.SGIS_multisample); #endif #ifdef GLX_SGIS_shared_multisample glewPrintExt("GLX_SGIS_shared_multisample", glxew.SGIS_shared_multisample); #endif #ifdef GLX_SGIX_fbconfig glxewInfo_SGIX_fbconfig(); #endif #ifdef GLX_SGIX_pbuffer glxewInfo_SGIX_pbuffer(); #endif #ifdef GLX_SGIX_swap_barrier glxewInfo_SGIX_swap_barrier(); #endif #ifdef GLX_SGIX_swap_group glxewInfo_SGIX_swap_group(); #endif #ifdef GLX_SGIX_visual_select_group glewPrintExt("GLX_SGIX_visual_select_group", glxew.SGIX_visual_select_group); #endif #ifdef GLX_SUN_get_transparent_index glxewInfo_SUN_get_transparent_index(); #endif } #endif /* _WIN32 */ /* ------------------------------------------------------------------------ */ int main (int argc, char** argv) { GLint err; glutInit(&argc, argv); glutCreateWindow("GLEW Extension Info"); glewExperimental = GL_TRUE; err = glewInit(); if (GLEW_OK != err) { fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err)); return 1; } f = fopen("glewinfo.txt", "w"); if (f == NULL) f = stdout; fprintf(f, "---------------------------\n"); fprintf(f, " GLEW Extension Info\n"); fprintf(f, "---------------------------\n\n"); fprintf(f, "Running on a %s from %s\n", glGetString(GL_RENDERER), glGetString(GL_VENDOR)); fprintf(f, "OpenGL version %s is supported\n", glGetString(GL_VERSION)); glewInfo(); #ifdef WIN32 wglewInfo(); #else glxewInfo(); #endif if (f != stdout) fclose(f); return 0; }