mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: #944 Bloom for non NV Cards on OpenGL
This commit is contained in:
parent
a964d89de5
commit
bbf5e94699
3 changed files with 16 additions and 2 deletions
|
@ -1273,7 +1273,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
_UserLightEnable[i]= false;
|
||||
|
||||
// init _DriverGLStates
|
||||
_DriverGLStates.init(_Extensions.ARBTextureCubeMap, _Extensions.NVTextureRectangle, _MaxDriverLight);
|
||||
_DriverGLStates.init(_Extensions.ARBTextureCubeMap, (_Extensions.NVTextureRectangle || _Extensions.EXTTextureRectangle), _MaxDriverLight);
|
||||
|
||||
|
||||
// Init OpenGL/Driver defaults.
|
||||
|
@ -4158,7 +4158,8 @@ bool CDriverGL::supportOcclusionQuery() const
|
|||
bool CDriverGL::supportTextureRectangle() const
|
||||
{
|
||||
H_AUTO_OGL(CDriverGL_supportTextureRectangle)
|
||||
return _Extensions.NVTextureRectangle;
|
||||
return (_Extensions.NVTextureRectangle ||
|
||||
_Extensions.EXTTextureRectangle);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -1143,6 +1143,14 @@ static bool setupNVTextureRectangle(const char *glext)
|
|||
return true;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
static bool setupEXTTextureRectangle(const char *glext)
|
||||
{
|
||||
H_AUTO_OGL(setupEXTTextureRectangle);
|
||||
CHECK_EXT("GL_EXT_texture_rectangle");
|
||||
return true;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
static bool setupFrameBufferObject(const char *glext)
|
||||
{
|
||||
|
@ -1311,6 +1319,9 @@ void registerGlExtensions(CGlExtensions &ext)
|
|||
// Check GL_NV_texture_rectangle
|
||||
ext.NVTextureRectangle = setupNVTextureRectangle(glext);
|
||||
|
||||
// Check GL_EXT_texture_rectangle
|
||||
ext.EXTTextureRectangle = setupEXTTextureRectangle(glext);
|
||||
|
||||
// Check GL_EXT_framebuffer_object
|
||||
ext.FrameBufferObject = setupFrameBufferObject(glext);
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ struct CGlExtensions
|
|||
bool NVTextureShader;
|
||||
bool NVOcclusionQuery;
|
||||
bool NVTextureRectangle;
|
||||
bool EXTTextureRectangle;
|
||||
bool FrameBufferObject;
|
||||
bool PackedDepthStencil;
|
||||
// true if NVVertexProgram and if we know that VP is emulated
|
||||
|
@ -181,6 +182,7 @@ public:
|
|||
result += ARBTextureCubeMap ? "ARBTextureCubeMap " : "";
|
||||
result += ATIEnvMapBumpMap ? "ATIEnvMapBumpMap " : "";
|
||||
result += NVTextureRectangle ? "NVTextureRectangle " : "";
|
||||
result += EXTTextureRectangle ? "EXTTextureRectangle " : "";
|
||||
result += ARBTextureNonPowerOfTwo ? "ARBTextureNonPowerOfTwo " : "";
|
||||
result += "texture stages(*) = ";
|
||||
result += NLMISC::toString(NbTextureStages);
|
||||
|
|
Loading…
Reference in a new issue