mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
- moved some code to better places.
- allow GL version 3.0 in Windows, too.
This commit is contained in:
parent
5cc43137a1
commit
32f08adaf3
4 changed files with 11 additions and 11 deletions
|
@ -127,14 +127,6 @@ void OpenGLFrameBuffer::InitializeState()
|
||||||
gl_LoadExtensions();
|
gl_LoadExtensions();
|
||||||
Super::InitializeState();
|
Super::InitializeState();
|
||||||
|
|
||||||
int v;
|
|
||||||
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &v);
|
|
||||||
gl.maxuniforms = v;
|
|
||||||
glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &v);
|
|
||||||
gl.maxuniformblock = v;
|
|
||||||
glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &v);
|
|
||||||
gl.uniformblockalignment = v;
|
|
||||||
|
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
first=false;
|
first=false;
|
||||||
|
|
|
@ -137,6 +137,14 @@ void gl_LoadExtensions()
|
||||||
if (CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
if (CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int v;
|
||||||
|
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &v);
|
||||||
|
gl.maxuniforms = v;
|
||||||
|
glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &v);
|
||||||
|
gl.maxuniformblock = v;
|
||||||
|
glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &v);
|
||||||
|
gl.uniformblockalignment = v;
|
||||||
|
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&gl.max_texturesize);
|
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&gl.max_texturesize);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -814,7 +814,7 @@ CCMD(textureinfo)
|
||||||
if (tex->gl_info.SystemTexture[0] || tex->gl_info.SystemTexture[1] || tex->gl_info.Material[0] || tex->gl_info.Material[1])
|
if (tex->gl_info.SystemTexture[0] || tex->gl_info.SystemTexture[1] || tex->gl_info.Material[0] || tex->gl_info.Material[1])
|
||||||
{
|
{
|
||||||
int lump = tex->GetSourceLump();
|
int lump = tex->GetSourceLump();
|
||||||
Printf(PRINT_LOG, "Texture '%s' (Index %d, Lump %d, Name '%s'):\n", (const char*)(tex->Name), i, lump, Wads.GetLumpFullName(lump));
|
Printf(PRINT_LOG, "Texture '%s' (Index %d, Lump %d, Name '%s'):\n", tex->Name.GetChars(), i, lump, Wads.GetLumpFullName(lump));
|
||||||
if (tex->gl_info.Material[0])
|
if (tex->gl_info.Material[0])
|
||||||
{
|
{
|
||||||
Printf(PRINT_LOG, "in use (normal)\n");
|
Printf(PRINT_LOG, "in use (normal)\n");
|
||||||
|
|
|
@ -775,8 +775,8 @@ bool Win32GLVideo::InitHardware (HWND Window, int multisample)
|
||||||
if (myWglCreateContextAttribsARB != NULL)
|
if (myWglCreateContextAttribsARB != NULL)
|
||||||
{
|
{
|
||||||
// let's try to get the best version possible. Some drivers only give us the version we request
|
// let's try to get the best version possible. Some drivers only give us the version we request
|
||||||
// which breaks all version checks for feature support. The highest used features we use are from version 4.4, and 3.3 is a requirement.
|
// which breaks all version checks for feature support. The highest used features we use are from version 4.4, and 3.0 is a requirement.
|
||||||
static int versions[] = { 45, 44, 43, 42, 41, 40, 33, -1 };
|
static int versions[] = { 45, 44, 43, 42, 41, 40, 33, 32, 31, 30, -1 };
|
||||||
|
|
||||||
for (int i = 0; versions[i] > 0; i++)
|
for (int i = 0; versions[i] > 0; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue