class Limits:
    __slots__ = [
        'point_size_range',
        'point_size_granularity',
        'max_texture_size',
        'max_viewport_dims',
        'subpixel_bits',
        'max_3d_texture_size',
        'max_elements_vertices',
        'max_elements_indices',
        'smooth_point_size_range',
        'smooth_point_size_granularity',
        'smooth_line_width_range',
        'smooth_line_width_granularity',
        'aliased_line_width_range',
        'max_cube_map_texture_size',
        'point_fade_threshold_size',
        'max_texture_lod_bias',
        'max_draw_buffers',
        'max_vertex_attribs',
        'max_texture_image_units',
        'max_fragment_uniform_components',
        'max_vertex_uniform_components',
        'max_varying_floats',
        'max_combined_texture_image_units',
        'max_vertex_texture_image_units',
        'max_clip_distances',
        'major_version',
        'minor_version',
        'max_array_texture_layers',
        'min_program_texel_offset',
        'max_program_texel_offset',
        'max_varying_components',
        'max_renderbuffer_size',
        'max_color_attachments',
        'max_samples',
        'max_texture_buffer_size',
        'max_rectangle_texture_size',
        'max_vertex_uniform_blocks',
        'max_geometry_uniform_blocks',
        'max_fragment_uniform_blocks',
        'max_combined_uniform_blocks',
        'max_uniform_buffer_bindings',
        'max_uniform_block_size',
        'max_combined_vertex_uniform_components',
        'max_combined_geometry_uniform_components',
        'max_combined_fragment_uniform_components',
        'uniform_buffer_offset_alignment',
        'max_geometry_texture_image_units',
        'max_geometry_uniform_components',
        'max_geometry_output_vertices',
        'max_geometry_total_output_components',
        'max_vertex_output_components',
        'max_geometry_input_components',
        'max_geometry_output_components',
        'max_fragment_input_components',
        'context_profile_mask',
        'max_server_wait_timeout',
        'max_sample_mask_words',
        'max_color_texture_samples',
        'max_depth_texture_samples',
        'max_integer_samples',
        'max_dual_source_draw_buffers',
        'max_vertex_uniform_vectors',
        'max_varying_vectors',
        'max_fragment_uniform_vectors',
        'max_viewports',
        'viewport_subpixel_bits',
        'viewport_bounds_range',
        'min_map_buffer_alignment',
        'max_vertex_atomic_counter_buffers',
        'max_tess_control_atomic_counter_buffers',
        'max_tess_evaluation_atomic_counter_buffers',
        'max_geometry_atomic_counter_buffers',
        'max_fragment_atomic_counter_buffers',
        'max_combined_atomic_counter_buffers',
        'max_vertex_atomic_counters',
        'max_tess_control_atomic_counters',
        'max_tess_evaluation_atomic_counters',
        'max_geometry_atomic_counters',
        'max_fragment_atomic_counters',
        'max_combined_atomic_counters',
        'max_atomic_counter_buffer_size',
        'max_atomic_counter_buffer_bindings',
        'max_image_units',
        'max_combined_image_units_and_fragment_outputs',
        'max_image_samples',
        'max_vertex_image_uniforms',
        'max_tess_control_image_uniforms',
        'max_tess_evaluation_image_uniforms',
        'max_geometry_image_uniforms',
        'max_fragment_image_uniforms',
        'max_combined_image_uniforms',
        'max_element_index',
        'max_compute_uniform_blocks',
        'max_compute_texture_image_units',
        'max_compute_image_uniforms',
        'max_compute_shared_memory_size',
        'max_compute_uniform_components',
        'max_compute_atomic_counter_buffers',
        'max_compute_atomic_counters',
        'max_combined_compute_uniform_components',
        'max_compute_work_group_invocations',
        'max_debug_message_length',
        'max_debug_logged_messages',
        'max_debug_group_stack_depth',
        'max_label_length',
        'max_uniform_locations',
        'max_framebuffer_width',
        'max_framebuffer_height',
        'max_framebuffer_layers',
        'max_framebuffer_samples',
        'max_num_active_variables',
        'max_num_compatible_subroutines',
        'max_vertex_shader_storage_blocks',
        'max_geometry_shader_storage_blocks',
        'max_tess_control_shader_storage_blocks',
        'max_tess_evaluation_shader_storage_blocks',
        'max_fragment_shader_storage_blocks',
        'max_compute_shader_storage_blocks',
        'max_combined_shader_storage_blocks',
        'max_shader_storage_buffer_bindings',
        'max_shader_storage_block_size',
        'max_combined_shader_output_resources',
        'max_vertex_attrib_relative_offset',
        'max_vertex_attrib_bindings',
        'max_vertex_attrib_stride',
        'max_cull_distances',
        'max_combined_clip_and_cull_distances',
        'max_texture_max_anisotropy',
    ]

    def json(self):
        res = {}
        for slot in Limits.__slots__:
            if hasattr(self, slot):
                res[slot] = getattr(self, slot)
        return res
