summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 789dadd)
raw | patch | inline | side by side (parent: 789dadd)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 19 Feb 2023 23:18:38 +0000 (02:18 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:18:56 +0000 (12:18 +0300) |
src/game/renders/opengl/r_render.pas | patch | blob | history | |
src/game/renders/opengl/r_textures.pas | patch | blob | history |
index 88c507977fe20c58463e93d20fa9c0e37fd1803f..76adb8ed193901f5252b8083e80ae280c89da652 100644 (file)
{$ENDIF}
procedure r_Render_LogGLInfo;
+ var size: GLint;
begin
+ size := 0;
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, @size);
e_LogWritefln('GL Vendor: %s', [glGetString(GL_VENDOR)]);
e_LogWritefln('GL Renderer: %s', [glGetString(GL_RENDERER)]);
e_LogWritefln('GL Version: %s', [glGetString(GL_VERSION)]);
e_LogWritefln('GL Shaders: %s', [glGetString(GL_SHADING_LANGUAGE_VERSION)]);
e_LogWritefln('GL Extensions: %s', [glGetString(GL_EXTENSIONS)]);
+ e_LogWritefln('GL Texture: %s', [size]);
end;
procedure r_Render_Initialize;
index 97d572c5776b02fac7f16af63070b832cc4933c0..56d2656c8c17e0e556e70e8525fc06e7e718537e 100644 (file)
begin
// auto, max possible reccomended by driver
glGetIntegerv(GL_MAX_TEXTURE_SIZE, @size);
- if size < 1 then size := 64;
+ size := size div 2; (* hack: on some devices max size may produce invalid texture *)
+ if size < 64 then size := 64; (* at least 64x64 are guarantied by specification *)
end
else
begin
begin
currentTexture2D := 0;
maxTileSize := r_Textures_GetMaxHardwareSize();
- e_LogWritefln('TEXTURE SIZE: %s', [maxTileSize]);
+ e_LogWritefln('Texture Tile Size: %s', [maxTileSize]);
end;
procedure r_Textures_Finalize;