Merge pull request #157 from thefiddler/warnfix

Fix all build warnings on VS2013 and Mono 3.4.0
This commit is contained in:
thefiddler 2014-07-21 18:05:20 +02:00
commit 2a84104262
93 changed files with 614 additions and 1492 deletions

View file

@ -505,6 +505,10 @@ namespace Bind
sw.WriteLine("/// </summary>"); sw.WriteLine("/// </summary>");
} }
if (@enum.IsObsolete)
sw.WriteLine("[Obsolete(\"{0}\")]", @enum.Obsolete);
if (!@enum.CLSCompliant)
sw.WriteLine("[CLSCompliant(false)]");
if (@enum.IsFlagCollection) if (@enum.IsFlagCollection)
sw.WriteLine("[Flags]"); sw.WriteLine("[Flags]");
sw.WriteLine("public enum " + @enum.Name + " : " + @enum.Type); sw.WriteLine("public enum " + @enum.Name + " : " + @enum.Type);

View file

@ -98,6 +98,25 @@ namespace Bind
e.Name = name; e.Name = name;
processed_enums.Add(e.Name, e); processed_enums.Add(e.Name, e);
} }
// Mark enums differing only in case as not CLS-compliant.
var list = enums.Values.ToList();
while (list.Count > 0)
{
var e1 = list.Last();
list.RemoveAt(list.Count - 1);
var e2 = list.FirstOrDefault(l => String.Compare(e1.Name, l.Name, true) == 0);
if (e2 != null)
{
e1.CLSCompliant = false;
e2.CLSCompliant = false;
}
}
foreach (var e in enums.Values)
{
}
return processed_enums; return processed_enums;
} }

View file

@ -4936,12 +4936,12 @@
<!-- Enums from old ESCL parser --> <!-- Enums from old ESCL parser -->
<!-- Required for OpenTK 1.0 compatibility --> <!-- Required for OpenTK 1.0 compatibility -->
<enum name="Amdcompressed3Dctexture"> <enum name="Amdcompressed3Dctexture" obsolete="Use enum with correct capitalisation instead.">
<token name="3DC_X_AMD" value="0x87F9" /> <token name="3DC_X_AMD" value="0x87F9" />
<token name="3DC_XY_AMD" value="0x87FA" /> <token name="3DC_XY_AMD" value="0x87FA" />
<token name="AMD_compressed_3DC_texture" value="1" /> <token name="AMD_compressed_3DC_texture" value="1" />
</enum> </enum>
<enum name="AmdcompressedAtctexture"> <enum name="AmdcompressedAtctexture" obsolete="Use enum with correct capitalisation instead.">
<token name="AMD_compressed_ATC_texture" value="1" /> <token name="AMD_compressed_ATC_texture" value="1" />
<token name="ATC_RGB_AMD" value="0x8C92" /> <token name="ATC_RGB_AMD" value="0x8C92" />
<token name="ATC_RGBA_EXPLICIT_ALPHA_AMD" value="0x8C93" /> <token name="ATC_RGBA_EXPLICIT_ALPHA_AMD" value="0x8C93" />
@ -4961,29 +4961,29 @@
<token name="TEXTURE_COORD_ARRAY_BUFFER_BINDING" value="0x889A" /> <token name="TEXTURE_COORD_ARRAY_BUFFER_BINDING" value="0x889A" />
<token name="VERTEX_ARRAY_BUFFER_BINDING" value="0x8896" /> <token name="VERTEX_ARRAY_BUFFER_BINDING" value="0x8896" />
</enum> </enum>
<enum name="EXTTextureFilterAnisotropic"> <enum name="EXTTextureFilterAnisotropic" obsolete="Use enum with correct capitalisation instead.">
<token name="EXT_texture_filter_anisotropic" value="1" /> <token name="EXT_texture_filter_anisotropic" value="1" />
<token name="MAX_TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FF" /> <token name="MAX_TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FF" />
<token name="TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FE" /> <token name="TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FE" />
</enum> </enum>
<enum name="EXTTextureFormatBGRA8888"> <enum name="EXTTextureFormatBGRA8888" obsolete="Use enum with correct capitalisation instead.">
<token name="BGRA" value="0x80E1" /> <token name="BGRA" value="0x80E1" />
<token name="EXT_texture_format_BGRA8888" value="1" /> <token name="EXT_texture_format_BGRA8888" value="1" />
</enum> </enum>
<enum name="IMGReadFormat"> <enum name="IMGReadFormat" obsolete="Use enum with correct capitalisation instead.">
<token name="BGRA" value="0x80E1" /> <token name="BGRA" value="0x80E1" />
<token name="IMG_read_format" value="1" /> <token name="IMG_read_format" value="1" />
<token name="UNSIGNED_SHORT_1_5_5_5_REV" value="0x8366" /> <token name="UNSIGNED_SHORT_1_5_5_5_REV" value="0x8366" />
<token name="UNSIGNED_SHORT_4_4_4_4_REV" value="0x8365" /> <token name="UNSIGNED_SHORT_4_4_4_4_REV" value="0x8365" />
</enum> </enum>
<enum name="IMGTextureCompressionPvrtc"> <enum name="IMGTextureCompressionPvrtc" obsolete="Use enum with correct capitalisation instead.">
<token name="COMPRESSED_RGB_PVRTC_2BPPV1_IMG" value="0x8C01" /> <token name="COMPRESSED_RGB_PVRTC_2BPPV1_IMG" value="0x8C01" />
<token name="COMPRESSED_RGB_PVRTC_4BPPV1_IMG" value="0x8C00" /> <token name="COMPRESSED_RGB_PVRTC_4BPPV1_IMG" value="0x8C00" />
<token name="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG" value="0x8C03" /> <token name="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG" value="0x8C03" />
<token name="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG" value="0x8C02" /> <token name="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG" value="0x8C02" />
<token name="IMG_texture_compression_pvrtc" value="1" /> <token name="IMG_texture_compression_pvrtc" value="1" />
</enum> </enum>
<enum name="IMGTextureEnvEnhancedFixedFunction"> <enum name="IMGTextureEnvEnhancedFixedFunction" obsolete="Use enum with correct capitalisation instead.">
<token name="ADD_BLEND_IMG" value="0x8C09" /> <token name="ADD_BLEND_IMG" value="0x8C09" />
<token name="DOT3_RGBA_IMG" value="0x86AF" /> <token name="DOT3_RGBA_IMG" value="0x86AF" />
<token name="FACTOR_ALPHA_MODULATE_IMG" value="0x8C07" /> <token name="FACTOR_ALPHA_MODULATE_IMG" value="0x8C07" />
@ -4993,7 +4993,7 @@
<token name="RECIP_ADD_SIGNED_ALPHA_IMG" value="0x8C05" /> <token name="RECIP_ADD_SIGNED_ALPHA_IMG" value="0x8C05" />
<token name="TEXTURE_ALPHA_MODULATE_IMG" value="0x8C06" /> <token name="TEXTURE_ALPHA_MODULATE_IMG" value="0x8C06" />
</enum> </enum>
<enum name="IMGUserClipPlane"> <enum name="IMGUserClipPlane" obsolete="Use enum with correct capitalisation instead.">
<token name="CLIP_PLANE0_IMG" value="0x3000" /> <token name="CLIP_PLANE0_IMG" value="0x3000" />
<token name="CLIP_PLANE1_IMG" value="0x3001" /> <token name="CLIP_PLANE1_IMG" value="0x3001" />
<token name="CLIP_PLANE2_IMG" value="0x3002" /> <token name="CLIP_PLANE2_IMG" value="0x3002" />
@ -5003,39 +5003,39 @@
<token name="IMG_user_clip_plane" value="1" /> <token name="IMG_user_clip_plane" value="1" />
<token name="MAX_CLIP_PLANES_IMG" value="0x0D32" /> <token name="MAX_CLIP_PLANES_IMG" value="0x0D32" />
</enum> </enum>
<enum name="NVFence"> <enum name="NVFence" obsolete="Use enum with correct capitalisation instead.">
<token name="ALL_COMPLETED_NV" value="0x84F2" /> <token name="ALL_COMPLETED_NV" value="0x84F2" />
<token name="FENCE_CONDITION_NV" value="0x84F4" /> <token name="FENCE_CONDITION_NV" value="0x84F4" />
<token name="FENCE_STATUS_NV" value="0x84F3" /> <token name="FENCE_STATUS_NV" value="0x84F3" />
<token name="NV_fence" value="1" /> <token name="NV_fence" value="1" />
</enum> </enum>
<enum name="OesblendEquationSeparate"> <enum name="OesblendEquationSeparate" obsolete="Use enum with correct capitalisation instead.">
<token name="BLEND_EQUATION_ALPHA_OES" value="0x883D" /> <token name="BLEND_EQUATION_ALPHA_OES" value="0x883D" />
<token name="BLEND_EQUATION_RGB_OES" value="0x8009" /> <token name="BLEND_EQUATION_RGB_OES" value="0x8009" />
<token name="OES_blend_equation_separate" value="1" /> <token name="OES_blend_equation_separate" value="1" />
</enum> </enum>
<enum name="OesblendFuncSeparate"> <enum name="OesblendFuncSeparate" obsolete="Use enum with correct capitalisation instead.">
<token name="BLEND_DST_ALPHA_OES" value="0x80CA" /> <token name="BLEND_DST_ALPHA_OES" value="0x80CA" />
<token name="BLEND_DST_RGB_OES" value="0x80C8" /> <token name="BLEND_DST_RGB_OES" value="0x80C8" />
<token name="BLEND_SRC_ALPHA_OES" value="0x80CB" /> <token name="BLEND_SRC_ALPHA_OES" value="0x80CB" />
<token name="BLEND_SRC_RGB_OES" value="0x80C9" /> <token name="BLEND_SRC_RGB_OES" value="0x80C9" />
<token name="OES_blend_func_separate" value="1" /> <token name="OES_blend_func_separate" value="1" />
</enum> </enum>
<enum name="OesblendSubtract"> <enum name="OesblendSubtract" obsolete="Use enum with correct capitalisation instead.">
<token name="BLEND_EQUATION_OES" value="0x8009" /> <token name="BLEND_EQUATION_OES" value="0x8009" />
<token name="FUNC_ADD_OES" value="0x8006" /> <token name="FUNC_ADD_OES" value="0x8006" />
<token name="FUNC_REVERSE_SUBTRACT_OES" value="0x800B" /> <token name="FUNC_REVERSE_SUBTRACT_OES" value="0x800B" />
<token name="FUNC_SUBTRACT_OES" value="0x800A" /> <token name="FUNC_SUBTRACT_OES" value="0x800A" />
<token name="OES_blend_subtract" value="1" /> <token name="OES_blend_subtract" value="1" />
</enum> </enum>
<enum name="OesbyteCoordinates"> <enum name="OesbyteCoordinates" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_byte_coordinates" value="1" /> <token name="OES_byte_coordinates" value="1" />
</enum> </enum>
<enum name="OescompressedEtc1Rgb8Texture"> <enum name="OescompressedEtc1Rgb8Texture" obsolete="Use enum with correct capitalisation instead.">
<token name="ETC1_RGB8_OES" value="0x8D64" /> <token name="ETC1_RGB8_OES" value="0x8D64" />
<token name="OES_compressed_ETC1_RGB8_texture" value="1" /> <token name="OES_compressed_ETC1_RGB8_texture" value="1" />
</enum> </enum>
<enum name="OescompressedPalettedTexture"> <enum name="OescompressedPalettedTexture" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_compressed_paletted_texture" value="1" /> <token name="OES_compressed_paletted_texture" value="1" />
<token name="PALETTE4_R5_G6_B5_OES" value="0x8B92" /> <token name="PALETTE4_R5_G6_B5_OES" value="0x8B92" />
<token name="PALETTE4_RGB5_A1_OES" value="0x8B94" /> <token name="PALETTE4_RGB5_A1_OES" value="0x8B94" />
@ -5048,35 +5048,35 @@
<token name="PALETTE8_RGBA4_OES" value="0x8B98" /> <token name="PALETTE8_RGBA4_OES" value="0x8B98" />
<token name="PALETTE8_RGBA8_OES" value="0x8B96" /> <token name="PALETTE8_RGBA8_OES" value="0x8B96" />
</enum> </enum>
<enum name="Oesdepth24"> <enum name="Oesdepth24" obsolete="Use enum with correct capitalisation instead.">
<token name="DEPTH_COMPONENT24_OES" value="0x81A6" /> <token name="DEPTH_COMPONENT24_OES" value="0x81A6" />
<token name="OES_depth24" value="1" /> <token name="OES_depth24" value="1" />
</enum> </enum>
<enum name="Oesdepth32"> <enum name="Oesdepth32" obsolete="Use enum with correct capitalisation instead.">
<token name="DEPTH_COMPONENT32_OES" value="0x81A7" /> <token name="DEPTH_COMPONENT32_OES" value="0x81A7" />
<token name="OES_depth32" value="1" /> <token name="OES_depth32" value="1" />
</enum> </enum>
<enum name="OesdrawTexture"> <enum name="OesdrawTexture" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_draw_texture" value="1" /> <token name="OES_draw_texture" value="1" />
<token name="TEXTURE_CROP_RECT_OES" value="0x8B9D" /> <token name="TEXTURE_CROP_RECT_OES" value="0x8B9D" />
</enum> </enum>
<enum name="Oeseglimage"> <enum name="Oeseglimage" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_EGL_image" value="1" /> <token name="OES_EGL_image" value="1" />
</enum> </enum>
<enum name="OeselementIndexUint"> <enum name="OeselementIndexUint" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_element_index_uint" value="1" /> <token name="OES_element_index_uint" value="1" />
</enum> </enum>
<enum name="OesextendedMatrixPalette"> <enum name="OesextendedMatrixPalette" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_extended_matrix_palette" value="1" /> <token name="OES_extended_matrix_palette" value="1" />
</enum> </enum>
<enum name="OesfboRenderMipmap"> <enum name="OesfboRenderMipmap" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_fbo_render_mipmap" value="1" /> <token name="OES_fbo_render_mipmap" value="1" />
</enum> </enum>
<enum name="OesfixedPoint"> <enum name="OesfixedPoint" obsolete="Use enum with correct capitalisation instead.">
<token name="FIXED_OES" value="0x140C" /> <token name="FIXED_OES" value="0x140C" />
<token name="OES_fixed_point" value="1" /> <token name="OES_fixed_point" value="1" />
</enum> </enum>
<enum name="OesframebufferObject"> <enum name="OesframebufferObject" obsolete="Use enum with correct capitalisation instead.">
<token name="COLOR_ATTACHMENT0_OES" value="0x8CE0" /> <token name="COLOR_ATTACHMENT0_OES" value="0x8CE0" />
<token name="DEPTH_ATTACHMENT_OES" value="0x8D00" /> <token name="DEPTH_ATTACHMENT_OES" value="0x8D00" />
<token name="DEPTH_COMPONENT16_OES" value="0x81A5" /> <token name="DEPTH_COMPONENT16_OES" value="0x81A5" />
@ -5112,20 +5112,20 @@
<token name="RGBA4_OES" value="0x8056" /> <token name="RGBA4_OES" value="0x8056" />
<token name="STENCIL_ATTACHMENT_OES" value="0x8D20" /> <token name="STENCIL_ATTACHMENT_OES" value="0x8D20" />
</enum> </enum>
<enum name="Oesmapbuffer"> <enum name="Oesmapbuffer" obsolete="Use enum with correct capitalisation instead.">
<token name="BUFFER_ACCESS_OES" value="0x88BB" /> <token name="BUFFER_ACCESS_OES" value="0x88BB" />
<token name="BUFFER_MAP_POINTER_OES" value="0x88BD" /> <token name="BUFFER_MAP_POINTER_OES" value="0x88BD" />
<token name="BUFFER_MAPPED_OES" value="0x88BC" /> <token name="BUFFER_MAPPED_OES" value="0x88BC" />
<token name="OES_mapbuffer" value="1" /> <token name="OES_mapbuffer" value="1" />
<token name="WRITE_ONLY_OES" value="0x88B9" /> <token name="WRITE_ONLY_OES" value="0x88B9" />
</enum> </enum>
<enum name="OesmatrixGet"> <enum name="OesmatrixGet" obsolete="Use enum with correct capitalisation instead.">
<token name="MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898D" /> <token name="MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898D" />
<token name="OES_matrix_get" value="1" /> <token name="OES_matrix_get" value="1" />
<token name="PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898E" /> <token name="PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898E" />
<token name="TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898F" /> <token name="TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898F" />
</enum> </enum>
<enum name="OesmatrixPalette"> <enum name="OesmatrixPalette" obsolete="Use enum with correct capitalisation instead.">
<token name="CURRENT_PALETTE_MATRIX_OES" value="0x8843" /> <token name="CURRENT_PALETTE_MATRIX_OES" value="0x8843" />
<token name="MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES" value="0x8B9E" /> <token name="MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES" value="0x8B9E" />
<token name="MATRIX_INDEX_ARRAY_OES" value="0x8844" /> <token name="MATRIX_INDEX_ARRAY_OES" value="0x8844" />
@ -5144,13 +5144,13 @@
<token name="WEIGHT_ARRAY_STRIDE_OES" value="0x86AA" /> <token name="WEIGHT_ARRAY_STRIDE_OES" value="0x86AA" />
<token name="WEIGHT_ARRAY_TYPE_OES" value="0x86A9" /> <token name="WEIGHT_ARRAY_TYPE_OES" value="0x86A9" />
</enum> </enum>
<enum name="OespackedDepthStencil"> <enum name="OespackedDepthStencil" obsolete="Use enum with correct capitalisation instead.">
<token name="DEPTH_STENCIL_OES" value="0x84F9" /> <token name="DEPTH_STENCIL_OES" value="0x84F9" />
<token name="DEPTH24_STENCIL8_OES" value="0x88F0" /> <token name="DEPTH24_STENCIL8_OES" value="0x88F0" />
<token name="OES_packed_depth_stencil" value="1" /> <token name="OES_packed_depth_stencil" value="1" />
<token name="UNSIGNED_INT_24_8_OES" value="0x84FA" /> <token name="UNSIGNED_INT_24_8_OES" value="0x84FA" />
</enum> </enum>
<enum name="OespointSizeArray"> <enum name="OespointSizeArray" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_point_size_array" value="1" /> <token name="OES_point_size_array" value="1" />
<token name="POINT_SIZE_ARRAY_BUFFER_BINDING_OES" value="0x8B9F" /> <token name="POINT_SIZE_ARRAY_BUFFER_BINDING_OES" value="0x8B9F" />
<token name="POINT_SIZE_ARRAY_OES" value="0x8B9C" /> <token name="POINT_SIZE_ARRAY_OES" value="0x8B9C" />
@ -5158,45 +5158,45 @@
<token name="POINT_SIZE_ARRAY_STRIDE_OES" value="0x898B" /> <token name="POINT_SIZE_ARRAY_STRIDE_OES" value="0x898B" />
<token name="POINT_SIZE_ARRAY_TYPE_OES" value="0x898A" /> <token name="POINT_SIZE_ARRAY_TYPE_OES" value="0x898A" />
</enum> </enum>
<enum name="OespointSprite"> <enum name="OespointSprite" obsolete="Use enum with correct capitalisation instead.">
<token name="COORD_REPLACE_OES" value="0x8862" /> <token name="COORD_REPLACE_OES" value="0x8862" />
<token name="OES_point_sprite" value="1" /> <token name="OES_point_sprite" value="1" />
<token name="POINT_SPRITE_OES" value="0x8861" /> <token name="POINT_SPRITE_OES" value="0x8861" />
</enum> </enum>
<enum name="OesqueryMatrix"> <enum name="OesqueryMatrix" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_query_matrix" value="1" /> <token name="OES_query_matrix" value="1" />
</enum> </enum>
<enum name="OesreadFormat"> <enum name="OesreadFormat" obsolete="Use enum with correct capitalisation instead.">
<token name="IMPLEMENTATION_COLOR_READ_FORMAT_OES" value="0x8B9B" /> <token name="IMPLEMENTATION_COLOR_READ_FORMAT_OES" value="0x8B9B" />
<token name="IMPLEMENTATION_COLOR_READ_TYPE_OES" value="0x8B9A" /> <token name="IMPLEMENTATION_COLOR_READ_TYPE_OES" value="0x8B9A" />
<token name="OES_read_format" value="1" /> <token name="OES_read_format" value="1" />
</enum> </enum>
<enum name="Oesrgb8Rgba8"> <enum name="Oesrgb8Rgba8" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_rgb8_rgba8" value="1" /> <token name="OES_rgb8_rgba8" value="1" />
<token name="RGB8_OES" value="0x8051" /> <token name="RGB8_OES" value="0x8051" />
<token name="RGBA8_OES" value="0x8058" /> <token name="RGBA8_OES" value="0x8058" />
</enum> </enum>
<enum name="OessinglePrecision"> <enum name="OessinglePrecision" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_single_precision" value="1" /> <token name="OES_single_precision" value="1" />
</enum> </enum>
<enum name="Oesstencil1"> <enum name="Oesstencil1" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_stencil1" value="1" /> <token name="OES_stencil1" value="1" />
<token name="STENCIL_INDEX1_OES" value="0x8D46" /> <token name="STENCIL_INDEX1_OES" value="0x8D46" />
</enum> </enum>
<enum name="Oesstencil4"> <enum name="Oesstencil4" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_stencil4" value="1" /> <token name="OES_stencil4" value="1" />
<token name="STENCIL_INDEX4_OES" value="0x8D47" /> <token name="STENCIL_INDEX4_OES" value="0x8D47" />
</enum> </enum>
<enum name="Oesstencil8"> <enum name="Oesstencil8" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_stencil8" value="1" /> <token name="OES_stencil8" value="1" />
<token name="STENCIL_INDEX8_OES" value="0x8D48" /> <token name="STENCIL_INDEX8_OES" value="0x8D48" />
</enum> </enum>
<enum name="OesstencilWrap"> <enum name="OesstencilWrap" obsolete="Use enum with correct capitalisation instead.">
<token name="DECR_WRAP_OES" value="0x8508" /> <token name="DECR_WRAP_OES" value="0x8508" />
<token name="INCR_WRAP_OES" value="0x8507" /> <token name="INCR_WRAP_OES" value="0x8507" />
<token name="OES_stencil_wrap" value="1" /> <token name="OES_stencil_wrap" value="1" />
</enum> </enum>
<enum name="OestextureCubeMap"> <enum name="OestextureCubeMap" obsolete="Use enum with correct capitalisation instead.">
<token name="MAX_CUBE_MAP_TEXTURE_SIZE_OES" value="0x851C" /> <token name="MAX_CUBE_MAP_TEXTURE_SIZE_OES" value="0x851C" />
<token name="NORMAL_MAP_OES" value="0x8511" /> <token name="NORMAL_MAP_OES" value="0x8511" />
<token name="OES_texture_cube_map" value="1" /> <token name="OES_texture_cube_map" value="1" />
@ -5212,27 +5212,27 @@
<token name="TEXTURE_GEN_MODE_OES" value="0x2500" /> <token name="TEXTURE_GEN_MODE_OES" value="0x2500" />
<token name="TEXTURE_GEN_STR_OES" value="0x8D60" /> <token name="TEXTURE_GEN_STR_OES" value="0x8D60" />
</enum> </enum>
<enum name="OestextureEnvCrossbar"> <enum name="OestextureEnvCrossbar" obsolete="Use enum with correct capitalisation instead.">
<token name="OES_texture_env_crossbar" value="1" /> <token name="OES_texture_env_crossbar" value="1" />
</enum> </enum>
<enum name="OestextureMirroredRepeat"> <enum name="OestextureMirroredRepeat" obsolete="Use enum with correct capitalisation instead.">
<token name="MIRRORED_REPEAT_OES" value="0x8370" /> <token name="MIRRORED_REPEAT_OES" value="0x8370" />
<token name="OES_texture_mirrored_repeat" value="1" /> <token name="OES_texture_mirrored_repeat" value="1" />
</enum> </enum>
<enum name="OpenGlescoreVersions"> <enum name="OpenGlescoreVersions" obsolete="Use enum with correct capitalisation instead.">
<token name="VERSION_ES_CL_1_0" value="1" /> <token name="VERSION_ES_CL_1_0" value="1" />
<token name="VERSION_ES_CL_1_1" value="1" /> <token name="VERSION_ES_CL_1_1" value="1" />
<token name="VERSION_ES_CM_1_0" value="1" /> <token name="VERSION_ES_CM_1_0" value="1" />
<token name="VERSION_ES_CM_1_1" value="1" /> <token name="VERSION_ES_CM_1_1" value="1" />
</enum> </enum>
<enum name="QcomdriverControl"> <enum name="QcomdriverControl" obsolete="Use enum with correct capitalisation instead.">
<token name="QCOM_driver_control" value="1" /> <token name="QCOM_driver_control" value="1" />
</enum> </enum>
<enum name="QcomperfmonGlobalMode"> <enum name="QcomperfmonGlobalMode" obsolete="Use enum with correct capitalisation instead.">
<token name="PERFMON_GLOBAL_MODE_QCOM" value="0x8FA0" /> <token name="PERFMON_GLOBAL_MODE_QCOM" value="0x8FA0" />
<token name="QCOM_perfmon_global_mode" value="1" /> <token name="QCOM_perfmon_global_mode" value="1" />
</enum> </enum>
<enum name="TextureCombineDot3"> <enum name="TextureCombineDot3" obsolete="Use enum with correct capitalisation instead.">
<token name="ADD_SIGNED" value="0x8574" /> <token name="ADD_SIGNED" value="0x8574" />
<token name="ALPHA_SCALE" value="0x0D1C" /> <token name="ALPHA_SCALE" value="0x0D1C" />
<token name="COMBINE" value="0x8570" /> <token name="COMBINE" value="0x8570" />

