GOOENGINE: More cleanup
This commit is contained in:
@@ -588,10 +588,6 @@ void DRW_view_winmat_get(const DRWView *view, float mat[4][4], bool inverse);
|
||||
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse);
|
||||
void DRW_view_persmat_get(const DRWView *view, float mat[4][4], bool inverse);
|
||||
|
||||
/**
|
||||
* \return world space frustum corners.
|
||||
*/
|
||||
void DRW_view_frustum_corners_get(const DRWView *view, BoundBox *corners);
|
||||
/**
|
||||
* \return world space frustum sides as planes.
|
||||
* See #draw_frustum_culling_planes_calc() for the plane order.
|
||||
@@ -730,13 +726,6 @@ void DRW_draw_callbacks_post_scene();
|
||||
*/
|
||||
void DRW_state_reset_ex(DRWState state);
|
||||
void DRW_state_reset();
|
||||
/**
|
||||
* Use with care, intended so selection code can override passes depth settings,
|
||||
* which is important for selection to work properly.
|
||||
*
|
||||
* Should be set in main draw loop, cleared afterwards
|
||||
*/
|
||||
void DRW_state_lock(DRWState state);
|
||||
|
||||
/* Selection. */
|
||||
|
||||
|
||||
@@ -2050,11 +2050,6 @@ void DRW_view_clip_planes_set(DRWView *view, float (*planes)[4], int plane_len)
|
||||
}
|
||||
}
|
||||
|
||||
void DRW_view_frustum_corners_get(const DRWView *view, BoundBox *corners)
|
||||
{
|
||||
memcpy(corners, &view->frustum_corners, sizeof(view->frustum_corners));
|
||||
}
|
||||
|
||||
std::array<float4, 6> DRW_view_frustum_planes_get(const DRWView *view)
|
||||
{
|
||||
std::array<float4, 6> planes;
|
||||
|
||||
@@ -278,43 +278,6 @@ static void drw_state_validate()
|
||||
}
|
||||
}
|
||||
|
||||
void DRW_state_lock(DRWState state)
|
||||
{
|
||||
DST.state_lock = state;
|
||||
|
||||
/* We must get the current state to avoid overriding it. */
|
||||
/* Not complete, but that just what we need for now. */
|
||||
if (state & DRW_STATE_WRITE_DEPTH) {
|
||||
SET_FLAG_FROM_TEST(DST.state, GPU_depth_mask_get(), DRW_STATE_WRITE_DEPTH);
|
||||
}
|
||||
if (state & DRW_STATE_DEPTH_TEST_ENABLED) {
|
||||
DST.state &= ~DRW_STATE_DEPTH_TEST_ENABLED;
|
||||
|
||||
switch (GPU_depth_test_get()) {
|
||||
case GPU_DEPTH_ALWAYS:
|
||||
DST.state |= DRW_STATE_DEPTH_ALWAYS;
|
||||
break;
|
||||
case GPU_DEPTH_LESS:
|
||||
DST.state |= DRW_STATE_DEPTH_LESS;
|
||||
break;
|
||||
case GPU_DEPTH_LESS_EQUAL:
|
||||
DST.state |= DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
break;
|
||||
case GPU_DEPTH_EQUAL:
|
||||
DST.state |= DRW_STATE_DEPTH_EQUAL;
|
||||
break;
|
||||
case GPU_DEPTH_GREATER:
|
||||
DST.state |= DRW_STATE_DEPTH_GREATER;
|
||||
break;
|
||||
case GPU_DEPTH_GREATER_EQUAL:
|
||||
DST.state |= DRW_STATE_DEPTH_GREATER_EQUAL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DRW_state_reset()
|
||||
{
|
||||
DRW_state_reset_ex(DRW_STATE_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user