Classes | Namespaces | Typedefs | Functions
mi_shader_if.h File Reference
#include <mi_raylib.h>
#include <mi_lib.h>
#include <mi_shader.h>
#include "shader_framebuffer.h"
#include "shader_output.h"
#include "shader_map.h"
#include "shader_lightlist.h"
#include "shader_sds34.h"
#include "shader_mipremap.h"
#include "shader_importance.h"

Go to the source code of this file.

Classes

struct  mi::shader_v3::Interface
 Top level C++ mental ray interface extensions. More...
class  mi::shader_v3::Options
 Access to string options. More...
class  mi::shader_v3::Access_interface
 Interface wrapper class. More...

Namespaces

namespace  mi
 

Top level namespace of mental ray.


namespace  mi::shader_v3
 

Namespace containing mental ray C++ shader interface extensions.


Typedefs

typedef Access_interface mi::shader_v3::Interface_access
 Typedef for backwards compatibility.

Functions

mi::shader_v3::Interfacemi_get_shader_interface (int version=mi_ray_interface_version)
 Acquire an instance of the mental ray C++ shader interface extensions.

Detailed Description

mental ray C++ shader interface extensions.

This is a new C++ interface for shaders which extends the existing C-style shader interface to mental ray. It is implemented as abstract interface classes which do not require symbol lookups across dynamically loadable library boundaries, like shaders. It also makes it possible to provide new, even incompatible versions of the interface later.

Binaries which have been compiled with an older version of this header file typically work with newer versions of this interface as long as the new member functions have been appended at the end of the existing classes.

mi_shader_if.h is included from shader.h if the shader is compiled as C++ code; a shader does not need to include mi_shader_if.h directly.

The namespace alias shader_v3 is used to avoid conflict of inlined symbols between shader libraries compiled with different version. On Linux platforms, this relaxes the requirement to link shader libraries with the -Bsymbolic option.


Function Documentation

mi::shader_v3::Interface* mi_get_shader_interface ( int  version = mi_ray_interface_version)

Acquire an instance of the mental ray C++ shader interface extensions.

Parameters:
versionis the version number of the requested interface class and should usually be left at the default value. The passed version argument is used to support multiple different interface versions and should usually be the value of the variable mi_ray_interface_version in the defining header file. A future version of mental ray may optionally return a pointer to a newer version of the interface of a different type or in a different namespace, identified by a different version number.
Returns:
The returned pointer points to an object in mental ray which contains the interface functions as virtual methods (hence it is possible to call the interface routines from a dynamically loaded library without resolving the routine in a symbol table). The caller may not attempt to modify or delete the returned object but should call the mi::shader::Interface::release() method when done.

Referenced by mi::shader_v3::Interface::get().

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.