View file

@ -53,7 +53,7 @@ namespace Bind.Structures
DeprecatedVersion = d.DeprecatedVersion; DeprecatedVersion = d.DeprecatedVersion;
EntryPoint = d.EntryPoint; EntryPoint = d.EntryPoint;
Obsolete = d.Obsolete; Obsolete = d.Obsolete;
CLSCompliant = d.CLSCompliant; cls_compliance_overriden = d.cls_compliance_overriden;
Slot = d.Slot; Slot = d.Slot;
} }

View file

@ -19,6 +19,11 @@ namespace Bind.Structures
{ {
string _name, _type; string _name, _type;
public Enum()
{
CLSCompliant = true;
}
// Returns true if the enum contains a collection of flags, i.e. 1, 2, 4, 8, ... // Returns true if the enum contains a collection of flags, i.e. 1, 2, 4, 8, ...
public bool IsFlagCollection public bool IsFlagCollection
{ {
@ -69,6 +74,11 @@ namespace Bind.Structures
{ {
ConstantCollection.Add(constant.Name, constant); ConstantCollection.Add(constant.Name, constant);
} }
public string Obsolete { get; set; }
public bool IsObsolete { get { return !String.IsNullOrEmpty(Obsolete); } }
public bool CLSCompliant { get; set; }
} }
#endregion #endregion

View file

@ -353,6 +353,8 @@ namespace Bind
Type = node.GetAttribute("type", String.Empty).Trim() Type = node.GetAttribute("type", String.Empty).Trim()
}; };
e.Obsolete = node.GetAttribute("obsolete", String.Empty).Trim();
if (String.IsNullOrEmpty(e.Name)) if (String.IsNullOrEmpty(e.Name))
throw new InvalidOperationException(String.Format("Empty name for enum element {0}", node.ToString())); throw new InvalidOperationException(String.Format("Empty name for enum element {0}", node.ToString()));

View file

@ -471,7 +471,7 @@
<Link>OpenTK.snk</Link> <Link>OpenTK.snk</Link>
</None> </None>
<None Include="OpenTK.Compatibility.dll.config"> <None Include="OpenTK.Compatibility.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

View file

@ -29,6 +29,8 @@ using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security; using System.Security;
#pragma warning disable 169 // private field is never used
namespace Tao.OpenGl namespace Tao.OpenGl
{ {
#region Class Documentation #region Class Documentation

View file

@ -198,10 +198,6 @@ namespace CHeaderToXML
var parameters_string = Regex.Match(line, @"\(.*\)").Captures[0].Value.TrimStart('(').TrimEnd(')'); var parameters_string = Regex.Match(line, @"\(.*\)").Captures[0].Value.TrimStart('(').TrimEnd(')');
var parameters =
(from item in get_param.Matches(parameters_string).OfType<Match>()
select item.Captures[0].Value.TrimEnd(',')).ToList();
var fun = var fun =
new new
{ {

View file

@ -146,8 +146,6 @@ namespace CHeaderToXML
.Concat(groups) .Concat(groups)
.OrderBy(f => TrimName(f.Attribute("name").Value))) .OrderBy(f => TrimName(f.Attribute("name").Value)))
{ {
var category = TrimName(feature.Attribute("name").Value);
var extension = feature.Name == "extension" ? category.Substring(0, category.IndexOf("_")) : "Core";
var version = feature.Attribute("number") != null ? feature.Attribute("number").Value : null; var version = feature.Attribute("number") != null ? feature.Attribute("number").Value : null;
var apinames = GetApiNames(feature); var apinames = GetApiNames(feature);

View file

@ -10,6 +10,8 @@ using System.IO;
using OpenTK.Audio; using OpenTK.Audio;
using OpenTK.Audio.OpenAL; using OpenTK.Audio.OpenAL;
#pragma warning disable 219 // variable assigned but never used, we do that on purpose
namespace Examples namespace Examples
{ {
[Example("Playback", ExampleCategory.OpenAL, "1.1", Documentation="Playback")] [Example("Playback", ExampleCategory.OpenAL, "1.1", Documentation="Playback")]

View file

@ -453,7 +453,7 @@ namespace Examples
foreach (XRamExtension.XRamStorage m in storagemodes) foreach (XRamExtension.XRamStorage m in storagemodes)
{ {
bool result = XRam.SetBufferMode(1, ref buffer, m); XRam.SetBufferMode(1, ref buffer, m);
BufferModes.Add(m.ToString(), m == XRam.GetBufferMode(ref buffer)); BufferModes.Add(m.ToString(), m == XRam.GetBufferMode(ref buffer));
} }

View file

@ -72,7 +72,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
Exit(); Exit();
} }

View file

@ -112,7 +112,8 @@ namespace Examples.Tutorial
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
} }

View file

@ -21,8 +21,6 @@ namespace Examples.Tutorial
{ {
} }
Font sans = new Font(System.Drawing.FontFamily.GenericSansSerif, 16.0f);
uint ColorTexture; uint ColorTexture;
uint DepthTexture; uint DepthTexture;
uint FBOHandle; uint FBOHandle;
@ -220,7 +218,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
this.Exit(); this.Exit();
} }

View file

@ -88,7 +88,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
return; return;

View file

@ -411,7 +411,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
Exit(); Exit();
} }

View file

@ -24,11 +24,19 @@ namespace Examples.Tutorial
[Example("Picking", ExampleCategory.OpenGL, "1.x", Documentation = "Picking")] [Example("Picking", ExampleCategory.OpenGL, "1.x", Documentation = "Picking")]
class Picking : GameWindow class Picking : GameWindow
{ {
int mouse_x, mouse_y;
/// <summary>Creates a 800x600 window with the specified title.</summary> /// <summary>Creates a 800x600 window with the specified title.</summary>
public Picking() public Picking()
: base(800, 600, GraphicsMode.Default, "Picking", GameWindowFlags.Default, DisplayDevice.Default, 1, 1, GraphicsContextFlags.Default) : base(800, 600, GraphicsMode.Default, "Picking", GameWindowFlags.Default, DisplayDevice.Default, 1, 1, GraphicsContextFlags.Default)
{ {
VSync = VSyncMode.On; VSync = VSyncMode.On;
MouseMove += (sender, e) =>
{
mouse_x = e.X;
mouse_y = e.Y;
};
} }
struct Byte4 struct Byte4
@ -192,7 +200,6 @@ namespace Examples.Tutorial
GL.UseProgram(0); GL.UseProgram(0);
*/ */
#endregion Shader #endregion Shader
} }
protected override void OnUnload(EventArgs e) protected override void OnUnload(EventArgs e)
@ -224,7 +231,8 @@ namespace Examples.Tutorial
/// <param name="e">Contains timing information for framerate independent logic.</param> /// <param name="e">Contains timing information for framerate independent logic.</param>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
Exit(); Exit();
} }
@ -256,7 +264,7 @@ namespace Examples.Tutorial
// Read Pixel under mouse cursor // Read Pixel under mouse cursor
Byte4 Pixel = new Byte4(); Byte4 Pixel = new Byte4();
GL.ReadPixels(Mouse.X, this.Height - Mouse.Y, 1, 1, PixelFormat.Rgba, PixelType.UnsignedByte, ref Pixel); GL.ReadPixels(mouse_x, this.Height - mouse_y, 1, 1, PixelFormat.Rgba, PixelType.UnsignedByte, ref Pixel);
SelectedTriangle = Pixel.ToUInt32(); SelectedTriangle = Pixel.ToUInt32();
#endregion Pass 1: Draw Object and pick Triangle #endregion Pass 1: Draw Object and pick Triangle

View file

@ -42,7 +42,7 @@ namespace Examples.Tutorial
: base(800, 600, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 24, 8)) // request 8-bit stencil buffer : base(800, 600, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 24, 8)) // request 8-bit stencil buffer
{ {
base.VSync = VSyncMode.Off; base.VSync = VSyncMode.Off;
Keyboard.KeyDown += delegate(object sender, KeyboardKeyEventArgs e) KeyDown += delegate(object sender, KeyboardKeyEventArgs e)
{ {
switch (e.Key) switch (e.Key)
{ {
@ -174,11 +174,10 @@ namespace Examples.Tutorial
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
#region Magic numbers for camera var mouse = OpenTK.Input.Mouse.GetState();
CameraRotX = -Mouse.X * .5f; CameraRotX = -mouse.X * .5f;
CameraRotY = Mouse.Y * .5f; CameraRotY = mouse.Y * .5f;
CameraZoom = Mouse.Wheel * .2f; CameraZoom = mouse.Wheel * .2f;
#endregion Magic numbers for camera
} }
public void DrawOperandB() public void DrawOperandB()

View file

@ -215,7 +215,8 @@ namespace Examples.Tutorial
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
} }

View file

@ -18,6 +18,7 @@ namespace Examples.Tutorial
class TextureMatrix : GameWindow class TextureMatrix : GameWindow
{ {
Vector2 orientation;
public TextureMatrix() public TextureMatrix()
: base(800, 600, new GraphicsMode(32, 16, 0, 4)) : base(800, 600, new GraphicsMode(32, 16, 0, 4))
@ -89,8 +90,12 @@ namespace Examples.Tutorial
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
Exit(); Exit();
var mouse = OpenTK.Input.Mouse.GetState();
orientation = new Vector2(mouse.X, mouse.Y);
} }
protected override void OnRenderFrame(FrameEventArgs e) protected override void OnRenderFrame(FrameEventArgs e)
@ -107,9 +112,10 @@ namespace Examples.Tutorial
GL.Translate(0f, 0f, 1.5f); GL.Translate(0f, 0f, 1.5f);
GL.Rotate(Mouse.X, Vector3.UnitY); GL.Rotate(orientation.X, Vector3.UnitY);
GL.Rotate(Mouse.Y, Vector3.UnitX); GL.Rotate(orientation.Y, Vector3.UnitX);
GL.BindTexture(TextureTarget.Texture2D, Texture);
GL.CallList(list); GL.CallList(list);
SwapBuffers(); SwapBuffers();

View file

@ -93,7 +93,8 @@ namespace Examples.Tutorial
/// <remarks>There is no need to call the base implementation.</remarks> /// <remarks>There is no need to call the base implementation.</remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
this.Exit(); this.Exit();
} }

View file

@ -136,7 +136,8 @@ namespace Examples.Tutorial
/// <param name="e">Contains timing information for framerate independent logic.</param> /// <param name="e">Contains timing information for framerate independent logic.</param>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Escape])
{ {
Exit(); Exit();
} }

View file

@ -88,7 +88,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
this.Exit(); this.Exit();
} }

View file

@ -36,7 +36,7 @@ namespace Examples.Tutorial
: base(800, 600) : base(800, 600)
{ {
//this.VSync = VSyncMode.On; //this.VSync = VSyncMode.On;
this.Keyboard.KeyUp += Keyboard_KeyUp; KeyUp += Keyboard_KeyUp;
} }
void Keyboard_KeyUp(object sender, KeyboardKeyEventArgs e) void Keyboard_KeyUp(object sender, KeyboardKeyEventArgs e)
@ -107,14 +107,15 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
// Escape quits. var keyboard = OpenTK.Input.Keyboard.GetState();
if (Keyboard[Key.Escape])
if (keyboard[Key.Escape])
{ {
this.Exit(); this.Exit();
return; return;
} }
if (Keyboard[Key.F11]) if (keyboard[Key.F11])
if (WindowState != WindowState.Fullscreen) if (WindowState != WindowState.Fullscreen)
WindowState = WindowState.Fullscreen; WindowState = WindowState.Fullscreen;
else else
@ -122,14 +123,14 @@ namespace Examples.Tutorial
// Plus/Minus change the target render frequency. // Plus/Minus change the target render frequency.
// PageUp/PageDown change the target update frequency. // PageUp/PageDown change the target update frequency.
if (Keyboard[Key.Plus] || Keyboard[Key.KeypadAdd]) TargetRenderFrequency++; if (keyboard[Key.Plus] || keyboard[Key.KeypadAdd]) TargetRenderFrequency++;
if (Keyboard[Key.Minus] || Keyboard[Key.KeypadSubtract]) TargetRenderFrequency--; if (keyboard[Key.Minus] || keyboard[Key.KeypadSubtract]) TargetRenderFrequency--;
if (Keyboard[Key.PageUp]) TargetUpdateFrequency++; if (keyboard[Key.PageUp]) TargetUpdateFrequency++;
if (Keyboard[Key.PageDown]) TargetUpdateFrequency--; if (keyboard[Key.PageDown]) TargetUpdateFrequency--;
// Right/Left control the rotation speed and direction. // Right/Left control the rotation speed and direction.
if (Keyboard[Key.Right]) rotation_speed += 0.5f; if (keyboard[Key.Right]) rotation_speed += 0.5f;
if (Keyboard[Key.Left]) rotation_speed -= 0.5f; if (keyboard[Key.Left]) rotation_speed -= 0.5f;
} }
#endregion #endregion

