Move Windows WGL context attributes to renderer gl

This commit is contained in:
2026-06-02 09:32:27 +02:00
parent c22f2e7fa2
commit acd8ef6658
6 changed files with 88 additions and 24 deletions

View File

@@ -364,6 +364,39 @@ void maps_app_initialization_parameters(pp::tests::Harness& h)
PP_EXPECT(h, pp::renderer::gl::active_texture_unit(4U) == 0x84C4U);
}
void maps_windows_wgl_core_context_parameters(pp::tests::Harness& h)
{
const auto config = pp::renderer::gl::windows_wgl_core_context_3_3_config();
PP_EXPECT(h, config.context_attributes.size() == 9U);
PP_EXPECT(h, config.context_attributes[0] == 0x2091);
PP_EXPECT(h, config.context_attributes[1] == 3);
PP_EXPECT(h, config.context_attributes[2] == 0x2092);
PP_EXPECT(h, config.context_attributes[3] == 3);
PP_EXPECT(h, config.context_attributes[4] == 0x2094);
PP_EXPECT(h, config.context_attributes[5] == 0x0002);
PP_EXPECT(h, config.context_attributes[6] == 0x9126);
PP_EXPECT(h, config.context_attributes[7] == 0x00000001);
PP_EXPECT(h, config.context_attributes[8] == 0);
PP_EXPECT(h, config.pixel_format_attributes.size() == 15U);
PP_EXPECT(h, config.pixel_format_attributes[0] == 0x2001);
PP_EXPECT(h, config.pixel_format_attributes[1] == 1);
PP_EXPECT(h, config.pixel_format_attributes[2] == 0x2010);
PP_EXPECT(h, config.pixel_format_attributes[3] == 1);
PP_EXPECT(h, config.pixel_format_attributes[4] == 0x2011);
PP_EXPECT(h, config.pixel_format_attributes[5] == 1);
PP_EXPECT(h, config.pixel_format_attributes[6] == 0x2003);
PP_EXPECT(h, config.pixel_format_attributes[7] == 0x2027);
PP_EXPECT(h, config.pixel_format_attributes[8] == 0x2013);
PP_EXPECT(h, config.pixel_format_attributes[9] == 0x202B);
PP_EXPECT(h, config.pixel_format_attributes[10] == 0x2014);
PP_EXPECT(h, config.pixel_format_attributes[11] == 24);
PP_EXPECT(h, config.pixel_format_attributes[12] == 0x2022);
PP_EXPECT(h, config.pixel_format_attributes[13] == 16);
PP_EXPECT(h, config.pixel_format_attributes[14] == 0);
}
void rejects_invalid_shader_attribute_binding_catalogs(pp::tests::Harness& h)
{
const std::array<pp::renderer::gl::OpenGlAttributeBinding, 0> empty {};
@@ -457,6 +490,7 @@ int main()
harness.run("maps_sampler_parameters", maps_sampler_parameters);
harness.run("exposes_shader_attribute_binding_catalog", exposes_shader_attribute_binding_catalog);
harness.run("maps_app_initialization_parameters", maps_app_initialization_parameters);
harness.run("maps_windows_wgl_core_context_parameters", maps_windows_wgl_core_context_parameters);
harness.run("rejects_invalid_shader_attribute_binding_catalogs", rejects_invalid_shader_attribute_binding_catalogs);
harness.run("exposes_shader_uniform_catalog", exposes_shader_uniform_catalog);
harness.run("rejects_invalid_shader_uniform_catalogs", rejects_invalid_shader_uniform_catalogs);