mi_shader_if.h File Reference
#include <mi_raylib.h>
#include <mi_lib.h>
Go to the source code of
this file.
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 DLL boundaries.
The indirection through abstract interface classes and virtual
member functions is needed in order to avoid symbol lookups across
dynamically loaded libraries (like for example shaders) by using
virtual function tables. It also makes it possible to provide new,
incompatible versions of the interface later.
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.
Function Documentation
LightList*
LightListFactory |
( |
miState * |
state, |
|
|
miTag * |
shader_light_list =
0 , |
|
|
int |
n_shader_lights =
0 |
|
) |
|
|
|
number of elements in above light list
- Parameters:
-
state |
the state |
shader_light_list |
used to overwrite default light list |
|
|
Acquire an instance of the mental ray C++ shader interface
extensions.
- Parameters:
-
|
version |
is the version number of the requested interface class. 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.
|
Copyright © 1986-2006 by mental images GmbH