mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- fixed compile error in gl_skydome.cpp
- disable GL_ARB_buffer_storage when a -glversion parameter less than 4.0 is given. According to the spec this extension requires 4.0 so if emulating something lower it should not be used.
This commit is contained in:
parent
5e22c82e79
commit
0ce6b40672
2 changed files with 6 additions and 6 deletions
|
@ -229,6 +229,7 @@ void FSkyVertexBuffer::RenderDome(FMaterial *tex, int mode)
|
|||
{
|
||||
int rc = mRows + 1;
|
||||
|
||||
// The caps only get drawn for the main layer but not for the overlay.
|
||||
if (mode == SKYMODE_MAINLAYER && tex != NULL)
|
||||
{
|
||||
// if there's no shader we cannot use the default color from the buffer because the object color is part of the preset vertex attribute.
|
||||
|
@ -239,7 +240,7 @@ void FSkyVertexBuffer::RenderDome(FMaterial *tex, int mode)
|
|||
gl_RenderState.Apply();
|
||||
RenderRow(GL_TRIANGLE_FAN, 0);
|
||||
|
||||
PalEntry pe = tex->tex->GetSkyCapColor(true);
|
||||
pe = tex->tex->GetSkyCapColor(true);
|
||||
gl_RenderState.SetObjectColor(pe);
|
||||
gl_RenderState.Apply();
|
||||
RenderRow(GL_TRIANGLE_FAN, rc);
|
||||
|
|
|
@ -132,6 +132,9 @@ void gl_LoadExtensions()
|
|||
{
|
||||
I_FatalError("Unsupported OpenGL version.\nAt least GL 2.0 is required to run " GAMENAME ".\n");
|
||||
}
|
||||
gl.version = strtod(version, NULL);
|
||||
gl.glslversion = strtod((char*)glGetString(GL_SHADING_LANGUAGE_VERSION), NULL);
|
||||
if (gl.version < 3.f) gl.glslversion = 0.f;
|
||||
|
||||
// This loads any function pointers and flags that require a vaild render context to
|
||||
// initialize properly
|
||||
|
@ -140,11 +143,7 @@ void gl_LoadExtensions()
|
|||
|
||||
if (CheckExtension("GL_ARB_texture_compression")) gl.flags|=RFL_TEXTURE_COMPRESSION;
|
||||
if (CheckExtension("GL_EXT_texture_compression_s3tc")) gl.flags|=RFL_TEXTURE_COMPRESSION_S3TC;
|
||||
if (CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
||||
|
||||
gl.version = strtod(version, NULL);
|
||||
gl.glslversion = strtod((char*)glGetString(GL_SHADING_LANGUAGE_VERSION), NULL);
|
||||
if (gl.version < 3.f) gl.glslversion = 0.f;
|
||||
if (gl.version >= 4.f && CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&gl.max_texturesize);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
|
Loading…
Reference in a new issue