static void\r
_3dlabs_shhandle_destructor (struct gl2_unknown_intf **intf)\r
{\r
+#if FEATURE_shading_language\r
struct gl2_3dlabs_shhandle_impl *impl = (struct gl2_3dlabs_shhandle_impl *) intf;\r
\r
ShDestruct (impl->_obj.handle);\r
_unkinner_destructor (intf);\r
+#else\r
+ (void) _unkinner_destructor;\r
+#endif\r
}\r
\r
static GLvoid *\r
static GLvoid\r
_shader_Compile (struct gl2_shader_intf **intf)\r
{\r
+#if FEATURE_shading_language\r
struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf;\r
char **strings;\r
TBuiltInResource res;\r
if (ShCompile (impl->_obj._3dlabs_shhandle._obj.handle, strings, impl->_obj.offset_count,\r
EShOptFull, &res, 0))\r
impl->_obj.compile_status = GL_TRUE;\r
-\r
if (impl->_obj.offset_count > 1)\r
{\r
GLsizei i;\r
\r
impl->_obj._generic.info_log = _mesa_strdup (ShGetInfoLog (\r
impl->_obj._3dlabs_shhandle._obj.handle));\r
+#endif\r
}\r
\r
static struct gl2_shader_intf _shader_vftbl = {\r
static void\r
_program_destructor (struct gl2_unknown_intf **intf)\r
{\r
+#if FEATURE_shading_language\r
struct gl2_program_impl *impl = (struct gl2_program_impl *) intf;\r
\r
ShDestruct (impl->_obj.linker);\r
ShDestruct (impl->_obj.uniforms);\r
+#endif\r
_container_destructor (intf);\r
}\r
\r
static GLvoid\r
_program_Link (struct gl2_program_intf **intf)\r
{\r
+#if FEATURE_shading_language\r
struct gl2_program_impl *impl = (struct gl2_program_impl *) intf;\r
ShHandle *handles;\r
GLuint i;\r
impl->_obj.link_status = GL_TRUE;\r
\r
impl->_obj._container._generic.info_log = _mesa_strdup (ShGetInfoLog (impl->_obj.linker));\r
+#endif\r
}\r
\r
static GLvoid\r
static void\r
_program_constructor (struct gl2_program_impl *impl)\r
{\r
+#if FEATURE_shading_language\r
_container_constructor ((struct gl2_container_impl *) impl);\r
impl->_vftbl = &_program_vftbl;\r
impl->_obj._container._generic._unknown._destructor = _program_destructor;\r
impl->_obj.validate_status = GL_FALSE;\r
impl->_obj.linker = ShConstructLinker (EShExVertexFragment, 0);\r
impl->_obj.uniforms = ShConstructUniformMap ();\r
+#else\r
+ (void) _container_constructor;\r
+ (void) _program_destructor;\r
+ (void) _program_vftbl;\r
+#endif\r
}\r
\r
struct gl2_fragment_shader_obj\r
static void\r
_fragment_shader_constructor (struct gl2_fragment_shader_impl *impl)\r
{\r
+#if FEATURE_shading_language\r
_shader_constructor ((struct gl2_shader_impl *) impl);\r
impl->_vftbl = &_fragment_shader_vftbl;\r
impl->_obj._shader._generic._unknown._destructor = _fragment_shader_destructor;\r
impl->_obj._shader._3dlabs_shhandle._obj.handle = ShConstructCompiler (EShLangFragment, 0);\r
+#else\r
+ (void) _shader_constructor;\r
+ (void) _fragment_shader_vftbl;\r
+ (void) _fragment_shader_destructor;\r
+#endif\r
}\r
\r
struct gl2_vertex_shader_obj\r
static void\r
_vertex_shader_constructor (struct gl2_vertex_shader_impl *impl)\r
{\r
+#if FEATURE_shading_language\r
_shader_constructor ((struct gl2_shader_impl *) impl);\r
impl->_vftbl = &_vertex_shader_vftbl;\r
impl->_obj._shader._generic._unknown._destructor = _vertex_shader_destructor;\r
impl->_obj._shader._3dlabs_shhandle._obj.handle = ShConstructCompiler (EShLangVertex, 0);\r
+#else\r
+ (void) _vertex_shader_vftbl;\r
+ (void) _vertex_shader_destructor;\r
+#endif\r
}\r
\r
GLhandleARB\r
void\r
_mesa_init_shaderobjects_3dlabs (GLcontext *ctx)\r
{\r
+#if FEATURE_shading_language\r
_glslang_3dlabs_InitProcess ();\r
_glslang_3dlabs_ShInitialize ();\r
+#endif\r
}\r
\r