mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibGL: Implement GL_(CLIENT_)?ACTIVE_TEXTURE
context parameters
This commit is contained in:
parent
00d46e5d77
commit
af217b0c3a
Notes:
sideshowbarker
2024-07-17 07:15:27 +09:00
Author: https://github.com/gmta
Commit: af217b0c3a
Pull-request: https://github.com/SerenityOS/serenity/pull/15150
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/sunverwerth ✅
3 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,8 @@ namespace GL {
|
|||
Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
|
||||
{
|
||||
switch (name) {
|
||||
case GL_ACTIVE_TEXTURE:
|
||||
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(GL_TEXTURE0 + m_active_texture_unit_index) } };
|
||||
case GL_ALPHA_BITS:
|
||||
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
||||
case GL_ALPHA_TEST:
|
||||
|
@ -26,6 +28,8 @@ Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
|
|||
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(m_blend_source_factor) } };
|
||||
case GL_BLUE_BITS:
|
||||
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
||||
case GL_CLIENT_ACTIVE_TEXTURE:
|
||||
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(GL_TEXTURE0 + m_client_active_texture) } };
|
||||
case GL_COLOR_MATERIAL:
|
||||
return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_color_material_enabled } };
|
||||
case GL_COLOR_MATERIAL_FACE:
|
||||
|
|
|
@ -121,6 +121,8 @@ extern "C" {
|
|||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_AUTO_NORMAL 0x0D80
|
||||
|
|
|
@ -339,7 +339,7 @@ private:
|
|||
bool m_client_side_vertex_array_enabled { false };
|
||||
bool m_client_side_color_array_enabled { false };
|
||||
Vector<bool> m_client_side_texture_coord_array_enabled;
|
||||
size_t m_client_active_texture = 0;
|
||||
size_t m_client_active_texture { 0 };
|
||||
bool m_client_side_normal_array_enabled { false };
|
||||
|
||||
NonnullRefPtr<Gfx::Bitmap> m_frontbuffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue