Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
give scope lowest distance from camera
  • Loading branch information
Redotix committed Jun 19, 2024
commit ac01e5a335879cd82db90a6c56fcac0a80bdcb60
10 changes: 10 additions & 0 deletions src/Layers/xrRender/r__dsgraph_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ void R_dsgraph_structure::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fve
// HUD rendering
if (RI.val_bHUD)
{
if (sh->flags.isScope)
{
mapHUD_Node* N = mapHUD.insertInAnyWay(EPS);
N->val.ssa = SSA;
N->val.pObject = RI.val_pObject;
N->val.pVisual = pVisual;
N->val.Matrix = *RI.val_pTransform;
N->val.se = sh;
return;
}
if (sh->flags.bStrictB2F)
{
#if RENDER!=R_R1
Expand Down
8 changes: 4 additions & 4 deletions src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ void CResourceManager::LS_Load()
.def("zb", &adopt_compiler::_ZB, return_reference_to(_1))
.def("blend", &adopt_compiler::_blend, return_reference_to(_1))
.def("aref", &adopt_compiler::_aref, return_reference_to(_1))

.def("scope", &adopt_compiler::_o_scope, return_reference_to(_1))

// For compatibility only
.def("dx10color_write_enable", &adopt_compiler::_dx10color_write_enable, return_reference_to(_1))
.def("color_write_enable", &adopt_compiler::_dx10color_write_enable, return_reference_to(_1))
Expand All @@ -413,10 +416,7 @@ void CResourceManager::LS_Load()
.def("dx10zfunc", &adopt_compiler::_dx10ZFunc, return_reference_to(_1))

.def("dx10sampler", &adopt_compiler::_dx10sampler) // returns sampler-object
.def("dx10Options", &adopt_compiler::_dx10Options) // returns options-object


.def("dx10Scope", &adopt_compiler::_o_scope, return_reference_to(_1)),
.def("dx10Options", &adopt_compiler::_dx10Options), // returns options-object


class_<adopt_blend>("blend")
Expand Down