예제 #1
0
	liqLightHandle Renderer::shader_light(
		const liqShader &shader,
		const std::vector<liqTokenPointer> &tokenPointerArray
		)
	{
		CM_TRACE_FUNC("Renderer::shader_light("<<shader.getName()<<", tokenPointerArray)");

		int shaderParamCount = tokenPointerArray.size() - 1;
		boost::scoped_array< liqToken > tokenArray( new liqToken[ tokenPointerArray.size() ] );
		boost::scoped_array< liqPointer > pointerArray( new liqPointer[ tokenPointerArray.size() ] );
		assignTokenArrays( tokenPointerArray.size(), &tokenPointerArray[ 0 ], tokenArray.get(), pointerArray.get() );

		return RiLightSourceV( const_cast<char *>(shader.getShaderFileName().c_str()), shaderParamCount, tokenArray.get(), pointerArray.get() );
	}
예제 #2
0
RtLightHandle
RiLightSource(RtToken name, ...)
{
    RtInt      n;
    va_list    args;
    RtToken   *tokens;
    RtPointer *params;
    RtLightHandle handle;

    va_start(args, name);

    n = ri_util_paramlist_build(args, &tokens, &params);

    va_end(args);

    handle = RiLightSourceV(name, n, tokens, params);

    ri_util_paramlist_free(tokens, params);

    return handle;
}