View file

@ -100,24 +100,27 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
var mouse = OpenTK.Input.Mouse.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
return; return;
} }
if (Keyboard[OpenTK.Input.Key.F11]) if (keyboard[OpenTK.Input.Key.F11])
if (WindowState != WindowState.Fullscreen) if (WindowState != WindowState.Fullscreen)
WindowState = WindowState.Fullscreen; WindowState = WindowState.Fullscreen;
else else
WindowState = WindowState.Normal; WindowState = WindowState.Normal;
if (Mouse[OpenTK.Input.MouseButton.Left]) if (mouse[OpenTK.Input.MouseButton.Left])
x_angle = Mouse.X; x_angle = mouse.X;
else else
x_angle += 0.5f; x_angle += 0.5f;
zoom = Mouse.Wheel * 0.5f; // Mouse.Wheel is broken on both Linux and Windows. zoom = mouse.Wheel * 0.5f; // Mouse.Wheel is broken on both Linux and Windows.
// Do not leave x_angle drift too far away, as this will cause inaccuracies. // Do not leave x_angle drift too far away, as this will cause inaccuracies.
if (x_angle > 360.0f) if (x_angle > 360.0f)

View file

@ -198,19 +198,21 @@ namespace Examples.Tutorial
/// <summary>Add your game logic here.</summary> /// <summary>Add your game logic here.</summary>
/// <param name="e">Contains timing information.</param> /// <param name="e">Contains timing information.</param>
/// <remarks>There is no need to call the base implementation.</remarks> /// <remarks>There is no need to call the base implementation.</remarks>
protected override void OnUpdateFrame( FrameEventArgs e ) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
base.OnUpdateFrame( e ); base.OnUpdateFrame(e);
if ( Keyboard[OpenTK.Input.Key.Escape] ) var keyboard = OpenTK.Input.Keyboard.GetState();
this.Exit( ); var mouse = OpenTK.Input.Mouse.GetState();
if ( Keyboard[OpenTK.Input.Key.Space] )
Trace.WriteLine( "GL: " + GL.GetError( ) );
Trackball.X = Mouse.X; if (keyboard[OpenTK.Input.Key.Escape])
Trackball.Y = Mouse.Y; this.Exit();
Trackball.Z = Mouse.Wheel * 0.5f; if (keyboard[OpenTK.Input.Key.Space])
Trace.WriteLine("GL: " + GL.GetError());
Trackball.X = mouse.X;
Trackball.Y = mouse.Y;
Trackball.Z = mouse.Scroll.Y * 0.5f;
} }
/// <summary>Add your game rendering code here.</summary> /// <summary>Add your game rendering code here.</summary>

View file

@ -195,14 +195,15 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[Key.Space]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Space])
{ {
ErrorCode err = GL.GetError(); ErrorCode err = GL.GetError();
//Console.WriteLine(err + " " + Glu.ErrorString((GluErrorCode)err)); //Console.WriteLine(err + " " + Glu.ErrorString((GluErrorCode)err));
Console.WriteLine("GL error code: {0}", err); Console.WriteLine("GL error code: {0}", err);
} }
if (Keyboard[Key.Escape]) if (keyboard[Key.Escape])
this.Exit(); this.Exit();
} }

View file

@ -46,7 +46,7 @@ namespace Examples.Tutorial
public SimpleGeometryShader2() public SimpleGeometryShader2()
: base(800, 600) : base(800, 600)
{ {
Keyboard.KeyDown += Keyboard_KeyDown; KeyDown += Keyboard_KeyDown;
} }
enum ViewMode enum ViewMode
@ -83,7 +83,6 @@ namespace Examples.Tutorial
int vboSphere; int vboSphere;
int vboSphereStride = BlittableValueType<VertexPositionNormalTexture>.Stride; int vboSphereStride = BlittableValueType<VertexPositionNormalTexture>.Stride;
int eboSphere; int eboSphere;
int sphereElementCount;
ViewMode mode = ViewMode.Scene; ViewMode mode = ViewMode.Scene;
Vector3 eyePos = new Vector3(0, -8, 0); Vector3 eyePos = new Vector3(0, -8, 0);
@ -551,7 +550,6 @@ namespace Examples.Tutorial
{ {
VertexPositionNormalTexture[] sphereVertices = CalculateSphereVertices(1, 1, 16, 16); VertexPositionNormalTexture[] sphereVertices = CalculateSphereVertices(1, 1, 16, 16);
ushort[] sphereElements = CalculateSphereElements(1, 1, 16, 16); ushort[] sphereElements = CalculateSphereElements(1, 1, 16, 16);
sphereElementCount = sphereElements.Length;
GL.GenBuffers(1, out vboSphere); GL.GenBuffers(1, out vboSphere);
GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere); GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere);
@ -900,7 +898,8 @@ namespace Examples.Tutorial
eyePos.X = (float)Math.Cos(elapsed / 3000) * 8; eyePos.X = (float)Math.Cos(elapsed / 3000) * 8;
eyePos.Z = (float)Math.Sin(elapsed / 2000) * 8; eyePos.Z = (float)Math.Sin(elapsed / 2000) * 8;
if (Keyboard[Key.Space]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Space])
{ {
ErrorCode err = GL.GetError(); ErrorCode err = GL.GetError();
//Console.WriteLine(err + " " + Glu.ErrorString((GluErrorCode)err)); //Console.WriteLine(err + " " + Glu.ErrorString((GluErrorCode)err));

View file

@ -158,7 +158,7 @@ namespace Examples.Tutorial
} }
#endregion Textures #endregion Textures
Keyboard.KeyUp += Keyboard_KeyUp; KeyUp += Keyboard_KeyUp;
} }
int i = 0; int i = 0;
@ -233,7 +233,8 @@ namespace Examples.Tutorial
{ {
base.OnUpdateFrame(e); base.OnUpdateFrame(e);
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
} }

View file

@ -214,10 +214,11 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
this.Exit(); this.Exit();
if (Keyboard[OpenTK.Input.Key.F11]) if (keyboard[OpenTK.Input.Key.F11])
if (WindowState != WindowState.Fullscreen) if (WindowState != WindowState.Fullscreen)
WindowState = WindowState.Fullscreen; WindowState = WindowState.Fullscreen;
else else

View file

