Module: Mesa
Branch: master
Commit: 9d5bb3c6f820a5a99e1f55b2fd14d250761fcddc
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d5bb3c6f820a5a99e1f55b2fd14d250761fcddc

Author: Ian Romanick <ian.d.roman...@intel.com>
Date:   Fri Aug 14 01:20:56 2009 -0700

Infrastructure for GL_ARB_seamless_cube_map

---

 src/mesa/glapi/ARB_seamless_cube_map.xml |   12 ++++++++++++
 src/mesa/glapi/Makefile                  |    1 +
 src/mesa/glapi/gl_API.xml                |    2 ++
 src/mesa/main/enable.c                   |   10 ++++++++++
 src/mesa/main/extensions.c               |    1 +
 src/mesa/main/get_gen.py                 |    4 ++++
 src/mesa/main/mtypes.h                   |    4 ++++
 7 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/src/mesa/glapi/ARB_seamless_cube_map.xml 
b/src/mesa/glapi/ARB_seamless_cube_map.xml
new file mode 100644
index 0000000..3cdc84d
--- /dev/null
+++ b/src/mesa/glapi/ARB_seamless_cube_map.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_seamless_cubemap" number="65">
+    <enum name="TEXTURE_CUBE_MAP_SEAMLESS"     count="1"  value="0x88F4">
+        <size name="Get" mode="get"/>
+    </enum>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile
index 2178eac..f706309 100644
--- a/src/mesa/glapi/Makefile
+++ b/src/mesa/glapi/Makefile
@@ -50,6 +50,7 @@ API_XML = gl_API.xml \
        ARB_copy_buffer.xml \
        ARB_framebuffer_object.xml \
        ARB_map_buffer_range.xml \
+       ARB_seamless_cube_map.xml \
        ARB_vertex_array_object.xml \
        APPLE_vertex_array_object.xml \
        EXT_provoking_vertex.xml
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index 1703637..d2fcc6d 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -7954,6 +7954,8 @@
 
 <xi:include href="ARB_vertex_array_object.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="ARB_seamless_cube_map.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 
 <!-- Non-ARB extensions sorted by extension number. -->
 
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 48268fc..4bc5477 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -972,6 +972,11 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean 
state)
          }
          break;
 
+      case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+        CHECK_EXTENSION(ARB_seamless_cube_map, cap);
+        ctx->Texture.CubeMapSeamless = state;
+        break;
+
       default:
          _mesa_error(ctx, GL_INVALID_ENUM,
                      "%s(0x%x)", state ? "glEnable" : "glDisable", cap);
@@ -1395,6 +1400,11 @@ _mesa_IsEnabled( GLenum cap )
         CHECK_EXTENSION(ATI_fragment_shader);
         return ctx->ATIFragmentShader.Enabled;
 #endif /* FEATURE_ATI_fragment_shader */
+
+      case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+        CHECK_EXTENSION(ARB_seamless_cube_map);
+        return ctx->Texture.CubeMapSeamless;
+
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
         return GL_FALSE;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 8870a20..195fdde 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -61,6 +61,7 @@ static const struct {
    { OFF, "GL_ARB_pixel_buffer_object",        F(EXT_pixel_buffer_object) },
    { OFF, "GL_ARB_point_parameters",           F(EXT_point_parameters) },
    { OFF, "GL_ARB_point_sprite",               F(ARB_point_sprite) },
+   { OFF, "GL_ARB_seamless_cube_map",          F(ARB_seamless_cube_map) },
    { OFF, "GL_ARB_shader_objects",             F(ARB_shader_objects) },
    { OFF, "GL_ARB_shading_language_100",       F(ARB_shading_language_100) },
    { OFF, "GL_ARB_shading_language_120",       F(ARB_shading_language_120) },
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 5666ad0..e9c8226 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -1015,6 +1015,10 @@ StateVars = [
        # GL_APPLE_vertex_array_object
        ( "GL_VERTEX_ARRAY_BINDING_APPLE", GLint, 
["ctx->Array.ArrayObj->Name"], "",
          ["APPLE_vertex_array_object"] ),
+
+       # GL_ARB_seamless_cube_map
+       ( "GL_TEXTURE_CUBE_MAP_SEAMLESS", GLboolean, 
["ctx->Texture.CubeMapSeamless"], "",
+         ["ARB_seamless_cube_map"] ),
 ]
 
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4117278..2d497ff 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1445,6 +1445,9 @@ struct gl_texture_attrib
 
    struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS];
 
+   /** GL_ARB_seamless_cubemap */
+   GLboolean CubeMapSeamless;
+
    /** GL_EXT_shared_texture_palette */
    GLboolean SharedPalette;
    struct gl_color_table Palette;
@@ -2458,6 +2461,7 @@ struct gl_extensions
    GLboolean ARB_multitexture;
    GLboolean ARB_occlusion_query;
    GLboolean ARB_point_sprite;
+   GLboolean ARB_seamless_cube_map;
    GLboolean ARB_shader_objects;
    GLboolean ARB_shading_language_100;
    GLboolean ARB_shading_language_120;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to