@@ -241,78 +241,108 @@ class adopt_stencil_op
241241// export
242242void CResourceManager::LS_Load ()
243243{
244- auto exporterFunc = [](lua_State* luaState) {
245- module (luaState)[class_<adopt_dx10options>(" _dx10options" )
246- .def (" dx10_msaa_alphatest_atoc" , &adopt_dx10options::_dx10_msaa_alphatest_atoc)
247- // .def("", &adopt_dx10options::_dx10Options ), // returns options-object
244+ // clang-format off
245+ auto exporterFunc = [](lua_State* luaState)
246+ {
247+ module (luaState)
248+ [
249+ class_<adopt_dx10options>(" _dx10options" )
250+ .def (" dx10_msaa_alphatest_atoc" , &adopt_dx10options::_dx10_msaa_alphatest_atoc)
251+ // .def("", &adopt_dx10options::_dx10Options ), // returns options-object
248252 ,
249253
250254 class_<adopt_dx10sampler>(" _dx10sampler" )
251- // .def("texture", &adopt_sampler::_texture , return_reference_to<1>())
252- // .def("project", &adopt_sampler::_projective , return_reference_to<1>())
253- // .def("clamp", &adopt_sampler::_clamp , return_reference_to<1>())
254- // .def("wrap", &adopt_sampler::_wrap , return_reference_to<1>())
255- // .def("mirror", &adopt_sampler::_mirror , return_reference_to<1>())
256- // .def("f_anisotropic", &adopt_sampler::_f_anisotropic , return_reference_to<1>())
257- // .def("f_trilinear", &adopt_sampler::_f_trilinear , return_reference_to<1>())
258- // .def("f_bilinear", &adopt_sampler::_f_bilinear , return_reference_to<1>())
259- // .def("f_linear", &adopt_sampler::_f_linear , return_reference_to<1>())
260- // .def("f_none", &adopt_sampler::_f_none , return_reference_to<1>())
261- // .def("fmin_none", &adopt_sampler::_fmin_none , return_reference_to<1>())
262- // .def("fmin_point", &adopt_sampler::_fmin_point , return_reference_to<1>())
263- // .def("fmin_linear", &adopt_sampler::_fmin_linear , return_reference_to<1>())
264- // .def("fmin_aniso", &adopt_sampler::_fmin_aniso , return_reference_to<1>())
265- // .def("fmip_none", &adopt_sampler::_fmip_none , return_reference_to<1>())
266- // .def("fmip_point", &adopt_sampler::_fmip_point , return_reference_to<1>())
267- // .def("fmip_linear", &adopt_sampler::_fmip_linear , return_reference_to<1>())
268- // .def("fmag_none", &adopt_sampler::_fmag_none , return_reference_to<1>())
269- // .def("fmag_point", &adopt_sampler::_fmag_point , return_reference_to<1>())
270- // .def("fmag_linear", &adopt_sampler::_fmag_linear , return_reference_to<1>())
255+ // .def("texture", &adopt_sampler::_texture, return_reference_to<1>())
256+ // .def("project", &adopt_sampler::_projective, return_reference_to<1>())
257+ // .def("clamp", &adopt_sampler::_clamp, return_reference_to<1>())
258+ // .def("wrap", &adopt_sampler::_wrap, return_reference_to<1>())
259+ // .def("mirror", &adopt_sampler::_mirror, return_reference_to<1>())
260+ // .def("f_anisotropic", &adopt_sampler::_f_anisotropic, return_reference_to<1>())
261+ // .def("f_trilinear", &adopt_sampler::_f_trilinear, return_reference_to<1>())
262+ // .def("f_bilinear", &adopt_sampler::_f_bilinear, return_reference_to<1>())
263+ // .def("f_linear", &adopt_sampler::_f_linear, return_reference_to<1>())
264+ // .def("f_none", &adopt_sampler::_f_none, return_reference_to<1>())
265+ // .def("fmin_none", &adopt_sampler::_fmin_none, return_reference_to<1>())
266+ // .def("fmin_point", &adopt_sampler::_fmin_point, return_reference_to<1>())
267+ // .def("fmin_linear", &adopt_sampler::_fmin_linear, return_reference_to<1>())
268+ // .def("fmin_aniso", &adopt_sampler::_fmin_aniso, return_reference_to<1>())
269+ // .def("fmip_none", &adopt_sampler::_fmip_none, return_reference_to<1>())
270+ // .def("fmip_point", &adopt_sampler::_fmip_point, return_reference_to<1>())
271+ // .def("fmip_linear", &adopt_sampler::_fmip_linear, return_reference_to<1>())
272+ // .def("fmag_none", &adopt_sampler::_fmag_none, return_reference_to<1>())
273+ // .def("fmag_point", &adopt_sampler::_fmag_point, return_reference_to<1>())
274+ // .def("fmag_linear", &adopt_sampler::_fmag_linear, return_reference_to<1>())
271275 ,
272276
273277 class_<adopt_compiler>(" _compiler" )
274278 .def (constructor<const adopt_compiler&>())
275- .def (" begin" , &adopt_compiler::_pass, return_reference_to<1 >())
276- .def (" begin" , &adopt_compiler::_passgs, return_reference_to<1 >())
277- .def (" sorting" , &adopt_compiler::_options, return_reference_to<1 >())
278- .def (" emissive" , &adopt_compiler::_o_emissive, return_reference_to<1 >())
279- .def (" distort" , &adopt_compiler::_o_distort, return_reference_to<1 >())
280- .def (" wmark" , &adopt_compiler::_o_wmark, return_reference_to<1 >())
281- .def (" fog" , &adopt_compiler::_fog, return_reference_to<1 >())
282- .def (" zb" , &adopt_compiler::_ZB, return_reference_to<1 >())
283- .def (" blend" , &adopt_compiler::_blend, return_reference_to<1 >())
284- .def (" aref" , &adopt_compiler::_aref, return_reference_to<1 >())
279+ .def (" begin" , &adopt_compiler::_pass, return_reference_to<1 >())
280+ .def (" begin" , &adopt_compiler::_passgs, return_reference_to<1 >())
281+ .def (" sorting" , &adopt_compiler::_options, return_reference_to<1 >())
282+ .def (" emissive" , &adopt_compiler::_o_emissive, return_reference_to<1 >())
283+ .def (" distort" , &adopt_compiler::_o_distort, return_reference_to<1 >())
284+ .def (" wmark" , &adopt_compiler::_o_wmark, return_reference_to<1 >())
285+ .def (" fog" , &adopt_compiler::_fog, return_reference_to<1 >())
286+ .def (" zb" , &adopt_compiler::_ZB, return_reference_to<1 >())
287+ .def (" blend" , &adopt_compiler::_blend, return_reference_to<1 >())
288+ .def (" aref" , &adopt_compiler::_aref, return_reference_to<1 >())
285289 // For compatibility only
286290 .def (" dx10color_write_enable" , &adopt_compiler::_dx10color_write_enable, return_reference_to<1 >())
287- .def (" color_write_enable" , &adopt_compiler::_dx10color_write_enable, return_reference_to<1 >())
288- .def (" dx10texture" , &adopt_compiler::_dx10texture, return_reference_to<1 >())
289- .def (" dx10stencil" , &adopt_compiler::_dx10Stencil, return_reference_to<1 >())
290- .def (" dx10stencil_ref" , &adopt_compiler::_dx10StencilRef, return_reference_to<1 >())
291- .def (" dx10atoc" , &adopt_compiler::_dx10ATOC, return_reference_to<1 >())
292- .def (" dx10zfunc" , &adopt_compiler::_dx10ZFunc, return_reference_to<1 >())
293-
294- .def (" dx10sampler" , &adopt_compiler::_dx10sampler) // returns sampler-object
295- .def (" dx10Options" , &adopt_compiler::_dx10Options), // returns options-object
296-
297- class_<adopt_blend>(" blend" ).enum_ (" blend" )[value (" zero" , int (D3DBLEND_ZERO)),
298- value (" one" , int (D3DBLEND_ONE)), value (" srccolor" , int (D3DBLEND_SRCCOLOR)),
299- value (" invsrccolor" , int (D3DBLEND_INVSRCCOLOR)), value (" srcalpha" , int (D3DBLEND_SRCALPHA)),
300- value (" invsrcalpha" , int (D3DBLEND_INVSRCALPHA)), value (" destalpha" , int (D3DBLEND_DESTALPHA)),
301- value (" invdestalpha" , int (D3DBLEND_INVDESTALPHA)), value (" destcolor" , int (D3DBLEND_DESTCOLOR)),
302- value (" invdestcolor" , int (D3DBLEND_INVDESTCOLOR)), value (" srcalphasat" , int (D3DBLEND_SRCALPHASAT))],
291+ .def (" color_write_enable" , &adopt_compiler::_dx10color_write_enable, return_reference_to<1 >())
292+ .def (" dx10texture" , &adopt_compiler::_dx10texture, return_reference_to<1 >())
293+ .def (" dx10stencil" , &adopt_compiler::_dx10Stencil, return_reference_to<1 >())
294+ .def (" dx10stencil_ref" , &adopt_compiler::_dx10StencilRef, return_reference_to<1 >())
295+ .def (" dx10atoc" , &adopt_compiler::_dx10ATOC, return_reference_to<1 >())
296+ .def (" dx10zfunc" , &adopt_compiler::_dx10ZFunc, return_reference_to<1 >())
297+
298+ .def (" dx10sampler" , &adopt_compiler::_dx10sampler) // returns sampler-object
299+ .def (" dx10Options" , &adopt_compiler::_dx10Options), // returns options-object
300+
301+ class_<adopt_blend>(" blend" )
302+ .enum_ (" blend" )
303+ [
304+ value (" zero" , int (D3DBLEND_ZERO)),
305+ value (" one" , int (D3DBLEND_ONE)),
306+ value (" srccolor" , int (D3DBLEND_SRCCOLOR)),
307+ value (" invsrccolor" , int (D3DBLEND_INVSRCCOLOR)),
308+ value (" srcalpha" , int (D3DBLEND_SRCALPHA)),
309+ value (" invsrcalpha" , int (D3DBLEND_INVSRCALPHA)),
310+ value (" destalpha" , int (D3DBLEND_DESTALPHA)),
311+ value (" invdestalpha" , int (D3DBLEND_INVDESTALPHA)),
312+ value (" destcolor" , int (D3DBLEND_DESTCOLOR)),
313+ value (" invdestcolor" , int (D3DBLEND_INVDESTCOLOR)),
314+ value (" srcalphasat" , int (D3DBLEND_SRCALPHASAT))
315+ ],
303316
304317 class_<adopt_cmp_func>(" cmp_func" )
305- .enum_ (" cmp_func" )[value (" never" , int (D3DCMP_NEVER)), value (" less" , int (D3DCMP_LESS)),
306- value (" equal" , int (D3DCMP_EQUAL)), value (" lessequal" , int (D3DCMP_LESSEQUAL)),
307- value (" greater" , int (D3DCMP_GREATER)), value (" notequal" , int (D3DCMP_NOTEQUAL)),
308- value (" greaterequal" , int (D3DCMP_GREATEREQUAL)), value (" always" , int (D3DCMP_ALWAYS))],
318+ .enum_ (" cmp_func" )
319+ [
320+ value (" never" , int (D3DCMP_NEVER)),
321+ value (" less" , int (D3DCMP_LESS)),
322+ value (" equal" , int (D3DCMP_EQUAL)),
323+ value (" lessequal" , int (D3DCMP_LESSEQUAL)),
324+ value (" greater" , int (D3DCMP_GREATER)),
325+ value (" notequal" , int (D3DCMP_NOTEQUAL)),
326+ value (" greaterequal" , int (D3DCMP_GREATEREQUAL)),
327+ value (" always" , int (D3DCMP_ALWAYS))
328+ ],
309329
310330 class_<adopt_stencil_op>(" stencil_op" )
311- .enum_ (" stencil_op" )[value (" keep" , int (D3DSTENCILOP_KEEP)), value (" zero" , int (D3DSTENCILOP_ZERO)),
312- value (" replace" , int (D3DSTENCILOP_REPLACE)), value (" incrsat" , int (D3DSTENCILOP_INCRSAT)),
313- value (" decrsat" , int (D3DSTENCILOP_DECRSAT)), value (" invert" , int (D3DSTENCILOP_INVERT)),
314- value (" incr" , int (D3DSTENCILOP_INCR)), value (" decr" , int (D3DSTENCILOP_DECR))]];
331+ .enum_ (" stencil_op" )
332+ [
333+ value (" keep" , int (D3DSTENCILOP_KEEP)),
334+ value (" zero" , int (D3DSTENCILOP_ZERO)),
335+ value (" replace" , int (D3DSTENCILOP_REPLACE)),
336+ value (" incrsat" , int (D3DSTENCILOP_INCRSAT)),
337+ value (" decrsat" , int (D3DSTENCILOP_DECRSAT)),
338+ value (" invert" , int (D3DSTENCILOP_INVERT)),
339+ value (" incr" , int (D3DSTENCILOP_INCR)),
340+ value (" decr" , int (D3DSTENCILOP_DECR))
341+ ]
342+ ];
315343 };
344+ // clang-format on
345+
316346 ScriptEngine.init (exporterFunc, false );
317347 // load shaders
318348 const char * shaderPath = RImplementation.getShaderPath ();
0 commit comments