mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 04:51:48 +00:00
Fixed: #944 Bloom for non NV Cards on OpenGL
This commit is contained in:
parent
e86622ceae
commit
295efc81c4
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