@ -224,52 +224,62 @@ namespace Examples.Tutorial
base.OnResize( e ); base.OnResize( e );
} }
protected override void OnKeyDown(OpenTK.Input.KeyboardKeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Keyboard[OpenTK.Input.Key.Escape])
this.Exit();
if (e.Keyboard[OpenTK.Input.Key.Space])
Trace.WriteLine("GL: " + GL.GetError());
if (e.Keyboard[OpenTK.Input.Key.Q])
{
MaterialScaleAndBiasAndShininess.X += 0.01f;
Trace.WriteLine("Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y);
}
if (e.Keyboard[OpenTK.Input.Key.A])
{
MaterialScaleAndBiasAndShininess.X -= 0.01f;
Trace.WriteLine("Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y);
}
if (e.Keyboard[OpenTK.Input.Key.W])
{
MaterialScaleAndBiasAndShininess.Y += 0.01f;
Trace.WriteLine("Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y);
}
if (e.Keyboard[OpenTK.Input.Key.S])
{
MaterialScaleAndBiasAndShininess.Y -= 0.01f;
Trace.WriteLine("Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y);
}
if (e.Keyboard[OpenTK.Input.Key.E])
{
MaterialScaleAndBiasAndShininess.Z += 1f;
Trace.WriteLine("Shininess: " + MaterialScaleAndBiasAndShininess.Z);
}
if (e.Keyboard[OpenTK.Input.Key.D])
{
MaterialScaleAndBiasAndShininess.Z -= 1f;
Trace.WriteLine("Shininess: " + MaterialScaleAndBiasAndShininess.Z);
}
}
protected override void OnMouseMove(OpenTK.Input.MouseMoveEventArgs e)
{
base.OnMouseMove(e);
LightPosition.X = (-(this.Width / 2) + e.Mouse.X) / 100f;
LightPosition.Y = ((this.Height / 2) - e.Mouse.Y) / 100f;
EyePos.Y = e.Mouse.Wheel * 0.5f;
}
/// <summary>Add your game logic here.</summary> /// <summary>Add your game logic here.</summary>
/// <param name="e">Contains timing information.</param> /// <param name="e">Contains timing information.</param>
/// <remarks>There is no need to call the base implementation.</remarks> /// <remarks>There is no need to call the base implementation.</remarks>
protected override void OnUpdateFrame( FrameEventArgs e ) protected override void OnUpdateFrame( FrameEventArgs e )
{ {
base.OnUpdateFrame( e ); base.OnUpdateFrame( e );
if ( Keyboard[OpenTK.Input.Key.Escape] )
this.Exit( );
if ( Keyboard[OpenTK.Input.Key.Space] )
Trace.WriteLine( "GL: " + GL.GetError( ) );
if ( Keyboard[OpenTK.Input.Key.Q] )
{
MaterialScaleAndBiasAndShininess.X += 0.01f;
Trace.WriteLine( "Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y );
}
if ( Keyboard[OpenTK.Input.Key.A] )
{
MaterialScaleAndBiasAndShininess.X -= 0.01f;
Trace.WriteLine( "Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y );
}
if ( Keyboard[OpenTK.Input.Key.W] )
{
MaterialScaleAndBiasAndShininess.Y += 0.01f;
Trace.WriteLine( "Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y );
}
if ( Keyboard[OpenTK.Input.Key.S] )
{
MaterialScaleAndBiasAndShininess.Y -= 0.01f;
Trace.WriteLine( "Scale: " + MaterialScaleAndBiasAndShininess.X + " Bias: " + MaterialScaleAndBiasAndShininess.Y );
}
if ( Keyboard[OpenTK.Input.Key.E] )
{
MaterialScaleAndBiasAndShininess.Z += 1f;
Trace.WriteLine( "Shininess: " + MaterialScaleAndBiasAndShininess.Z );
}
if ( Keyboard[OpenTK.Input.Key.D] )
{
MaterialScaleAndBiasAndShininess.Z -= 1f;
Trace.WriteLine( "Shininess: " + MaterialScaleAndBiasAndShininess.Z );
}
LightPosition.X = ( -( this.Width / 2 ) + Mouse.X ) / 100f;
LightPosition.Y = ( ( this.Height / 2 ) - Mouse.Y ) / 100f;
EyePos.Y = Mouse.Wheel * 0.5f;
} }
/// <summary>Add your game rendering code here.</summary> /// <summary>Add your game rendering code here.</summary>

View file

@ -202,7 +202,8 @@ void main(void)
Matrix4.Mult(ref rotation, ref modelviewMatrix, out modelviewMatrix); Matrix4.Mult(ref rotation, ref modelviewMatrix, out modelviewMatrix);
GL.UniformMatrix4(modelviewMatrixLocation, false, ref modelviewMatrix); GL.UniformMatrix4(modelviewMatrixLocation, false, ref modelviewMatrix);
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
Exit(); Exit();
} }

View file

@ -69,7 +69,8 @@ namespace Examples.Tutorial
/// </remarks> /// </remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
{ {
this.Exit(); this.Exit();
return; return;

View file

@ -379,9 +379,6 @@
<Compile Include="OpenTK\Test\TestGraphicsModes.cs"> <Compile Include="OpenTK\Test\TestGraphicsModes.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="OpenTK\Test\InputLogger.cs">
<SubType>Form</SubType>
</Compile>
<EmbeddedResource Include="OpenGL\1.x\ImmediateMode.rtf"> <EmbeddedResource Include="OpenGL\1.x\ImmediateMode.rtf">
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="OpenGL\1.x\VBODynamic.rtf"> <EmbeddedResource Include="OpenGL\1.x\VBODynamic.rtf">
@ -476,12 +473,6 @@
<Compile Include="OpenTK\Test\Extensions.Designer.cs"> <Compile Include="OpenTK\Test\Extensions.Designer.cs">
<DependentUpon>Extensions.cs</DependentUpon> <DependentUpon>Extensions.cs</DependentUpon>
</Compile> </Compile>
<EmbeddedResource Include="OpenTK\Test\InputLogger.resx">
<DependentUpon>InputLogger.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="OpenTK\Test\InputLogger.Designer.cs">
<DependentUpon>InputLogger.cs</DependentUpon>
</Compile>
<None Include="..\..\OpenTK.snk"> <None Include="..\..\OpenTK.snk">
<Link>OpenTK.snk</Link> <Link>OpenTK.snk</Link>
</None> </None>

View file

@ -17,7 +17,7 @@ namespace Examples
public FullscreenAntialias() public FullscreenAntialias()
: base(800, 600, new GraphicsMode(32, 0, 0, 4)) : base(800, 600, new GraphicsMode(32, 0, 0, 4))
{ {
Keyboard.KeyDown += Keyboard_KeyDown; KeyDown += Keyboard_KeyDown;
} }
#region Keyboard_KeyDown #region Keyboard_KeyDown

View file

@ -18,7 +18,7 @@ namespace Examples.Tutorial
{ {
public SimpleWindow() : base(800, 600) public SimpleWindow() : base(800, 600)
{ {
Keyboard.KeyDown += Keyboard_KeyDown; KeyDown += Keyboard_KeyDown;
} }
#region Keyboard_KeyDown #region Keyboard_KeyDown

View file

@ -43,13 +43,13 @@ namespace Examples.Tutorial
public ThreadedRendering() public ThreadedRendering()
: base(800, 600) : base(800, 600)
{ {
Keyboard.KeyDown += delegate(object sender, KeyboardKeyEventArgs e) KeyDown += delegate(object sender, KeyboardKeyEventArgs e)
{ {
if (e.Key == Key.Escape) if (e.Key == Key.Escape)
this.Exit(); this.Exit();
}; };
Keyboard.KeyUp += delegate(object sender, KeyboardKeyEventArgs e) KeyUp += delegate(object sender, KeyboardKeyEventArgs e)
{ {
if (e.Key == Key.F11) if (e.Key == Key.F11)
if (this.WindowState == WindowState.Fullscreen) if (this.WindowState == WindowState.Fullscreen)

View file

@ -23,7 +23,7 @@ namespace Examples.Tutorial
public MouseCursorSimple() public MouseCursorSimple()
: base(800, 600) : base(800, 600)
{ {
Keyboard.KeyDown += Keyboard_KeyDown; KeyDown += Keyboard_KeyDown;
using (Bitmap bitmap = new Bitmap("Data/Textures/cursor.png")) using (Bitmap bitmap = new Bitmap("Data/Textures/cursor.png"))
{ {
@ -37,8 +37,8 @@ namespace Examples.Tutorial
Cursor = MyCursor; Cursor = MyCursor;
} }
Mouse.Move += Mouse_Move; MouseMove += Mouse_Move;
Mouse.ButtonDown += Mouse_ButtonDown; MouseDown += Mouse_ButtonDown;
} }
void AddLine(float x, float y) void AddLine(float x, float y)
@ -71,7 +71,7 @@ namespace Examples.Tutorial
void Mouse_Move(object sender, MouseMoveEventArgs e) void Mouse_Move(object sender, MouseMoveEventArgs e)
{ {
if (Mouse[MouseButton.Left]) if (e.Mouse[MouseButton.Left])
{ {
AddLine(e.X, e.Y); AddLine(e.X, e.Y);
} }

View file

@ -28,9 +28,9 @@ namespace Examples.Tests
public BasicMouseInput() public BasicMouseInput()
: base(800, 600) : base(800, 600)
{ {
Mouse.Move += (sender, e) => MouseMove += (sender, e) =>
{ {
if (Mouse[MouseButton.Left]) if (e.Mouse[MouseButton.Left])
{ {
// Scale mouse coordinates from // Scale mouse coordinates from
// (0, 0):(Width, Height) to // (0, 0):(Width, Height) to
@ -48,7 +48,7 @@ namespace Examples.Tests
protected override void OnLoad(EventArgs e) protected override void OnLoad(EventArgs e)
{ {
this.Mouse.ButtonUp += (object sender, MouseButtonEventArgs buttonEvent) => { MouseUp += (object sender, MouseButtonEventArgs buttonEvent) => {
Console.WriteLine("Mouse button up: " + buttonEvent.Button + " at: " + buttonEvent.Position); Console.WriteLine("Mouse button up: " + buttonEvent.Button + " at: " + buttonEvent.Position);
}; };
} }
@ -65,10 +65,12 @@ namespace Examples.Tests
Console.WriteLine("The A key is down!"); Console.WriteLine("The A key is down!");
} }
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
this.Exit(); this.Exit();
if (Keyboard[OpenTK.Input.Key.F11]) if (keyboard[OpenTK.Input.Key.F11])
if (WindowState != WindowState.Fullscreen) if (WindowState != WindowState.Fullscreen)
WindowState = WindowState.Fullscreen; WindowState = WindowState.Fullscreen;
else else
@ -95,7 +97,8 @@ namespace Examples.Tests
SwapBuffers(); SwapBuffers();
if (Keyboard[Key.Space]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[Key.Space])
{ {
// Simulate high load (4 fps) to check // Simulate high load (4 fps) to check
// mouse input behavior // mouse input behavior

View file

@ -14,6 +14,8 @@ using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics.OpenGL;
using OpenTK.Input; using OpenTK.Input;
#pragma warning disable 612,618 // disable obsolete warnings - we need to access these functions
namespace Examples.Tests namespace Examples.Tests
{ {
[Example("GameWindow States", ExampleCategory.OpenTK, "GameWindow", 4, Documentation = "GameWindowStates")] [Example("GameWindow States", ExampleCategory.OpenTK, "GameWindow", 4, Documentation = "GameWindowStates")]

View file

@ -1,682 +0,0 @@
namespace Examples.Tests
{
partial class InputLogger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tabControl = new System.Windows.Forms.TabControl();
this.Keyboard = new System.Windows.Forms.TabPage();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.listBox4 = new System.Windows.Forms.ListBox();
this.listBox3 = new System.Windows.Forms.ListBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.Mouse = new System.Windows.Forms.TabPage();
this.WindowY = new System.Windows.Forms.Label();
this.WindowX = new System.Windows.Forms.Label();
this.MouseYWindow = new System.Windows.Forms.TextBox();
this.MouseXWindow = new System.Windows.Forms.TextBox();
this.MouseWheelDelta = new System.Windows.Forms.TextBox();
this.WheelDelta = new System.Windows.Forms.Label();
this.MouseWheelText = new System.Windows.Forms.TextBox();
this.MouseWheelLabel = new System.Windows.Forms.Label();
this.MouseDeltaY = new System.Windows.Forms.Label();
this.MouseDeltaX = new System.Windows.Forms.Label();
this.MouseY = new System.Windows.Forms.Label();
this.MouseX = new System.Windows.Forms.Label();
this.MouseDYText = new System.Windows.Forms.TextBox();
this.MouseDXText = new System.Windows.Forms.TextBox();
this.MouseYText = new System.Windows.Forms.TextBox();
this.MouseXText = new System.Windows.Forms.TextBox();
this.MouseButtonsBox = new System.Windows.Forms.ListBox();
this.ChooseMouse = new System.Windows.Forms.ComboBox();
this.HID = new System.Windows.Forms.TabPage();
this.PollTimer = new System.Windows.Forms.Timer(this.components);
this.comboBoxActiveJoystick = new System.Windows.Forms.ComboBox();
this.textBoxAxis1 = new System.Windows.Forms.TextBox();
this.textBoxAxis2 = new System.Windows.Forms.TextBox();
this.textBoxAxis3 = new System.Windows.Forms.TextBox();
this.textBoxAxis4 = new System.Windows.Forms.TextBox();
this.textBoxAxis5 = new System.Windows.Forms.TextBox();
this.textBoxAxis6 = new System.Windows.Forms.TextBox();
this.textBoxAxis7 = new System.Windows.Forms.TextBox();
this.textBoxAxis8 = new System.Windows.Forms.TextBox();
this.textBoxAxis9 = new System.Windows.Forms.TextBox();
this.textBoxAxis10 = new System.Windows.Forms.TextBox();
this.labelAxis1 = new System.Windows.Forms.Label();
this.labelAxis2 = new System.Windows.Forms.Label();
this.labelAxis3 = new System.Windows.Forms.Label();
this.labelAxis4 = new System.Windows.Forms.Label();
this.labelAxis5 = new System.Windows.Forms.Label();
this.labelAxis6 = new System.Windows.Forms.Label();
this.labelAxis7 = new System.Windows.Forms.Label();
this.labelAxis8 = new System.Windows.Forms.Label();
this.labelAxis9 = new System.Windows.Forms.Label();
this.labelAxis10 = new System.Windows.Forms.Label();
this.JoystickButtonsBox = new System.Windows.Forms.ListBox();
this.tabControl.SuspendLayout();
this.Keyboard.SuspendLayout();
this.Mouse.SuspendLayout();
this.HID.SuspendLayout();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Controls.Add(this.Keyboard);
this.tabControl.Controls.Add(this.Mouse);
this.tabControl.Controls.Add(this.HID);
this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl.Location = new System.Drawing.Point(0, 0);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(432, 379);
this.tabControl.TabIndex = 0;
//
// Keyboard
//
this.Keyboard.BackColor = System.Drawing.SystemColors.ControlLight;
this.Keyboard.Controls.Add(this.label4);
this.Keyboard.Controls.Add(this.label3);
this.Keyboard.Controls.Add(this.label2);
this.Keyboard.Controls.Add(this.label1);
this.Keyboard.Controls.Add(this.listBox4);
this.Keyboard.Controls.Add(this.listBox3);
this.Keyboard.Controls.Add(this.listBox2);
this.Keyboard.Controls.Add(this.listBox1);
this.Keyboard.Location = new System.Drawing.Point(4, 22);
this.Keyboard.Name = "Keyboard";
this.Keyboard.Padding = new System.Windows.Forms.Padding(3);
this.Keyboard.Size = new System.Drawing.Size(424, 352);
this.Keyboard.TabIndex = 0;
this.Keyboard.Text = "Keyboard";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(207, 180);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 13);
this.label4.TabIndex = 7;
this.label4.Text = "Keyboard 4";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 180);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Keyboard 3";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(207, 3);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Keyboard 2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Keyboard 1";
//
// listBox4
//
this.listBox4.FormattingEnabled = true;
this.listBox4.Location = new System.Drawing.Point(210, 197);
this.listBox4.Name = "listBox4";
this.listBox4.Size = new System.Drawing.Size(206, 147);
this.listBox4.TabIndex = 3;
//
// listBox3
//
this.listBox3.FormattingEnabled = true;
this.listBox3.Location = new System.Drawing.Point(9, 197);
this.listBox3.Name = "listBox3";
this.listBox3.Size = new System.Drawing.Size(195, 147);
this.listBox3.TabIndex = 2;
//
// listBox2
//
this.listBox2.FormattingEnabled = true;
this.listBox2.Location = new System.Drawing.Point(210, 20);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(206, 147);
this.listBox2.TabIndex = 1;
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(9, 20);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(195, 147);
this.listBox1.TabIndex = 0;
//
// Mouse
//
this.Mouse.BackColor = System.Drawing.SystemColors.ControlLight;
this.Mouse.Controls.Add(this.WindowY);
this.Mouse.Controls.Add(this.WindowX);
this.Mouse.Controls.Add(this.MouseYWindow);
this.Mouse.Controls.Add(this.MouseXWindow);
this.Mouse.Controls.Add(this.MouseWheelDelta);
this.Mouse.Controls.Add(this.WheelDelta);
this.Mouse.Controls.Add(this.MouseWheelText);
this.Mouse.Controls.Add(this.MouseWheelLabel);
this.Mouse.Controls.Add(this.MouseDeltaY);
this.Mouse.Controls.Add(this.MouseDeltaX);
this.Mouse.Controls.Add(this.MouseY);
this.Mouse.Controls.Add(this.MouseX);
this.Mouse.Controls.Add(this.MouseDYText);
this.Mouse.Controls.Add(this.MouseDXText);
this.Mouse.Controls.Add(this.MouseYText);
this.Mouse.Controls.Add(this.MouseXText);
this.Mouse.Controls.Add(this.MouseButtonsBox);
this.Mouse.Controls.Add(this.ChooseMouse);
this.Mouse.Location = new System.Drawing.Point(4, 22);
this.Mouse.Name = "Mouse";
this.Mouse.Padding = new System.Windows.Forms.Padding(3);
this.Mouse.Size = new System.Drawing.Size(424, 353);
this.Mouse.TabIndex = 1;
this.Mouse.Text = "Mouse";
//
// WindowY
//
this.WindowY.AutoSize = true;
this.WindowY.Location = new System.Drawing.Point(4, 239);
this.WindowY.Name = "WindowY";
this.WindowY.Size = new System.Drawing.Size(62, 13);
this.WindowY.TabIndex = 17;
this.WindowY.Text = "Window Y:";
//
// WindowX
//
this.WindowX.AutoSize = true;
this.WindowX.Location = new System.Drawing.Point(4, 212);
this.WindowX.Name = "WindowX";
this.WindowX.Size = new System.Drawing.Size(63, 13);
this.WindowX.TabIndex = 16;
this.WindowX.Text = "Window X:";
//
// MouseYWindow
//
this.MouseYWindow.Location = new System.Drawing.Point(80, 232);
this.MouseYWindow.Name = "MouseYWindow";
this.MouseYWindow.ReadOnly = true;
this.MouseYWindow.Size = new System.Drawing.Size(73, 22);
this.MouseYWindow.TabIndex = 15;
//
// MouseXWindow
//
this.MouseXWindow.Location = new System.Drawing.Point(80, 205);
this.MouseXWindow.Name = "MouseXWindow";
this.MouseXWindow.ReadOnly = true;
this.MouseXWindow.Size = new System.Drawing.Size(73, 22);
this.MouseXWindow.TabIndex = 14;
//
// MouseWheelDelta
//
this.MouseWheelDelta.Location = new System.Drawing.Point(80, 178);
this.MouseWheelDelta.Name = "MouseWheelDelta";
this.MouseWheelDelta.ReadOnly = true;
this.MouseWheelDelta.Size = new System.Drawing.Size(73, 22);
this.MouseWheelDelta.TabIndex = 13;
//
// WheelDelta
//
this.WheelDelta.AutoSize = true;
this.WheelDelta.Location = new System.Drawing.Point(4, 185);
this.WheelDelta.Name = "WheelDelta";
this.WheelDelta.Size = new System.Drawing.Size(73, 13);
this.WheelDelta.TabIndex = 12;
this.WheelDelta.Text = "Wheel Delta:";
//
// MouseWheelText
//
this.MouseWheelText.Location = new System.Drawing.Point(80, 152);
this.MouseWheelText.Name = "MouseWheelText";
this.MouseWheelText.ReadOnly = true;
this.MouseWheelText.Size = new System.Drawing.Size(73, 22);
this.MouseWheelText.TabIndex = 11;
//
// MouseWheelLabel
//
this.MouseWheelLabel.AutoSize = true;
this.MouseWheelLabel.Location = new System.Drawing.Point(4, 159);
this.MouseWheelLabel.Name = "MouseWheelLabel";
this.MouseWheelLabel.Size = new System.Drawing.Size(43, 13);
this.MouseWheelLabel.TabIndex = 10;
this.MouseWheelLabel.Text = "Wheel:";
//
// MouseDeltaY
//
this.MouseDeltaY.AutoSize = true;
this.MouseDeltaY.Location = new System.Drawing.Point(4, 132);
this.MouseDeltaY.Name = "MouseDeltaY";
this.MouseDeltaY.Size = new System.Drawing.Size(45, 13);
this.MouseDeltaY.TabIndex = 9;
this.MouseDeltaY.Text = "Delta Y:";
//
// MouseDeltaX
//
this.MouseDeltaX.AutoSize = true;
this.MouseDeltaX.Location = new System.Drawing.Point(4, 105);
this.MouseDeltaX.Name = "MouseDeltaX";
this.MouseDeltaX.Size = new System.Drawing.Size(46, 13);
this.MouseDeltaX.TabIndex = 8;
this.MouseDeltaX.Text = "Delta X:";
//
// MouseY
//
this.MouseY.AutoSize = true;
this.MouseY.Location = new System.Drawing.Point(4, 78);
this.MouseY.Name = "MouseY";
this.MouseY.Size = new System.Drawing.Size(60, 13);
this.MouseY.TabIndex = 7;
this.MouseY.Text = "Position Y:";
//
// MouseX
//
this.MouseX.AutoSize = true;
this.MouseX.Location = new System.Drawing.Point(4, 51);
this.MouseX.Name = "MouseX";
this.MouseX.Size = new System.Drawing.Size(61, 13);
this.MouseX.TabIndex = 6;
this.MouseX.Text = "Position X:";
//
// MouseDYText
//
this.MouseDYText.Location = new System.Drawing.Point(80, 125);
this.MouseDYText.Name = "MouseDYText";
this.MouseDYText.ReadOnly = true;
this.MouseDYText.Size = new System.Drawing.Size(73, 22);
this.MouseDYText.TabIndex = 5;
//
// MouseDXText
//
this.MouseDXText.Location = new System.Drawing.Point(80, 98);
this.MouseDXText.Name = "MouseDXText";
this.MouseDXText.ReadOnly = true;
this.MouseDXText.Size = new System.Drawing.Size(73, 22);
this.MouseDXText.TabIndex = 4;
//
// MouseYText
//
this.MouseYText.Location = new System.Drawing.Point(80, 71);
this.MouseYText.Name = "MouseYText";
this.MouseYText.ReadOnly = true;
this.MouseYText.Size = new System.Drawing.Size(73, 22);
this.MouseYText.TabIndex = 3;
//
// MouseXText
//
this.MouseXText.Location = new System.Drawing.Point(80, 44);
this.MouseXText.Name = "MouseXText";
this.MouseXText.ReadOnly = true;
this.MouseXText.Size = new System.Drawing.Size(73, 22);
this.MouseXText.TabIndex = 2;
//
// MouseButtonsBox
//
this.MouseButtonsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MouseButtonsBox.FormattingEnabled = true;
this.MouseButtonsBox.Location = new System.Drawing.Point(190, 44);
this.MouseButtonsBox.Name = "MouseButtonsBox";
this.MouseButtonsBox.Size = new System.Drawing.Size(226, 303);
this.MouseButtonsBox.TabIndex = 1;
//
// ChooseMouse
//
this.ChooseMouse.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ChooseMouse.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ChooseMouse.FormattingEnabled = true;
this.ChooseMouse.Location = new System.Drawing.Point(7, 7);
this.ChooseMouse.Name = "ChooseMouse";
this.ChooseMouse.Size = new System.Drawing.Size(409, 21);
this.ChooseMouse.TabIndex = 0;
this.ChooseMouse.SelectedIndexChanged += new System.EventHandler(this.ChooseMouse_SelectedIndexChanged);
//
// HID
//
this.HID.Controls.Add(this.labelAxis10);
this.HID.Controls.Add(this.labelAxis9);
this.HID.Controls.Add(this.labelAxis8);
this.HID.Controls.Add(this.labelAxis7);
this.HID.Controls.Add(this.labelAxis6);
this.HID.Controls.Add(this.labelAxis5);
this.HID.Controls.Add(this.labelAxis4);
this.HID.Controls.Add(this.labelAxis3);
this.HID.Controls.Add(this.labelAxis2);
this.HID.Controls.Add(this.labelAxis1);
this.HID.Controls.Add(this.textBoxAxis10);
this.HID.Controls.Add(this.textBoxAxis9);
this.HID.Controls.Add(this.textBoxAxis8);
this.HID.Controls.Add(this.textBoxAxis7);
this.HID.Controls.Add(this.textBoxAxis6);
this.HID.Controls.Add(this.textBoxAxis5);
this.HID.Controls.Add(this.textBoxAxis4);
this.HID.Controls.Add(this.textBoxAxis3);
this.HID.Controls.Add(this.textBoxAxis2);
this.HID.Controls.Add(this.textBoxAxis1);
this.HID.Controls.Add(this.JoystickButtonsBox);
this.HID.Controls.Add(this.comboBoxActiveJoystick);
this.HID.Location = new System.Drawing.Point(4, 22);
this.HID.Name = "HID";
this.HID.Padding = new System.Windows.Forms.Padding(3);
this.HID.Size = new System.Drawing.Size(424, 353);
this.HID.TabIndex = 2;
this.HID.Text = "HID";
this.HID.UseVisualStyleBackColor = true;
//
// PollTimer
//
this.PollTimer.Interval = 10;
//
// comboBoxActiveJoystick
//
this.comboBoxActiveJoystick.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxActiveJoystick.FormattingEnabled = true;
this.comboBoxActiveJoystick.Location = new System.Drawing.Point(7, 7);
this.comboBoxActiveJoystick.Name = "comboBoxActiveJoystick";
this.comboBoxActiveJoystick.Size = new System.Drawing.Size(409, 21);
this.comboBoxActiveJoystick.TabIndex = 0;
//
// textBoxAxis1
//
this.textBoxAxis1.Location = new System.Drawing.Point(55, 43);
this.textBoxAxis1.Name = "textBoxAxis1";
this.textBoxAxis1.ReadOnly = true;
this.textBoxAxis1.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis1.TabIndex = 2;
//
// textBoxAxis2
//
this.textBoxAxis2.Location = new System.Drawing.Point(55, 72);
this.textBoxAxis2.Name = "textBoxAxis2";
this.textBoxAxis2.ReadOnly = true;
this.textBoxAxis2.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis2.TabIndex = 3;
//
// textBoxAxis3
//
this.textBoxAxis3.Location = new System.Drawing.Point(55, 101);
this.textBoxAxis3.Name = "textBoxAxis3";
this.textBoxAxis3.ReadOnly = true;
this.textBoxAxis3.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis3.TabIndex = 4;
//
// textBoxAxis4
//
this.textBoxAxis4.Location = new System.Drawing.Point(55, 130);
this.textBoxAxis4.Name = "textBoxAxis4";
this.textBoxAxis4.ReadOnly = true;
this.textBoxAxis4.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis4.TabIndex = 5;
//
// textBoxAxis5
//
this.textBoxAxis5.Location = new System.Drawing.Point(55, 158);
this.textBoxAxis5.Name = "textBoxAxis5";
this.textBoxAxis5.ReadOnly = true;
this.textBoxAxis5.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis5.TabIndex = 6;
//
// textBoxAxis6
//
this.textBoxAxis6.Location = new System.Drawing.Point(55, 186);
this.textBoxAxis6.Name = "textBoxAxis6";
this.textBoxAxis6.ReadOnly = true;
this.textBoxAxis6.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis6.TabIndex = 7;
//
// textBoxAxis7
//
this.textBoxAxis7.Location = new System.Drawing.Point(55, 214);
this.textBoxAxis7.Name = "textBoxAxis7";
this.textBoxAxis7.ReadOnly = true;
this.textBoxAxis7.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis7.TabIndex = 8;
//
// textBoxAxis8
//
this.textBoxAxis8.Location = new System.Drawing.Point(55, 242);
this.textBoxAxis8.Name = "textBoxAxis8";
this.textBoxAxis8.ReadOnly = true;
this.textBoxAxis8.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis8.TabIndex = 9;
//
// textBoxAxis9
//
this.textBoxAxis9.Location = new System.Drawing.Point(55, 270);
this.textBoxAxis9.Name = "textBoxAxis9";
this.textBoxAxis9.ReadOnly = true;
this.textBoxAxis9.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis9.TabIndex = 10;
//
// textBoxAxis10
//
this.textBoxAxis10.Location = new System.Drawing.Point(55, 298);
this.textBoxAxis10.Name = "textBoxAxis10";
this.textBoxAxis10.ReadOnly = true;
this.textBoxAxis10.Size = new System.Drawing.Size(129, 22);
this.textBoxAxis10.TabIndex = 11;
//
// labelAxis1
//
this.labelAxis1.AutoSize = true;
this.labelAxis1.Location = new System.Drawing.Point(4, 46);
this.labelAxis1.Name = "labelAxis1";
this.labelAxis1.Size = new System.Drawing.Size(39, 13);
this.labelAxis1.TabIndex = 12;
this.labelAxis1.Text = "Axis 1:";
//
// labelAxis2
//
this.labelAxis2.AutoSize = true;
this.labelAxis2.Location = new System.Drawing.Point(4, 75);
this.labelAxis2.Name = "labelAxis2";
this.labelAxis2.Size = new System.Drawing.Size(39, 13);
this.labelAxis2.TabIndex = 13;
this.labelAxis2.Text = "Axis 2:";
//
// labelAxis3
//
this.labelAxis3.AutoSize = true;
this.labelAxis3.Location = new System.Drawing.Point(4, 104);
this.labelAxis3.Name = "labelAxis3";
this.labelAxis3.Size = new System.Drawing.Size(39, 13);
this.labelAxis3.TabIndex = 14;
this.labelAxis3.Text = "Axis 3:";
//
// labelAxis4
//
this.labelAxis4.AutoSize = true;
this.labelAxis4.Location = new System.Drawing.Point(4, 133);
this.labelAxis4.Name = "labelAxis4";
this.labelAxis4.Size = new System.Drawing.Size(39, 13);
this.labelAxis4.TabIndex = 15;
this.labelAxis4.Text = "Axis 4:";
//
// labelAxis5
//
this.labelAxis5.AutoSize = true;
this.labelAxis5.Location = new System.Drawing.Point(4, 161);
this.labelAxis5.Name = "labelAxis5";
this.labelAxis5.Size = new System.Drawing.Size(39, 13);
this.labelAxis5.TabIndex = 16;
this.labelAxis5.Text = "Axis 5:";
//
// labelAxis6
//
this.labelAxis6.AutoSize = true;
this.labelAxis6.Location = new System.Drawing.Point(4, 189);
this.labelAxis6.Name = "labelAxis6";
this.labelAxis6.Size = new System.Drawing.Size(39, 13);
this.labelAxis6.TabIndex = 17;
this.labelAxis6.Text = "Axis 6:";
//
// labelAxis7
//
this.labelAxis7.AutoSize = true;
this.labelAxis7.Location = new System.Drawing.Point(4, 217);
this.labelAxis7.Name = "labelAxis7";
this.labelAxis7.Size = new System.Drawing.Size(39, 13);
this.labelAxis7.TabIndex = 18;
this.labelAxis7.Text = "Axis 7:";
//
// labelAxis8
//
this.labelAxis8.AutoSize = true;
this.labelAxis8.Location = new System.Drawing.Point(4, 245);
this.labelAxis8.Name = "labelAxis8";
this.labelAxis8.Size = new System.Drawing.Size(39, 13);
this.labelAxis8.TabIndex = 18;
this.labelAxis8.Text = "Axis 8:";
//
// labelAxis9
//
this.labelAxis9.AutoSize = true;
this.labelAxis9.Location = new System.Drawing.Point(4, 273);
this.labelAxis9.Name = "labelAxis9";
this.labelAxis9.Size = new System.Drawing.Size(39, 13);
this.labelAxis9.TabIndex = 19;
this.labelAxis9.Text = "Axis 9:";
//
// labelAxis10
//
this.labelAxis10.AutoSize = true;
this.labelAxis10.Location = new System.Drawing.Point(4, 301);
this.labelAxis10.Name = "labelAxis10";
this.labelAxis10.Size = new System.Drawing.Size(45, 13);
this.labelAxis10.TabIndex = 20;
this.labelAxis10.Text = "Axis 10:";
//
// JoystickButtonsBox
//
this.JoystickButtonsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.JoystickButtonsBox.FormattingEnabled = true;
this.JoystickButtonsBox.Location = new System.Drawing.Point(190, 43);
this.JoystickButtonsBox.Name = "JoystickButtonsBox";
this.JoystickButtonsBox.Size = new System.Drawing.Size(226, 303);
this.JoystickButtonsBox.TabIndex = 1;
//
// InputLogger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(432, 379);
this.Controls.Add(this.tabControl);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "InputLogger";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "S04: Input Logger";
this.tabControl.ResumeLayout(false);
this.Keyboard.ResumeLayout(false);
this.Keyboard.PerformLayout();
this.Mouse.ResumeLayout(false);
this.Mouse.PerformLayout();
this.HID.ResumeLayout(false);
this.HID.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage Keyboard;
private System.Windows.Forms.TabPage Mouse;
private System.Windows.Forms.TabPage HID;
private System.Windows.Forms.ListBox listBox4;
private System.Windows.Forms.ListBox listBox3;
private System.Windows.Forms.ListBox listBox2;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox ChooseMouse;
private System.Windows.Forms.ListBox MouseButtonsBox;
private System.Windows.Forms.Label MouseDeltaY;
private System.Windows.Forms.Label MouseDeltaX;
private System.Windows.Forms.Label MouseY;
private System.Windows.Forms.Label MouseX;
private System.Windows.Forms.TextBox MouseDYText;
private System.Windows.Forms.TextBox MouseDXText;
private System.Windows.Forms.TextBox MouseYText;
private System.Windows.Forms.TextBox MouseXText;
private System.Windows.Forms.TextBox MouseWheelText;
private System.Windows.Forms.Label MouseWheelLabel;
private System.Windows.Forms.TextBox MouseWheelDelta;
private System.Windows.Forms.Label WheelDelta;
private System.Windows.Forms.Timer PollTimer;
private System.Windows.Forms.TextBox MouseXWindow;
private System.Windows.Forms.Label WindowY;
private System.Windows.Forms.Label WindowX;
private System.Windows.Forms.TextBox MouseYWindow;
private System.Windows.Forms.ComboBox comboBoxActiveJoystick;
private System.Windows.Forms.Label labelAxis10;
private System.Windows.Forms.Label labelAxis9;
private System.Windows.Forms.Label labelAxis8;
private System.Windows.Forms.Label labelAxis7;
private System.Windows.Forms.Label labelAxis6;
private System.Windows.Forms.Label labelAxis5;
private System.Windows.Forms.Label labelAxis4;
private System.Windows.Forms.Label labelAxis3;
private System.Windows.Forms.Label labelAxis2;
private System.Windows.Forms.Label labelAxis1;
private System.Windows.Forms.TextBox textBoxAxis10;
private System.Windows.Forms.TextBox textBoxAxis9;
private System.Windows.Forms.TextBox textBoxAxis8;
private System.Windows.Forms.TextBox textBoxAxis7;
private System.Windows.Forms.TextBox textBoxAxis6;
private System.Windows.Forms.TextBox textBoxAxis5;
private System.Windows.Forms.TextBox textBoxAxis4;
private System.Windows.Forms.TextBox textBoxAxis3;
private System.Windows.Forms.TextBox textBoxAxis2;
private System.Windows.Forms.TextBox textBoxAxis1;
private System.Windows.Forms.ListBox JoystickButtonsBox;
}
}

View file

@ -1,311 +0,0 @@
#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OpenTK;
using OpenTK.Platform;
using OpenTK.Input;
using System.Diagnostics;
using System.Threading;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
namespace Examples.Tests
{
[Example("Input Logger", ExampleCategory.OpenTK, "Test", Documentation="InputLogger")]
public partial class InputLogger : Form
{
#region Fields
Thread thread;
GameWindow hidden;
bool start;
Dictionary<IntPtr, ListBox> keyboardListBoxes = new Dictionary<IntPtr, ListBox>(4);
#endregion
#region Constructors
public InputLogger()
{
InitializeComponent();
}
#endregion
#region GameWindow
void LaunchGameWindow()
{
hidden = new GameWindow(320, 240, GraphicsMode.Default, "OpenTK | Hidden input window");
hidden.Load += hidden_Load;
hidden.Unload += hidden_Unload;
hidden.RenderFrame += hidden_RenderFrame;
hidden.Run(60.0, 0.0);
}
void hidden_RenderFrame(object sender, FrameEventArgs e)
{
GL.Clear(ClearBufferMask.ColorBufferBit);
((GameWindow)sender).SwapBuffers();
}
void hidden_Load(object sender, EventArgs e)
{
hidden.VSync = VSyncMode.On;
start = true;
GL.ClearColor(Color.Black);
}
void hidden_Unload(object sender, EventArgs e)
{
this.BeginInvoke(on_hidden_unload, sender, e, this);
}
delegate void CloseTrigger(GameWindow sender, EventArgs e, Form f);
CloseTrigger on_hidden_unload = delegate(GameWindow sender, EventArgs e, Form f) { f.Close(); };
#endregion
#region Protected Members
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
thread = new Thread(LaunchGameWindow);
thread.Start();
while (!start)
Thread.Sleep(100);
keyboardListBoxes.Add(hidden.Keyboard.DeviceID, listBox1);
// Add available mice to the mouse input logger.
ChooseMouse.Items.Add(String.Format("Mouse {0} ({1})", 0, hidden.Mouse.Description));
ChooseMouse.SelectedIndex = 0;
hidden.Mouse.Move += LogMouseMove;
hidden.Mouse.WheelChanged += LogMouseWheelChanged;
hidden.Mouse.ButtonDown += LogMouseButtonDown;
hidden.Mouse.ButtonUp += LogMouseButtonUp;
hidden.Keyboard.KeyDown += LogKeyDown;
hidden.Keyboard.KeyUp += LogKeyUp;
#region Joysticks
foreach (JoystickDevice joystick in hidden.Joysticks)
{
comboBoxActiveJoystick.Items.Add(joystick.Description);
joystick.Move += delegate(object sender, JoystickMoveEventArgs args)
{
this.BeginInvoke(ControlLogJoystickMoved, this, sender, args);
};
joystick.ButtonDown += delegate(object sender, JoystickButtonEventArgs args)
{
this.BeginInvoke(ControlLogJoystickButtonDown, this, sender, args);
};
joystick.ButtonUp += delegate(object sender, JoystickButtonEventArgs args)
{
this.BeginInvoke(ControlLogJoystickButtonUp, this, sender, args);
};
}
if (comboBoxActiveJoystick.Items.Count > 0)
comboBoxActiveJoystick.SelectedIndex = 0;
#endregion
}
protected override void OnClosing(CancelEventArgs e)
{
base.OnClosing(e);
hidden.Exit();
while (hidden.Exists)
Thread.Sleep(100);
e.Cancel = false;
}
#endregion
#region Private Members
private void ChooseMouse_SelectedIndexChanged(object sender, EventArgs e)
{
MouseButtonsBox.Items.Clear();
}
#endregion
#region Logging Delegates
#region Mice
delegate void ControlLogMouseKey(GameWindow input_window, InputLogger control, object sender, MouseButtonEventArgs e);
ControlLogMouseKey ControlLogMouseKeyDown =
delegate(GameWindow input_window, InputLogger control, object sender, MouseButtonEventArgs e)
{
if ((sender as MouseDevice).DeviceID == input_window.Mouse.DeviceID)
{
control.MouseButtonsBox.Items.Add(e.Button);
System.Diagnostics.Debug.Print("Button down: {0}", e.Button);
}
};
ControlLogMouseKey ControlLogMouseKeyUp =
delegate(GameWindow input_window, InputLogger control, object sender, MouseButtonEventArgs e)
{
if ((sender as MouseDevice).DeviceID == input_window.Mouse.DeviceID)
{
control.MouseButtonsBox.Items.Remove(e.Button);
System.Diagnostics.Debug.Print("Button up: {0}", e.Button);
}
};
delegate void ControlLogMouseMove(GameWindow input_window, InputLogger control, object sender, MouseMoveEventArgs e);
ControlLogMouseMove ControlLogMouseMoveChanges =
delegate(GameWindow input_window, InputLogger control, object sender, MouseMoveEventArgs e)
{
control.MouseXText.Text = e.X.ToString();
control.MouseYText.Text = e.Y.ToString();
};
delegate void ControlLogMouseWheel(GameWindow input_window, InputLogger control, object sender, MouseWheelEventArgs e);
ControlLogMouseWheel ControlLogMouseWheelChanges =
delegate(GameWindow input_window, InputLogger control, object sender, MouseWheelEventArgs e)
{
control.MouseWheelText.Text = e.ValuePrecise.ToString("F2");
};
#endregion
#region Keyboards
delegate void ControlLogKeyboard(GameWindow input_window, InputLogger control, OpenTK.Input.KeyboardDevice sender, KeyboardKeyEventArgs e);
ControlLogKeyboard ControlLogKeyboardDown =
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, KeyboardKeyEventArgs e)
{
control.keyboardListBoxes[sender.DeviceID].Items.Add(e.Key);
};
ControlLogKeyboard ControlLogKeyboardUp =
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, KeyboardKeyEventArgs e)
{
control.keyboardListBoxes[sender.DeviceID].Items.Remove(e.Key);
};
#endregion
#region Joysticks
delegate void ControlLogJoystickMove(InputLogger control, object sender, JoystickMoveEventArgs e);
ControlLogJoystickMove ControlLogJoystickMoved =
delegate(InputLogger control, object sender, JoystickMoveEventArgs e)
{
// Yes, there are things such as arrays. Tell that to the visual studio designer!
switch (e.Axis)
{
case JoystickAxis.Axis0: control.textBoxAxis1.Text = e.Value.ToString(); break;
case JoystickAxis.Axis1: control.textBoxAxis2.Text = e.Value.ToString(); break;
case JoystickAxis.Axis2: control.textBoxAxis3.Text = e.Value.ToString(); break;
case JoystickAxis.Axis3: control.textBoxAxis4.Text = e.Value.ToString(); break;
case JoystickAxis.Axis4: control.textBoxAxis5.Text = e.Value.ToString(); break;
case JoystickAxis.Axis5: control.textBoxAxis6.Text = e.Value.ToString(); break;
case JoystickAxis.Axis6: control.textBoxAxis7.Text = e.Value.ToString(); break;
case JoystickAxis.Axis7: control.textBoxAxis8.Text = e.Value.ToString(); break;
case JoystickAxis.Axis8: control.textBoxAxis9.Text = e.Value.ToString(); break;
case JoystickAxis.Axis9: control.textBoxAxis10.Text = e.Value.ToString(); break;
}
};
delegate void ControlLogJoystickButton(InputLogger control, object sender, JoystickButtonEventArgs e);
ControlLogJoystickButton ControlLogJoystickButtonDown =
delegate(InputLogger control, object sender, JoystickButtonEventArgs e)
{
if ((sender as JoystickDevice).Description == control.comboBoxActiveJoystick.Text)
{
control.JoystickButtonsBox.Items.Add(e.Button);
System.Diagnostics.Debug.Print("Joystick button down: {0}", e.Button);
}
};
ControlLogJoystickButton ControlLogJoystickButtonUp =
delegate(InputLogger control, object sender, JoystickButtonEventArgs e)
{
if ((sender as JoystickDevice).Description == control.comboBoxActiveJoystick.Text)
{
control.JoystickButtonsBox.Items.Remove(e.Button);
System.Diagnostics.Debug.Print("Joystick button down: {0}", e.Button);
}
};
#endregion
#endregion
#region Input Event Handlers
void LogMouseMove(object sender, MouseMoveEventArgs e)
{
this.BeginInvoke(ControlLogMouseMoveChanges, hidden, this, sender, e);
}
void LogMouseWheelChanged(object sender, MouseWheelEventArgs e)
{
this.BeginInvoke(ControlLogMouseWheelChanges, hidden, this, sender, e);
}
void LogMouseButtonDown(object sender, MouseButtonEventArgs e)
{
this.BeginInvoke(ControlLogMouseKeyDown, hidden, this, sender, e);
}
void LogMouseButtonUp(object sender, MouseButtonEventArgs e)
{
this.BeginInvoke(ControlLogMouseKeyUp, hidden, this, sender, e);
}
void LogKeyDown(object sender, KeyboardKeyEventArgs key)
{
this.BeginInvoke(ControlLogKeyboardDown, hidden, this, sender, key);
}
void LogKeyUp(object sender, KeyboardKeyEventArgs key)
{
this.BeginInvoke(ControlLogKeyboardUp, hidden, this, sender, key);
}
#endregion
#region public static void Main()
/// <summary>
/// Entry point of this example.
/// </summary>
[STAThread]
public static void Main()
{
using (InputLogger example = new InputLogger())
{
// Get the title and category of this example using reflection.
ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]);
example.Text = String.Format("OpenTK | {0} {1}: {2}", info.Category, info.Difficulty, info.Title);
example.ShowDialog();
}
}
#endregion
}
}

View file

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="PollTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -19,8 +19,6 @@ namespace Examples.Tests
float y = 1.0f; float y = 1.0f;
float z = 1.0f; float z = 1.0f;
Matrix4 createdTranslation = Matrix4.CreateTranslation(new Vector3(2, 3, -1));
Matrix4 translation = new Matrix4(new Vector4(1, 0, 0, 2), new Vector4(0, 1, 0, 3), new Vector4(0, 0, 1, -1), new Vector4(0, 0, 0, 1)); Matrix4 translation = new Matrix4(new Vector4(1, 0, 0, 2), new Vector4(0, 1, 0, 3), new Vector4(0, 0, 1, -1), new Vector4(0, 0, 0, 1));
Vector4 point = new Vector4(x, y, z, 1); Vector4 point = new Vector4(x, y, z, 1);

View file

@ -39,7 +39,7 @@ namespace Examples.Tests
using (Tutorial.T03_Immediate_Mode_Cube game = new Examples.Tutorial.T03_Immediate_Mode_Cube()) using (Tutorial.T03_Immediate_Mode_Cube game = new Examples.Tutorial.T03_Immediate_Mode_Cube())
{ {
Utilities.SetWindowTitle(game); Utilities.SetWindowTitle(game);
game.Keyboard.KeyUp += delegate(object sender, OpenTK.Input.KeyboardKeyEventArgs e) game.KeyUp += delegate(object sender, OpenTK.Input.KeyboardKeyEventArgs e)
{ {
if (e.Key == OpenTK.Input.Key.F11) if (e.Key == OpenTK.Input.Key.F11)
{ {

View file

@ -207,7 +207,8 @@ void main(void)
Matrix4.Mult(ref rotation, ref modelviewMatrix, out modelviewMatrix); Matrix4.Mult(ref rotation, ref modelviewMatrix, out modelviewMatrix);
GL.UniformMatrix4(modelviewMatrixLocation, false, ref modelviewMatrix); GL.UniformMatrix4(modelviewMatrixLocation, false, ref modelviewMatrix);
if (Keyboard[OpenTK.Input.Key.Escape]) var keyboard = OpenTK.Input.Keyboard.GetState();
if (keyboard[OpenTK.Input.Key.Escape])
Exit(); Exit();
} }

View file

@ -119,8 +119,6 @@ namespace Examples.Shapes
double _Six = 0.66666666666666; // 2/3 double _Six = 0.66666666666666; // 2/3
double _One = 1.0; // 3/3 double _One = 1.0; // 3/3
double ThirdLength = SideLength / 3f;
Vector3d C0 = Center + new Vector3d( -SideLength, -SideLength, +SideLength ); Vector3d C0 = Center + new Vector3d( -SideLength, -SideLength, +SideLength );
Vector3d C1 = Center + new Vector3d( +SideLength, -SideLength, +SideLength ); Vector3d C1 = Center + new Vector3d( +SideLength, -SideLength, +SideLength );
Vector3d C2 = Center + new Vector3d( +SideLength, +SideLength, +SideLength ); Vector3d C2 = Center + new Vector3d( +SideLength, +SideLength, +SideLength );

View file

@ -78,11 +78,13 @@ namespace OpenTK
object id) object id)
: this() : this()
{ {
#warning "Consolidate current resolution with bounds? Can they fall out of sync right now?" // Todo: Consolidate current resolution with bounds? Can they fall out of sync right now?
this.current_resolution = currentResolution; this.current_resolution = currentResolution;
IsPrimary = primary; IsPrimary = primary;
this.available_resolutions.AddRange(availableResolutions); this.available_resolutions.AddRange(availableResolutions);
#pragma warning disable 612,618
this.bounds = bounds == Rectangle.Empty ? currentResolution.Bounds : bounds; this.bounds = bounds == Rectangle.Empty ? currentResolution.Bounds : bounds;
#pragma warning restore 612,618
this.Id = id; this.Id = id;
} }

View file

@ -153,7 +153,9 @@ namespace OpenTK
/// <returns>A System.String representing this DisplayResolution.</returns> /// <returns>A System.String representing this DisplayResolution.</returns>
public override string ToString() public override string ToString()
{ {
#pragma warning disable 612,618
return String.Format("{0}x{1}@{2}Hz", Bounds, bits_per_pixel, refresh_rate); return String.Format("{0}x{1}@{2}Hz", Bounds, bits_per_pixel, refresh_rate);
#pragma warning restore 612,618
} }
#endregion #endregion
@ -187,7 +189,9 @@ namespace OpenTK
/// <returns>A System.Int32 that may serve as a hash code for this resolution.</returns> /// <returns>A System.Int32 that may serve as a hash code for this resolution.</returns>
public override int GetHashCode() public override int GetHashCode()
{ {
#pragma warning disable 612,618
return Bounds.GetHashCode() ^ bits_per_pixel ^ refresh_rate.GetHashCode(); return Bounds.GetHashCode() ^ bits_per_pixel ^ refresh_rate.GetHashCode();
#pragma warning restore 612,618
} }
#endregion #endregion

View file

@ -78,8 +78,12 @@ namespace OpenTK
const double MaxFrequency = 500.0; // Frequency cap for Update/RenderFrame events const double MaxFrequency = 500.0; // Frequency cap for Update/RenderFrame events
readonly Stopwatch watch = new Stopwatch(); readonly Stopwatch watch = new Stopwatch();
#pragma warning disable 612,618
readonly IJoystickDriver LegacyJoystick = readonly IJoystickDriver LegacyJoystick =
Factory.Default.CreateLegacyJoystickDriver(); Factory.Default.CreateLegacyJoystickDriver();
#pragma warning restore 612,618
IGraphicsContext glContext; IGraphicsContext glContext;
@ -595,6 +599,7 @@ namespace OpenTK
/// <summary> /// <summary>
/// Gets the primary Keyboard device, or null if no Keyboard exists. /// Gets the primary Keyboard device, or null if no Keyboard exists.
/// </summary> /// </summary>
[Obsolete("Use KeyDown, KeyUp and KeyPress events or OpenTK.Input.Keyboard instead.")]
public KeyboardDevice Keyboard public KeyboardDevice Keyboard
{ {
get { return InputDriver.Keyboard.Count > 0 ? InputDriver.Keyboard[0] : null; } get { return InputDriver.Keyboard.Count > 0 ? InputDriver.Keyboard[0] : null; }
@ -607,6 +612,7 @@ namespace OpenTK
/// <summary> /// <summary>
/// Gets the primary Mouse device, or null if no Mouse exists. /// Gets the primary Mouse device, or null if no Mouse exists.
/// </summary> /// </summary>
[Obsolete("Use MouseMove, MouseDown, MouseUp and MouseWheel events or OpenTK.Input.Mouse, instead.")]
public MouseDevice Mouse public MouseDevice Mouse
{ {
get { return InputDriver.Mouse.Count > 0 ? InputDriver.Mouse[0] : null; } get { return InputDriver.Mouse.Count > 0 ? InputDriver.Mouse[0] : null; }

View file

@ -1447,6 +1447,18 @@ namespace OpenTK.Graphics.ES11
/// </param> /// </param>
[Obsolete("Use ClearMask overload instead")] [Obsolete("Use ClearMask overload instead")]
[AutoGenerated(Category = "VERSION_ES_CM_1_0", Version = "1.0", EntryPoint = "glClear")] [AutoGenerated(Category = "VERSION_ES_CM_1_0", Version = "1.0", EntryPoint = "glClear")]
[CLSCompliant(false)]
public static void Clear(Int32 mask) { throw new NotImplementedException(); }
/// <summary>[requires: v1.0]
/// Clear buffers to preset values
/// </summary>
/// <param name="mask">
/// Bitwise OR of masks that indicate the buffers to be cleared. The three masks are ColorBufferBit, DepthBufferBit, and StencilBufferBit.
/// </param>
[Obsolete("Use ClearMask overload instead")]
[AutoGenerated(Category = "VERSION_ES_CM_1_0", Version = "1.0", EntryPoint = "glClear")]
[CLSCompliant(false)]
public static void Clear(UInt32 mask) { throw new NotImplementedException(); } public static void Clear(UInt32 mask) { throw new NotImplementedException(); }
/// <summary>[requires: v1.0] /// <summary>[requires: v1.0]

View file

@ -6123,6 +6123,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Amdcompressed3Dctexture : int public enum Amdcompressed3Dctexture : int
{ {
/// <summary> /// <summary>
@ -6142,6 +6144,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum AmdCompressed3DcTexture : int public enum AmdCompressed3DcTexture : int
{ {
/// <summary> /// <summary>
@ -6157,6 +6160,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum AmdcompressedAtctexture : int public enum AmdcompressedAtctexture : int
{ {
/// <summary> /// <summary>
@ -6180,6 +6185,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum AmdCompressedAtcTexture : int public enum AmdCompressedAtcTexture : int
{ {
/// <summary> /// <summary>
@ -7930,6 +7936,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ExttextureFilterAnisotropic : int public enum ExttextureFilterAnisotropic : int
{ {
/// <summary> /// <summary>
@ -7949,6 +7957,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ExtTextureFilterAnisotropic : int public enum ExtTextureFilterAnisotropic : int
{ {
/// <summary> /// <summary>
@ -7964,6 +7973,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ExttextureFormatBgra8888 : int public enum ExttextureFormatBgra8888 : int
{ {
/// <summary> /// <summary>
@ -7979,6 +7990,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ExtTextureFormatBgra8888 : int public enum ExtTextureFormatBgra8888 : int
{ {
/// <summary> /// <summary>
@ -10673,6 +10685,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ImgreadFormat : int public enum ImgreadFormat : int
{ {
/// <summary> /// <summary>
@ -10696,6 +10710,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ImgReadFormat : int public enum ImgReadFormat : int
{ {
/// <summary> /// <summary>
@ -10711,6 +10726,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ImgtextureCompressionPvrtc : int public enum ImgtextureCompressionPvrtc : int
{ {
/// <summary> /// <summary>
@ -10738,6 +10755,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ImgTextureCompressionPvrtc : int public enum ImgTextureCompressionPvrtc : int
{ {
/// <summary> /// <summary>
@ -10761,6 +10779,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ImgtextureEnvEnhancedFixedFunction : int public enum ImgtextureEnvEnhancedFixedFunction : int
{ {
/// <summary> /// <summary>
@ -10800,6 +10820,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ImgTextureEnvEnhancedFixedFunction : int public enum ImgTextureEnvEnhancedFixedFunction : int
{ {
/// <summary> /// <summary>
@ -10835,6 +10856,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum ImguserClipPlane : int public enum ImguserClipPlane : int
{ {
/// <summary> /// <summary>
@ -10874,6 +10897,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum ImgUserClipPlane : int public enum ImgUserClipPlane : int
{ {
/// <summary> /// <summary>
@ -12031,6 +12055,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Nvfence : int public enum Nvfence : int
{ {
/// <summary> /// <summary>
@ -12054,6 +12080,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum NvFence : int public enum NvFence : int
{ {
/// <summary> /// <summary>
@ -12101,6 +12128,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesblendEquationSeparate : int public enum OesblendEquationSeparate : int
{ {
/// <summary> /// <summary>
@ -12120,6 +12149,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesBlendEquationSeparate : int public enum OesBlendEquationSeparate : int
{ {
/// <summary> /// <summary>
@ -12135,6 +12165,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesblendFuncSeparate : int public enum OesblendFuncSeparate : int
{ {
/// <summary> /// <summary>
@ -12162,6 +12194,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesBlendFuncSeparate : int public enum OesBlendFuncSeparate : int
{ {
/// <summary> /// <summary>
@ -12185,6 +12218,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesblendSubtract : int public enum OesblendSubtract : int
{ {
/// <summary> /// <summary>
@ -12212,6 +12247,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesBlendSubtract : int public enum OesBlendSubtract : int
{ {
/// <summary> /// <summary>
@ -12235,6 +12271,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesbyteCoordinates : int public enum OesbyteCoordinates : int
{ {
/// <summary> /// <summary>
@ -12246,6 +12284,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesByteCoordinates : int public enum OesByteCoordinates : int
{ {
/// <summary> /// <summary>
@ -12257,6 +12296,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OescompressedEtc1Rgb8Texture : int public enum OescompressedEtc1Rgb8Texture : int
{ {
/// <summary> /// <summary>
@ -12272,6 +12313,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesCompressedEtc1Rgb8Texture : int public enum OesCompressedEtc1Rgb8Texture : int
{ {
/// <summary> /// <summary>
@ -12283,6 +12325,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OescompressedPalettedTexture : int public enum OescompressedPalettedTexture : int
{ {
/// <summary> /// <summary>
@ -12334,6 +12378,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesCompressedPalettedTexture : int public enum OesCompressedPalettedTexture : int
{ {
/// <summary> /// <summary>
@ -12381,6 +12426,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesdepth24 : int public enum Oesdepth24 : int
{ {
/// <summary> /// <summary>
@ -12396,6 +12443,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesDepth24 : int public enum OesDepth24 : int
{ {
/// <summary> /// <summary>
@ -12407,6 +12455,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesdepth32 : int public enum Oesdepth32 : int
{ {
/// <summary> /// <summary>
@ -12422,6 +12472,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesDepth32 : int public enum OesDepth32 : int
{ {
/// <summary> /// <summary>
@ -12433,6 +12484,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesdrawTexture : int public enum OesdrawTexture : int
{ {
/// <summary> /// <summary>
@ -12448,6 +12501,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesDrawTexture : int public enum OesDrawTexture : int
{ {
/// <summary> /// <summary>
@ -12459,6 +12513,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oeseglimage : int public enum Oeseglimage : int
{ {
/// <summary> /// <summary>
@ -12470,6 +12526,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesEglImage : int public enum OesEglImage : int
{ {
} }
@ -12500,6 +12557,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OeselementIndexUint : int public enum OeselementIndexUint : int
{ {
/// <summary> /// <summary>
@ -12511,6 +12570,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesElementIndexUint : int public enum OesElementIndexUint : int
{ {
/// <summary> /// <summary>
@ -12522,6 +12582,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesextendedMatrixPalette : int public enum OesextendedMatrixPalette : int
{ {
/// <summary> /// <summary>
@ -12533,6 +12595,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesExtendedMatrixPalette : int public enum OesExtendedMatrixPalette : int
{ {
} }
@ -12540,6 +12603,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesfboRenderMipmap : int public enum OesfboRenderMipmap : int
{ {
/// <summary> /// <summary>
@ -12551,6 +12616,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesFboRenderMipmap : int public enum OesFboRenderMipmap : int
{ {
} }
@ -12558,6 +12624,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesfixedPoint : int public enum OesfixedPoint : int
{ {
/// <summary> /// <summary>
@ -12573,6 +12641,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesFixedPoint : int public enum OesFixedPoint : int
{ {
/// <summary> /// <summary>
@ -12584,6 +12653,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesframebufferObject : int public enum OesframebufferObject : int
{ {
/// <summary> /// <summary>
@ -12727,6 +12798,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesFramebufferObject : int public enum OesFramebufferObject : int
{ {
/// <summary> /// <summary>
@ -12866,6 +12938,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesmapbuffer : int public enum Oesmapbuffer : int
{ {
/// <summary> /// <summary>
@ -12893,6 +12967,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesMapbuffer : int public enum OesMapbuffer : int
{ {
/// <summary> /// <summary>
@ -12916,6 +12991,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesmatrixGet : int public enum OesmatrixGet : int
{ {
/// <summary> /// <summary>
@ -12939,6 +13016,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesMatrixGet : int public enum OesMatrixGet : int
{ {
/// <summary> /// <summary>
@ -12958,6 +13036,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesmatrixPalette : int public enum OesmatrixPalette : int
{ {
/// <summary> /// <summary>
@ -13033,6 +13113,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesMatrixPalette : int public enum OesMatrixPalette : int
{ {
/// <summary> /// <summary>
@ -13104,6 +13185,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OespackedDepthStencil : int public enum OespackedDepthStencil : int
{ {
/// <summary> /// <summary>
@ -13127,6 +13210,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesPackedDepthStencil : int public enum OesPackedDepthStencil : int
{ {
/// <summary> /// <summary>
@ -13146,6 +13230,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OespointSizeArray : int public enum OespointSizeArray : int
{ {
/// <summary> /// <summary>
@ -13177,6 +13263,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesPointSizeArray : int public enum OesPointSizeArray : int
{ {
/// <summary> /// <summary>
@ -13204,6 +13291,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OespointSprite : int public enum OespointSprite : int
{ {
/// <summary> /// <summary>
@ -13223,6 +13312,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesPointSprite : int public enum OesPointSprite : int
{ {
/// <summary> /// <summary>
@ -13238,6 +13328,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesqueryMatrix : int public enum OesqueryMatrix : int
{ {
/// <summary> /// <summary>
@ -13249,6 +13341,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesQueryMatrix : int public enum OesQueryMatrix : int
{ {
} }
@ -13256,6 +13349,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesreadFormat : int public enum OesreadFormat : int
{ {
/// <summary> /// <summary>
@ -13275,6 +13370,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesReadFormat : int public enum OesReadFormat : int
{ {
/// <summary> /// <summary>
@ -13357,6 +13453,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesrgb8Rgba8 : int public enum Oesrgb8Rgba8 : int
{ {
/// <summary> /// <summary>
@ -13376,6 +13474,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesRgb8Rgba8 : int public enum OesRgb8Rgba8 : int
{ {
/// <summary> /// <summary>
@ -13391,6 +13490,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OessinglePrecision : int public enum OessinglePrecision : int
{ {
/// <summary> /// <summary>
@ -13402,6 +13503,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesSinglePrecision : int public enum OesSinglePrecision : int
{ {
} }
@ -13409,6 +13511,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesstencil1 : int public enum Oesstencil1 : int
{ {
/// <summary> /// <summary>
@ -13424,6 +13528,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesStencil1 : int public enum OesStencil1 : int
{ {
/// <summary> /// <summary>
@ -13435,6 +13540,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesstencil4 : int public enum Oesstencil4 : int
{ {
/// <summary> /// <summary>
@ -13450,6 +13557,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesStencil4 : int public enum OesStencil4 : int
{ {
/// <summary> /// <summary>
@ -13461,6 +13569,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum Oesstencil8 : int public enum Oesstencil8 : int
{ {
/// <summary> /// <summary>
@ -13476,6 +13586,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesStencil8 : int public enum OesStencil8 : int
{ {
/// <summary> /// <summary>
@ -13487,6 +13598,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OesstencilWrap : int public enum OesstencilWrap : int
{ {
/// <summary> /// <summary>
@ -13506,6 +13619,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesStencilWrap : int public enum OesStencilWrap : int
{ {
/// <summary> /// <summary>
@ -13521,6 +13635,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OestextureCubeMap : int public enum OestextureCubeMap : int
{ {
/// <summary> /// <summary>
@ -13584,6 +13700,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesTextureCubeMap : int public enum OesTextureCubeMap : int
{ {
/// <summary> /// <summary>
@ -13643,6 +13760,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OestextureEnvCrossbar : int public enum OestextureEnvCrossbar : int
{ {
/// <summary> /// <summary>
@ -13654,6 +13773,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesTextureEnvCrossbar : int public enum OesTextureEnvCrossbar : int
{ {
} }
@ -13661,6 +13781,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum OestextureMirroredRepeat : int public enum OestextureMirroredRepeat : int
{ {
/// <summary> /// <summary>
@ -13676,6 +13798,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum OesTextureMirroredRepeat : int public enum OesTextureMirroredRepeat : int
{ {
/// <summary> /// <summary>
@ -13698,6 +13821,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
public enum OpenGlescoreVersions : int public enum OpenGlescoreVersions : int
{ {
/// <summary> /// <summary>
@ -14608,6 +14732,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum QcomdriverControl : int public enum QcomdriverControl : int
{ {
/// <summary> /// <summary>
@ -14619,6 +14745,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum QcomDriverControl : int public enum QcomDriverControl : int
{ {
} }
@ -14684,6 +14811,8 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
[CLSCompliant(false)]
public enum QcomperfmonGlobalMode : int public enum QcomperfmonGlobalMode : int
{ {
/// <summary> /// <summary>
@ -14699,6 +14828,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[CLSCompliant(false)]
public enum QcomPerfmonGlobalMode : int public enum QcomPerfmonGlobalMode : int
{ {
/// <summary> /// <summary>
@ -15139,6 +15269,7 @@ namespace OpenTK.Graphics.ES11
/// <summary> /// <summary>
/// Not used directly. /// Not used directly.
/// </summary> /// </summary>
[Obsolete("Use enum with correct capitalisation instead.")]
public enum TextureCombineDot3 : int public enum TextureCombineDot3 : int
{ {
/// <summary> /// <summary>

View file

@ -458,15 +458,41 @@ namespace OpenTK.Graphics.ES20
#endregion #endregion
} }
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Khr.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
} }

View file

@ -449,15 +449,41 @@ namespace OpenTK.Graphics.ES30
#endregion #endregion
} }
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Khr.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
} }

View file

@ -121,7 +121,7 @@ namespace OpenTK.Graphics
Debug.Print("GraphicsContextFlags: {0}", flags); Debug.Print("GraphicsContextFlags: {0}", flags);
Debug.Print("Requested version: {0}.{1}", major, minor); Debug.Print("Requested version: {0}.{1}", major, minor);
IGraphicsContext shareContext = shareContext = FindSharedContext(); IGraphicsContext shareContext = FindSharedContext();
// Todo: Add a DummyFactory implementing IPlatformFactory. // Todo: Add a DummyFactory implementing IPlatformFactory.
if (designMode) if (designMode)

View file

@ -33908,8 +33908,9 @@ namespace OpenTK.Graphics.OpenGL
/// <param name="flags"> /// <param name="flags">
/// Specifies a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and flags must be zero.flags is a placeholder for anticipated future extensions of fence sync object capabilities. /// Specifies a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and flags must be zero.flags is a placeholder for anticipated future extensions of fence sync object capabilities.
/// </param> /// </param>
[Obsolete("Use uint overload instead")] [Obsolete("Use SyncCondition overload instead")]
[AutoGenerated(Category = "ARB_sync|VERSION_3_2", Version = "3.2", EntryPoint = "glFenceSync")] [AutoGenerated(Category = "ARB_sync|VERSION_3_2", Version = "3.2", EntryPoint = "glFenceSync")]
[CLSCompliant(false)]
public static IntPtr FenceSync(OpenTK.Graphics.OpenGL.ArbSync condition, Int32 flags) { throw new NotImplementedException(); } public static IntPtr FenceSync(OpenTK.Graphics.OpenGL.ArbSync condition, Int32 flags) { throw new NotImplementedException(); }
/// <summary>[requires: v3.2 or ARB_sync|VERSION_3_2] /// <summary>[requires: v3.2 or ARB_sync|VERSION_3_2]
@ -33923,6 +33924,7 @@ namespace OpenTK.Graphics.OpenGL
/// </param> /// </param>
[Obsolete("Use SyncCondition overload instead")] [Obsolete("Use SyncCondition overload instead")]
[AutoGenerated(Category = "ARB_sync|VERSION_3_2", Version = "3.2", EntryPoint = "glFenceSync")] [AutoGenerated(Category = "ARB_sync|VERSION_3_2", Version = "3.2", EntryPoint = "glFenceSync")]
[CLSCompliant(false)]
public static IntPtr FenceSync(OpenTK.Graphics.OpenGL.ArbSync condition, UInt32 flags) { throw new NotImplementedException(); } public static IntPtr FenceSync(OpenTK.Graphics.OpenGL.ArbSync condition, UInt32 flags) { throw new NotImplementedException(); }
/// <summary>[requires: v3.2 or ARB_sync|VERSION_3_2] /// <summary>[requires: v3.2 or ARB_sync|VERSION_3_2]
@ -119903,6 +119905,7 @@ namespace OpenTK.Graphics.OpenGL
/// <param name="mask"></param> /// <param name="mask"></param>
[Obsolete("Use FfdMaskSgix overload instead")] [Obsolete("Use FfdMaskSgix overload instead")]
[AutoGenerated(Category = "SGIX_polynomial_ffd", Version = "", EntryPoint = "glDeformSGIX")] [AutoGenerated(Category = "SGIX_polynomial_ffd", Version = "", EntryPoint = "glDeformSGIX")]
[CLSCompliant(false)]
public static void Deform(UInt32 mask) { throw new NotImplementedException(); } public static void Deform(UInt32 mask) { throw new NotImplementedException(); }
/// <summary>[requires: SGIX_async]</summary> /// <summary>[requires: SGIX_async]</summary>
@ -120581,6 +120584,7 @@ namespace OpenTK.Graphics.OpenGL
/// <param name="mask"></param> /// <param name="mask"></param>
[Obsolete("Use FfdMaskSgix overload instead")] [Obsolete("Use FfdMaskSgix overload instead")]
[AutoGenerated(Category = "SGIX_polynomial_ffd", Version = "", EntryPoint = "glLoadIdentityDeformationMapSGIX")] [AutoGenerated(Category = "SGIX_polynomial_ffd", Version = "", EntryPoint = "glLoadIdentityDeformationMapSGIX")]
[CLSCompliant(false)]
public static void LoadIdentityDeformationMap(UInt32 mask) { throw new NotImplementedException(); } public static void LoadIdentityDeformationMap(UInt32 mask) { throw new NotImplementedException(); }
/// <summary>[requires: SGIX_pixel_texture]</summary> /// <summary>[requires: SGIX_pixel_texture]</summary>

View file

@ -1355,26 +1355,73 @@ namespace OpenTK.Graphics.OpenGL
#endregion #endregion
} }
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Amd.DebugMessageCallback"/>.
/// </summary>
/// <param name="id">The id of this debug message.</param>
/// <param name="category">The <see cref="AmdDebugOutput"/> category for this debug message.</param>
/// <param name="severity">The <see cref="AmdDebugOutput"/> severity for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcAmd(int id, public delegate void DebugProcAmd(int id,
AmdDebugOutput category, AmdDebugOutput severity, AmdDebugOutput category, AmdDebugOutput severity,
int length, IntPtr message, IntPtr userParam); int length, IntPtr message, IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Arb.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb( public delegate void DebugProcArb(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Khr.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
} }

View file

@ -458,21 +458,58 @@ namespace OpenTK.Graphics.OpenGL4
#endregion #endregion
} }
[UnmanagedFunctionPointer(CallingConvention.Winapi)] #pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Arb.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb( public delegate void DebugProcArb(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Khr.DebugMessageCallback"/>.
/// </summary>
/// <param name="source">The <see cref="DebugSource"/> for this debug message.</param>
/// <param name="type">The <see cref="DebugType"/> for this debug message.</param>
/// <param name="id">The id of this debug message.</param>
/// <param name="severity">The <see cref="DebugSeverity"/> for this debug message.</param>
/// <param name="length">The length of this debug message.</param>
/// <param name="message">A pointer to a null-terminated ASCII C string, representing the content of this debug message.</param>
/// <param name="userParam">A pointer to a user-specified parameter.</param>
[UnmanagedFunctionPointer(CallingConvention.Winapi)] [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
} }

View file

@ -261,12 +261,12 @@ namespace OpenTK
event EventHandler<EventArgs> MouseEnter; event EventHandler<EventArgs> MouseEnter;
/// <summary> /// <summary>
/// Occurs whenever a <see cref="MouseButton"/> is clicked. /// Occurs whenever a <see cref="OpenTK.Input.MouseButton"/> is clicked.
/// </summary> /// </summary>
event EventHandler<Input.MouseButtonEventArgs> MouseDown; event EventHandler<Input.MouseButtonEventArgs> MouseDown;
/// <summary> /// <summary>
/// Occurs whenever a <see cref="MouseButton"/> is released. /// Occurs whenever a <see cref="OpenTK.Input.MouseButton"/> is released.
/// </summary> /// </summary>
event EventHandler<Input.MouseButtonEventArgs> MouseUp; event EventHandler<Input.MouseButtonEventArgs> MouseUp;

View file

@ -13,6 +13,7 @@ namespace OpenTK.Input
/// <summary> /// <summary>
/// Defines the interface for an input driver. /// Defines the interface for an input driver.
/// </summary> /// </summary>
[Obsolete("This interface has been replaced by OpenTK.Input.Keyboard, Mouse, Joystick and GamePad.")]
public interface IInputDriver : IKeyboardDriver, IMouseDriver, IJoystickDriver, IDisposable public interface IInputDriver : IKeyboardDriver, IMouseDriver, IJoystickDriver, IDisposable
{ {
/// <summary> /// <summary>

View file

@ -53,7 +53,7 @@ namespace OpenTK.Input
/// typically between 200 and 2000 DPI. /// typically between 200 and 2000 DPI.
/// Use <see cref="OpenTK.Input.Mouse.GetState(int)"/> to retrieve the state of a specific mouse device. /// Use <see cref="OpenTK.Input.Mouse.GetState(int)"/> to retrieve the state of a specific mouse device.
/// Use <see cref="OpenTK.Input.Mouse.GetCursorState()"/> to retrieve the absolute coordinates of the mouse cursor. /// Use <see cref="OpenTK.Input.Mouse.GetCursorState()"/> to retrieve the absolute coordinates of the mouse cursor.
/// Use <see cref="OpenTK.GameWindow.MouseMove"/> for event-based mouse input. /// Use <see cref="OpenTK.INativeWindow.MouseMove"/> for event-based mouse input.
/// </summary> /// </summary>
/// <returns>A <see cref="OpenTK.Input.MouseState"/> structure representing the combined state of all mouse devices.</returns> /// <returns>A <see cref="OpenTK.Input.MouseState"/> structure representing the combined state of all mouse devices.</returns>
public static MouseState GetState() public static MouseState GetState()
@ -71,7 +71,7 @@ namespace OpenTK.Input
/// typically between 200 and 2000 DPI. /// typically between 200 and 2000 DPI.
/// Use <see cref="OpenTK.Input.Mouse.GetState()"/> to retrieve the combined state of all mouse devices. /// Use <see cref="OpenTK.Input.Mouse.GetState()"/> to retrieve the combined state of all mouse devices.
/// Use <see cref="OpenTK.Input.Mouse.GetCursorState()"/> to retrieve the absolute coordinates of the mouse cursor. /// Use <see cref="OpenTK.Input.Mouse.GetCursorState()"/> to retrieve the absolute coordinates of the mouse cursor.
/// Use <see cref="OpenTK.GameWindow.MouseMove"/> for event-based mouse input. /// Use <see cref="OpenTK.INativeWindow.MouseMove"/> for event-based mouse input.
/// </summary> /// </summary>
/// <param name="index">The index of the mouse device.</param> /// <param name="index">The index of the mouse device.</param>
/// <returns>A <see cref="OpenTK.Input.MouseState"/> structure representing the state for the specified mouse device.</returns> /// <returns>A <see cref="OpenTK.Input.MouseState"/> structure representing the state for the specified mouse device.</returns>

View file

@ -231,7 +231,6 @@ namespace OpenTK.Input
#region Fields #region Fields
MouseButton button; MouseButton button;
bool pressed;
#endregion #endregion
@ -253,7 +252,6 @@ namespace OpenTK.Input
: base(x, y) : base(x, y)
{ {
this.button = button; this.button = button;
this.pressed = pressed;
} }
/// <summary> /// <summary>

View file

@ -73,6 +73,8 @@ namespace OpenTK
#region Properties #region Properties
#pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
/// <summary> /// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance. /// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
/// </summary> /// </summary>
@ -88,6 +90,8 @@ namespace OpenTK
[CLSCompliant(false)] [CLSCompliant(false)]
public Vector3 Xyz { get { return xyz; } set { xyz = value; } } public Vector3 Xyz { get { return xyz; } set { xyz = value; } }
#pragma warning restore 3005
/// <summary> /// <summary>
/// Gets or sets the X component of this instance. /// Gets or sets the X component of this instance.
/// </summary> /// </summary>

View file

@ -73,6 +73,8 @@ namespace OpenTK
#region Properties #region Properties
#pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
/// <summary> /// <summary>
/// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance. /// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
/// </summary> /// </summary>
@ -87,6 +89,8 @@ namespace OpenTK
/// </summary> /// </summary>
public Vector3d Xyz { get { return xyz; } set { xyz = value; } } public Vector3d Xyz { get { return xyz; } set { xyz = value; } }
#pragma warning restore 3005
/// <summary> /// <summary>
/// Gets or sets the X component of this instance. /// Gets or sets the X component of this instance.
/// </summary> /// </summary>

View file

@ -152,9 +152,12 @@ namespace OpenTK.Platform
return default_implementation.CreateJoystickDriver(); return default_implementation.CreateJoystickDriver();
} }
[Obsolete]
public IJoystickDriver CreateLegacyJoystickDriver() public IJoystickDriver CreateLegacyJoystickDriver()
{ {
#pragma warning disable 612,618
return default_implementation.CreateLegacyJoystickDriver(); return default_implementation.CreateLegacyJoystickDriver();
#pragma warning restore 612,618
} }
class UnsupportedPlatform : PlatformFactoryBase class UnsupportedPlatform : PlatformFactoryBase

View file

@ -53,6 +53,7 @@ namespace OpenTK.Platform
Input.IJoystickDriver2 CreateJoystickDriver(); Input.IJoystickDriver2 CreateJoystickDriver();
[Obsolete]
Input.IJoystickDriver CreateLegacyJoystickDriver(); Input.IJoystickDriver CreateLegacyJoystickDriver();
} }
} }

View file

@ -35,6 +35,7 @@ namespace OpenTK.Platform
{ {
// IInputDriver implementation to satisfy INativeWindow // IInputDriver implementation to satisfy INativeWindow
// while reducing code duplication. // while reducing code duplication.
[Obsolete]
class LegacyInputDriver : IInputDriver class LegacyInputDriver : IInputDriver
{ {
List<KeyboardDevice> dummy_keyboard_list = new List<KeyboardDevice>(1); List<KeyboardDevice> dummy_keyboard_list = new List<KeyboardDevice>(1);

View file

@ -33,6 +33,7 @@ using OpenTK.Input;
namespace OpenTK.Platform namespace OpenTK.Platform
{ {
[Obsolete]
internal class LegacyJoystickDriver : IJoystickDriver internal class LegacyJoystickDriver : IJoystickDriver
{ {
static readonly string ConnectedName = "Connected Joystick"; static readonly string ConnectedName = "Connected Joystick";

View file

@ -30,6 +30,8 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 0649 // field is never assigned
namespace OpenTK.Platform.Linux namespace OpenTK.Platform.Linux
{ {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]

View file

@ -31,6 +31,8 @@ using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
#pragma warning disable 0649 // field is never assigned
namespace OpenTK.Platform.Linux namespace OpenTK.Platform.Linux
{ {
partial class Libc partial class Libc

View file

@ -58,8 +58,6 @@ namespace OpenTK.Platform.Linux
BufferObject cursor_default; BufferObject cursor_default;
BufferObject cursor_empty; BufferObject cursor_empty;
IntPtr gbm_surface;
public LinuxNativeWindow(IntPtr display, IntPtr gbm, int fd, public LinuxNativeWindow(IntPtr display, IntPtr gbm, int fd,
int x, int y, int width, int height, string title, int x, int y, int width, int height, string title,
GraphicsMode mode, GameWindowFlags options, GraphicsMode mode, GameWindowFlags options,

View file

@ -83,7 +83,7 @@ namespace OpenTK.Platform.MacOS
// Disable momentum scrolling and long-press key pop-ups // Disable momentum scrolling and long-press key pop-ups
IntPtr settings = Cocoa.SendIntPtr(Class.NSDictionary, Selector.Alloc); IntPtr settings = Cocoa.SendIntPtr(Class.NSDictionary, Selector.Alloc);
IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false); //IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
IntPtr press_and_hold = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false); IntPtr press_and_hold = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
// Initialize and register the settings dictionary // Initialize and register the settings dictionary

View file

@ -141,7 +141,6 @@ namespace OpenTK.Platform.MacOS
private int normalLevel; private int normalLevel;
private bool shouldClose; private bool shouldClose;
private int suppressResize; private int suppressResize;
private bool cursorInsideWindow = true;
private MouseCursor selectedCursor = MouseCursor.Default; // user-selected cursor private MouseCursor selectedCursor = MouseCursor.Default; // user-selected cursor
public CocoaNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device) public CocoaNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device)

View file

@ -561,7 +561,6 @@ namespace OpenTK.Platform.MacOS
for (int i = 0; i < element_array.Count; i++) for (int i = 0; i < element_array.Count; i++)
{ {
IOHIDElementRef element_ref = element_array[i]; IOHIDElementRef element_ref = element_array[i];
IOHIDElementType type = NativeMethods.IOHIDElementGetType(element_ref);
HIDPage page = NativeMethods.IOHIDElementGetUsagePage(element_ref); HIDPage page = NativeMethods.IOHIDElementGetUsagePage(element_ref);
int usage = NativeMethods.IOHIDElementGetUsage(element_ref); int usage = NativeMethods.IOHIDElementGetUsage(element_ref);

View file

@ -38,7 +38,9 @@ namespace OpenTK.Platform
// Common base class for all INativeWindow implementations // Common base class for all INativeWindow implementations
abstract class NativeWindowBase : INativeWindow abstract class NativeWindowBase : INativeWindow
{ {
#pragma warning disable 612,618
readonly LegacyInputDriver LegacyInputDriver; readonly LegacyInputDriver LegacyInputDriver;
#pragma warning restore 612,618
readonly MouseButtonEventArgs MouseDownArgs = new MouseButtonEventArgs(); readonly MouseButtonEventArgs MouseDownArgs = new MouseButtonEventArgs();
readonly MouseButtonEventArgs MouseUpArgs = new MouseButtonEventArgs(); readonly MouseButtonEventArgs MouseUpArgs = new MouseButtonEventArgs();
@ -58,7 +60,9 @@ namespace OpenTK.Platform
internal NativeWindowBase() internal NativeWindowBase()
{ {
#pragma warning disable 612,618
LegacyInputDriver = new LegacyInputDriver(this); LegacyInputDriver = new LegacyInputDriver(this);
#pragma warning restore 612,618
MouseState.SetIsConnected(true); MouseState.SetIsConnected(true);
KeyboardState.SetIsConnected(true); KeyboardState.SetIsConnected(true);
PreviousMouseState.SetIsConnected(true); PreviousMouseState.SetIsConnected(true);
@ -445,6 +449,7 @@ namespace OpenTK.Platform
public abstract Size ClientSize { get; set; } public abstract Size ClientSize { get; set; }
[Obsolete]
public virtual IInputDriver InputDriver public virtual IInputDriver InputDriver
{ {
get get

View file

@ -74,6 +74,7 @@ namespace OpenTK.Platform
public abstract IJoystickDriver2 CreateJoystickDriver(); public abstract IJoystickDriver2 CreateJoystickDriver();
[Obsolete]
public virtual IJoystickDriver CreateLegacyJoystickDriver() public virtual IJoystickDriver CreateLegacyJoystickDriver()
{ {
return new LegacyJoystickDriver(); return new LegacyJoystickDriver();

View file

@ -31,6 +31,8 @@ using System.Diagnostics;
using System.Security; using System.Security;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 0169
namespace OpenTK.Platform.SDL2 namespace OpenTK.Platform.SDL2
{ {
using Surface = IntPtr; using Surface = IntPtr;

View file

@ -32,7 +32,7 @@ using OpenTK.Input;
namespace OpenTK.Platform.SDL2 namespace OpenTK.Platform.SDL2
{ {
class Sdl2JoystickDriver : IJoystickDriver, IJoystickDriver2, IGamePadDriver, IDisposable class Sdl2JoystickDriver : IJoystickDriver2, IGamePadDriver, IDisposable
{ {
const float RangeMultiplier = 1.0f / 32768.0f; const float RangeMultiplier = 1.0f / 32768.0f;
readonly MappedGamePadDriver gamepad_driver = new MappedGamePadDriver(); readonly MappedGamePadDriver gamepad_driver = new MappedGamePadDriver();
@ -55,9 +55,6 @@ namespace OpenTK.Platform.SDL2
readonly List<JoystickDevice> joysticks = new List<JoystickDevice>(4); readonly List<JoystickDevice> joysticks = new List<JoystickDevice>(4);
readonly Dictionary<int, int> sdl_instanceid_to_joysticks = new Dictionary<int, int>(); readonly Dictionary<int, int> sdl_instanceid_to_joysticks = new Dictionary<int, int>();
// For IJoystickDriver implementation
IList<JoystickDevice> joysticks_readonly;
#if USE_SDL2_GAMECONTROLLER #if USE_SDL2_GAMECONTROLLER
class Sdl2GamePad class Sdl2GamePad
{ {
@ -78,7 +75,6 @@ namespace OpenTK.Platform.SDL2
public Sdl2JoystickDriver() public Sdl2JoystickDriver()
{ {
joysticks_readonly = joysticks.AsReadOnly();
} }
#region Private Members #region Private Members
@ -548,23 +544,6 @@ namespace OpenTK.Platform.SDL2
#endregion #endregion
#region IJoystickDriver Members
public IList<JoystickDevice> Joysticks
{
get
{
return joysticks_readonly;
}
}
public void Poll()
{
// Do nothing
}
#endregion
#region IGamePadDriver Members #region IGamePadDriver Members
#if USE_SDL2_GAMECONTOLLER #if USE_SDL2_GAMECONTOLLER

View file

@ -33,11 +33,9 @@ namespace OpenTK.Platform.SDL2
{ {
class Sdl2Keyboard : IKeyboardDriver2 class Sdl2Keyboard : IKeyboardDriver2
{ {
#pragma warning disable 649 // Field never assigned to, compiler bug in Mono 3.4.0
KeyboardState state; KeyboardState state;
#pragma warning restore 649
readonly List<KeyboardDevice> keyboards =
new List<KeyboardDevice>();
readonly IList<KeyboardDevice> keyboards_readonly;
public Sdl2Keyboard() public Sdl2Keyboard()
{ {
@ -79,7 +77,6 @@ namespace OpenTK.Platform.SDL2
bool pressed = e.State != 0; bool pressed = e.State != 0;
var scancode = e.Keysym.Scancode; var scancode = e.Keysym.Scancode;
Key key = Sdl2KeyMap.GetKey(scancode); Key key = Sdl2KeyMap.GetKey(scancode);
KeyModifiers mods = Sdl2KeyMap.GetModifiers(e.Keysym.Mod);
if (key != Key.Unknown) if (key != Key.Unknown)
{ {

View file

@ -60,7 +60,6 @@ namespace OpenTK.Platform.SDL2
Icon icon; Icon icon;
MouseCursor cursor = MouseCursor.Default; MouseCursor cursor = MouseCursor.Default;
IntPtr sdl_cursor = IntPtr.Zero; IntPtr sdl_cursor = IntPtr.Zero;
string window_title;
// Used in KeyPress event to decode SDL UTF8 text strings // Used in KeyPress event to decode SDL UTF8 text strings
// to .Net UTF16 strings // to .Net UTF16 strings
@ -100,7 +99,6 @@ namespace OpenTK.Platform.SDL2
window = new Sdl2WindowInfo(handle, null); window = new Sdl2WindowInfo(handle, null);
window_id = SDL.GetWindowID(handle); window_id = SDL.GetWindowID(handle);
windows.Add(window_id, this); windows.Add(window_id, this);
window_title = title;
} }
} }
@ -669,7 +667,6 @@ namespace OpenTK.Platform.SDL2
if (Exists) if (Exists)
{ {
SDL.SetWindowTitle(window.Handle, value); SDL.SetWindowTitle(window.Handle, value);
window_title = value;
} }
} }
} }
@ -943,7 +940,7 @@ namespace OpenTK.Platform.SDL2
if (manual) if (manual)
{ {
Debug.Print("Disposing {0}", GetType()); Debug.Print("Disposing {0}", GetType());
InputDriver.Dispose();
if (Exists) if (Exists)
{ {
DestroyWindow(); DestroyWindow();

View file

@ -3141,6 +3141,9 @@ namespace OpenTK.Platform.Windows
/// </summary> /// </summary>
public IntPtr ExtraInfo; public IntPtr ExtraInfo;
/// <summary>
/// Returns the size of a MouseMovePoint in bytes.
/// </summary>
public static readonly int SizeInBytes = Marshal.SizeOf(default(MouseMovePoint)); public static readonly int SizeInBytes = Marshal.SizeOf(default(MouseMovePoint));
} }

View file

@ -113,7 +113,7 @@ namespace OpenTK.Platform.Windows
int device_count = 0, mode_count = 0; int device_count = 0, mode_count = 0;
// Get available video adapters and enumerate all monitors // Get available video adapters and enumerate all monitors
WindowsDisplayDevice dev1 = new WindowsDisplayDevice(), dev2 = new WindowsDisplayDevice(); WindowsDisplayDevice dev1 = new WindowsDisplayDevice();
while (Functions.EnumDisplayDevices(null, device_count++, dev1, 0)) while (Functions.EnumDisplayDevices(null, device_count++, dev1, 0))
{ {
if ((dev1.StateFlags & DisplayDeviceStateFlags.AttachedToDesktop) == DisplayDeviceStateFlags.None) if ((dev1.StateFlags & DisplayDeviceStateFlags.AttachedToDesktop) == DisplayDeviceStateFlags.None)
@ -156,12 +156,14 @@ namespace OpenTK.Platform.Windows
// Construct the OpenTK DisplayDevice through the accumulated parameters. // Construct the OpenTK DisplayDevice through the accumulated parameters.
// The constructor will automatically add the DisplayDevice to the list // The constructor will automatically add the DisplayDevice to the list
// of available devices. // of available devices.
#pragma warning disable 612,618
opentk_dev = new DisplayDevice( opentk_dev = new DisplayDevice(
opentk_dev_current_res, opentk_dev_current_res,
opentk_dev_primary, opentk_dev_primary,
opentk_dev_available_res, opentk_dev_available_res,
opentk_dev_current_res.Bounds, opentk_dev_current_res.Bounds,
dev1.DeviceName); dev1.DeviceName);
#pragma warning restore 612,618
// Set the original resolution if the DisplayDevice was previously available. // Set the original resolution if the DisplayDevice was previously available.
foreach (DisplayDevice existingDevice in previousDevices) foreach (DisplayDevice existingDevice in previousDevices)

View file

@ -444,7 +444,7 @@ namespace OpenTK.Platform.Windows
else else
{ {
// Exclude the current position. // Exclude the current position.
Point currentScreenPosition = new Point(InputDriver.Mouse[0].X, InputDriver.Mouse[0].Y); Point currentScreenPosition = new Point(MouseState.X, MouseState.Y);
Functions.ClientToScreen(handle, ref currentScreenPosition); Functions.ClientToScreen(handle, ref currentScreenPosition);
// Find the first move point we've already seen. // Find the first move point we've already seen.
@ -867,7 +867,7 @@ namespace OpenTK.Platform.Windows
wc.WndProc = WindowProcedureDelegate; wc.WndProc = WindowProcedureDelegate;
wc.ClassName = ClassName; wc.ClassName = ClassName;
wc.Icon = Icon != null ? Icon.Handle : IntPtr.Zero; wc.Icon = Icon != null ? Icon.Handle : IntPtr.Zero;
#warning "This seems to resize one of the 'large' icons, rather than using a small icon directly (multi-icon files). Investigate!" // Todo: the following line appears to resize one of the 'large' icons, rather than using a small icon directly (multi-icon files). Investigate!
wc.IconSm = Icon != null ? new Icon(Icon, 16, 16).Handle : IntPtr.Zero; wc.IconSm = Icon != null ? new Icon(Icon, 16, 16).Handle : IntPtr.Zero;
wc.Cursor = Functions.LoadCursor(CursorName.Arrow); wc.Cursor = Functions.LoadCursor(CursorName.Arrow);
ushort atom = Functions.RegisterClassEx(ref wc); ushort atom = Functions.RegisterClassEx(ref wc);

View file

@ -47,9 +47,7 @@ namespace OpenTK.Platform.Windows
ICD, ICD,
} }
static readonly object SyncRoot = new object();
readonly IntPtr Device; readonly IntPtr Device;
readonly List<GraphicsMode> modes = new List<GraphicsMode>();
#region Constructors #region Constructors

View file

@ -36,14 +36,13 @@ using OpenTK.Input;
namespace OpenTK.Platform.Windows namespace OpenTK.Platform.Windows
{ {
sealed class WinMMJoystick : IJoystickDriver, IJoystickDriver2 sealed class WinMMJoystick : IJoystickDriver2
{ {
#region Fields #region Fields
readonly object sync = new object(); readonly object sync = new object();
List<JoystickDevice> sticks = new List<JoystickDevice>(); List<JoystickDevice> sticks = new List<JoystickDevice>();
IList<JoystickDevice> sticks_readonly;
// Matches a WinMM device index to a specific stick above // Matches a WinMM device index to a specific stick above
readonly Dictionary<int, int> index_to_stick = readonly Dictionary<int, int> index_to_stick =
@ -65,7 +64,6 @@ namespace OpenTK.Platform.Windows
public WinMMJoystick() public WinMMJoystick()
{ {
sticks_readonly = sticks.AsReadOnly();
RefreshDevices(); RefreshDevices();
} }
@ -228,111 +226,6 @@ namespace OpenTK.Platform.Windows
#endregion #endregion
#region IJoystickDriver
public int DeviceCount
{
get { return sticks.Count; }
}
public IList<JoystickDevice> Joysticks
{
get { return sticks_readonly; }
}
public void Poll()
{
lock (sync)
{
foreach (JoystickDevice<WinMMJoyDetails> js in sticks)
{
JoyInfoEx info = new JoyInfoEx();
info.Size = JoyInfoEx.SizeInBytes;
info.Flags = JoystickFlags.All;
UnsafeNativeMethods.joyGetPosEx(js.Id, ref info);
int num_axes = js.Axis.Count;
if ((js.Details.PovType & PovType.Exists) != 0)
num_axes -= 2; // Because the last two axis are used for POV input.
int axis = 0;
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.XPos, axis)); axis++; }
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.YPos, axis)); axis++; }
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.ZPos, axis)); axis++; }
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.RPos, axis)); axis++; }
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.UPos, axis)); axis++; }
if (axis < num_axes)
{ js.SetAxis((JoystickAxis)axis, js.Details.CalculateOffset((float)info.VPos, axis)); axis++; }
if ((js.Details.PovType & PovType.Exists) != 0)
{
float x = 0, y = 0;
// A discrete POV returns specific values for left, right, etc.
// A continuous POV returns an integer indicating an angle in degrees * 100, e.g. 18000 == 180.00 degrees.
// The vast majority of joysticks have discrete POVs, so we'll treat all of them as discrete for simplicity.
if ((JoystickPovPosition)info.Pov != JoystickPovPosition.Centered)
{
if (info.Pov > (int)JoystickPovPosition.Left || info.Pov < (int)JoystickPovPosition.Right)
{ y = 1; }
if ((info.Pov > (int)JoystickPovPosition.Forward) && (info.Pov < (int)JoystickPovPosition.Backward))
{ x = 1; }
if ((info.Pov > (int)JoystickPovPosition.Right) && (info.Pov < (int)JoystickPovPosition.Left))
{ y = -1; }
if (info.Pov > (int)JoystickPovPosition.Backward)
{ x = -1; }
}
//if ((js.Details.PovType & PovType.Discrete) != 0)
//{
// if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Centered)
// { x = 0; y = 0; }
// else if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Forward)
// { x = 0; y = -1; }
// else if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Left)
// { x = -1; y = 0; }
// else if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Backward)
// { x = 0; y = 1; }
// else if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Right)
// { x = 1; y = 0; }
//}
//else if ((js.Details.PovType & PovType.Continuous) != 0)
//{
// if ((JoystickPovPosition)info.Pov == JoystickPovPosition.Centered)
// {
// // This approach moves the hat on a circle, not a square as it should.
// float angle = (float)(System.Math.PI * info.Pov / 18000.0 + System.Math.PI / 2);
// x = (float)System.Math.Cos(angle);
// y = (float)System.Math.Sin(angle);
// if (x < 0.001)
// x = 0;
// if (y < 0.001)
// y = 0;
// }
//}
//else
// throw new NotImplementedException("Please post an issue report at http://www.opentk.com/issues");
js.SetAxis((JoystickAxis)axis++, x);
js.SetAxis((JoystickAxis)axis++, y);
}
int button = 0;
while (button < js.Button.Count)
{
js.SetButton((JoystickButton)button, (info.Buttons & (1 << button)) != 0);
button++;
}
}
}
}
#endregion
#region IJoystickDriver2 Members #region IJoystickDriver2 Members
public JoystickCapabilities GetCapabilities(int player_index) public JoystickCapabilities GetCapabilities(int player_index)

View file

@ -39,7 +39,6 @@ namespace OpenTK.Platform.Windows
// Input event data. // Input event data.
static RawInput data = new RawInput(); static RawInput data = new RawInput();
static readonly int rawInputStructSize = API.RawInputSize;
WinRawKeyboard keyboard_driver; WinRawKeyboard keyboard_driver;
WinRawMouse mouse_driver; WinRawMouse mouse_driver;

View file

@ -237,6 +237,8 @@ namespace OpenTK.Platform.Windows
Any = 0xff Any = 0xff
} }
#pragma warning disable 0649 // field is never assigned
struct XInputThresholds struct XInputThresholds
{ {
public const int LeftThumbDeadzone = 7849; public const int LeftThumbDeadzone = 7849;

View file

@ -31,6 +31,8 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 0169
namespace OpenTK.Platform.X11 namespace OpenTK.Platform.X11
{ {
using Atom = IntPtr; using Atom = IntPtr;

View file

@ -575,7 +575,6 @@ namespace OpenTK.Platform.X11
{ {
int width = image.Width; int width = image.Width;
int height = image.Height; int height = image.Height;
int size = width * height;
BitmapData data = image.LockBits(new Rectangle(0, 0, width, height), BitmapData data = image.LockBits(new Rectangle(0, 0, width, height),
ImageLockMode.ReadOnly, ImageLockMode.ReadOnly,

View file

@ -324,8 +324,6 @@ namespace OpenTK.Platform.X11
{ {
short rate = 0; short rate = 0;
IntPtr screen_config = Functions.XRRGetScreenInfo(API.DefaultDisplay, Functions.XRootWindow(API.DefaultDisplay, screen)); IntPtr screen_config = Functions.XRRGetScreenInfo(API.DefaultDisplay, Functions.XRootWindow(API.DefaultDisplay, screen));
ushort rotation = 0;
int size = Functions.XRRConfigCurrentConfiguration(screen_config, out rotation);
rate = Functions.XRRConfigCurrentRate(screen_config); rate = Functions.XRRConfigCurrentRate(screen_config);
Functions.XRRFreeScreenConfigInfo(screen_config); Functions.XRRFreeScreenConfigInfo(screen_config);
return (float)rate; return (float)rate;

View file

@ -76,30 +76,26 @@ namespace OpenTK.Platform.X11
IntPtr _atom_net_wm_state_maximized_horizontal; IntPtr _atom_net_wm_state_maximized_horizontal;
IntPtr _atom_net_wm_state_maximized_vertical; IntPtr _atom_net_wm_state_maximized_vertical;
#pragma warning disable 414 // assigned but never used
IntPtr _atom_net_wm_allowed_actions; IntPtr _atom_net_wm_allowed_actions;
IntPtr _atom_net_wm_action_resize; IntPtr _atom_net_wm_action_resize;
IntPtr _atom_net_wm_action_maximize_horizontally; IntPtr _atom_net_wm_action_maximize_horizontally;
IntPtr _atom_net_wm_action_maximize_vertically; IntPtr _atom_net_wm_action_maximize_vertically;
#pragma warning restore 414
IntPtr _atom_net_wm_icon; IntPtr _atom_net_wm_icon;
IntPtr _atom_net_frame_extents; IntPtr _atom_net_frame_extents;
IntPtr _atom_wm_class;
readonly IntPtr _atom_xa_cardinal = new IntPtr(6); readonly IntPtr _atom_xa_cardinal = new IntPtr(6);
//IntPtr _atom_motif_wm_hints;
//IntPtr _atom_kde_wm_hints;
//IntPtr _atom_kde_net_wm_hints;
static readonly IntPtr _atom_remove = (IntPtr)0; static readonly IntPtr _atom_remove = (IntPtr)0;
static readonly IntPtr _atom_add = (IntPtr)1; static readonly IntPtr _atom_add = (IntPtr)1;
static readonly IntPtr _atom_toggle = (IntPtr)2; static readonly IntPtr _atom_toggle = (IntPtr)2;
// Used by OpenTK to detect mouse warp events #pragma warning disable 649 // never assigned, compiler bug in Mono 3.4.0
Rectangle bounds, client_rectangle; Rectangle bounds, client_rectangle;
#pragma warning restore 649
int border_left, border_right, border_top, border_bottom; int border_left, border_right, border_top, border_bottom;
Icon icon; Icon icon;
bool has_focus; bool has_focus;
@ -131,9 +127,11 @@ namespace OpenTK.Platform.X11
readonly IntPtr EmptyCursor; readonly IntPtr EmptyCursor;
#pragma warning disable 414 // Field assigned but never used, we do that on purpose
readonly bool xi2_supported; readonly bool xi2_supported;
readonly int xi2_opcode; readonly int xi2_opcode;
readonly int xi2_version; readonly int xi2_version;
#pragma warning restore 414
#endregion #endregion
@ -148,8 +146,6 @@ namespace OpenTK.Platform.X11
if (height <= 0) if (height <= 0)
throw new ArgumentOutOfRangeException("height", "Must be higher than zero."); throw new ArgumentOutOfRangeException("height", "Must be higher than zero.");
XVisualInfo info = new XVisualInfo();
Debug.Indent(); Debug.Indent();
using (new XLock(window.Display)) using (new XLock(window.Display))
@ -420,14 +416,6 @@ namespace OpenTK.Platform.X11
{ {
get get
{ {
//IntPtr actual_atom;
//int actual_format;
//IntPtr nitems;
//IntPtr bytes_after;
IntPtr prop = IntPtr.Zero;
//IntPtr atom;
//XWindowAttributes attributes;
using (new XLock(window.Display)) using (new XLock(window.Display))
{ {
// Test if decorations have been disabled through Motif. // Test if decorations have been disabled through Motif.

View file

@ -102,7 +102,6 @@ namespace OpenTK.Platform.X11
Debug.Print("Selecting FB config for {0}", mode); Debug.Print("Selecting FB config for {0}", mode);
List<int> visualAttributes = new List<int>(); List<int> visualAttributes = new List<int>();
IntPtr visual = IntPtr.Zero;
if (mode.ColorFormat.BitsPerPixel > 0) if (mode.ColorFormat.BitsPerPixel > 0)
{ {