mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Add rest of the diff from the old nevrax code for pixel programs to NL3D
This commit is contained in:
parent
7da48d8866
commit
cb966505cc
6 changed files with 20 additions and 0 deletions
|
@ -133,6 +133,7 @@ public:
|
|||
// @{
|
||||
|
||||
virtual void disableHardwareVertexProgram();
|
||||
virtual void disableHardwarePixelProgram();
|
||||
virtual void disableHardwareVertexArrayAGP();
|
||||
virtual void disableHardwareTextureShader();
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@ public:
|
|||
*/
|
||||
// @{
|
||||
virtual void disableHardwareVertexProgram()=0;
|
||||
virtual void disableHardwarePixelProgram()=0;
|
||||
virtual void disableHardwareVertexArrayAGP()=0;
|
||||
virtual void disableHardwareTextureShader()=0;
|
||||
// @}
|
||||
|
|
|
@ -258,6 +258,11 @@ void IDriver::removeVtxPrgDrvInfoPtr(ItVtxPrgDrvInfoPtrList vtxPrgDrvInfoIt)
|
|||
{
|
||||
_VtxPrgDrvInfos.erase(vtxPrgDrvInfoIt);
|
||||
}
|
||||
// ***************************************************************************
|
||||
void IDriver::removePixelPrgDrvInfoPtr(ItPixelPrgDrvInfoPtrList pixelPrgDrvInfoIt)
|
||||
{
|
||||
_PixelPrgDrvInfos.erase(pixelPrgDrvInfoIt);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool IDriver::invalidateShareTexture (ITexture &texture)
|
||||
|
|
|
@ -213,6 +213,12 @@ void CDriverUser::disableHardwareVertexProgram()
|
|||
|
||||
_Driver->disableHardwareVertexProgram();
|
||||
}
|
||||
void CDriverUser::disableHardwarePixelProgram()
|
||||
{
|
||||
NL3D_HAUTO_UI_DRIVER;
|
||||
|
||||
_Driver->disableHardwarePixelProgram();
|
||||
}
|
||||
void CDriverUser::disableHardwareVertexArrayAGP()
|
||||
{
|
||||
NL3D_HAUTO_UI_DRIVER;
|
||||
|
|
|
@ -363,6 +363,7 @@ void CFlareModel::traverseRender()
|
|||
}
|
||||
// setup driver
|
||||
drv->activeVertexProgram(NULL);
|
||||
drv->activePixelProgram(NULL);
|
||||
drv->setupModelMatrix(fs->getLookAtMode() ? CMatrix::Identity : getWorldMatrix());
|
||||
// we don't change the fustrum to draw 2d shapes : it is costly, and we need to restore it after the drawing has been done
|
||||
// we setup Z to be (near + far) / 2, and setup x and y to get the screen coordinates we want
|
||||
|
@ -565,6 +566,7 @@ void CFlareModel::updateOcclusionQueryBegin(IDriver *drv)
|
|||
{
|
||||
nlassert(drv);
|
||||
drv->activeVertexProgram(NULL);
|
||||
drv->activePixelProgram(NULL);
|
||||
drv->setupModelMatrix(CMatrix::Identity);
|
||||
initStatics();
|
||||
drv->setColorMask(false, false, false, false); // don't write any pixel during the test
|
||||
|
@ -661,6 +663,7 @@ void CFlareModel::occlusionTest(CMesh &mesh, IDriver &drv)
|
|||
}
|
||||
drv.setColorMask(false, false, false, false); // don't write any pixel during the test
|
||||
drv.activeVertexProgram(NULL);
|
||||
drv.activePixelProgram(NULL);
|
||||
setupOcclusionMeshMatrix(drv, *_Scene);
|
||||
drv.activeVertexBuffer(const_cast<CVertexBuffer &>(mesh.getVertexBuffer()));
|
||||
// query drawn count
|
||||
|
|
|
@ -377,6 +377,9 @@ void CScene::endPartRender()
|
|||
// Reset profiling
|
||||
_NextRenderProfile= false;
|
||||
|
||||
IDriver *drv = getDriver();
|
||||
drv->activeVertexProgram(NULL);
|
||||
drv->activePixelProgram(NULL);
|
||||
|
||||
/*
|
||||
uint64 total = PSStatsRegisterPSModelObserver +
|
||||
|
@ -1561,6 +1564,7 @@ void CScene::renderOcclusionTestMeshs()
|
|||
nlassert(RenderTrav.getDriver());
|
||||
RenderTrav.getDriver()->setupViewport(RenderTrav.getViewport());
|
||||
RenderTrav.getDriver()->activeVertexProgram(NULL);
|
||||
RenderTrav.getDriver()->activePixelProgram(NULL);
|
||||
IDriver::TPolygonMode oldPolygonMode = RenderTrav.getDriver()->getPolygonMode();
|
||||
CMaterial m;
|
||||
m.initUnlit();
|
||||
|
|
Loading…
Reference in a new issue