Summary:
The two buffer methods have improved from 40d18 and VBO no longer crashes. The other two 3D methods that were working for me in 40d18 are the same or worse.
All four 3D methods that worked for me in 40d18 now have wider fluctuations in FPS. The two buffer methods in 40d19 are at times faster than no partial print in 40d. Otherwise they are roughly the same or slower, depending on what that middle number means in the FPS display.
Fortress: Icywaters
40d
PARTIAL_PRINT:NO => 20 - 23 FPS
40d18
STANDARD => 18 FPS
PARTIAL:2 => 19 - 22 FPS
ACCUM_BUFFER => 16 - 18 FPS
FRAME_BUFFER => 18 - 19 FPS
VBO => crash on running
40d19
STANDARD => 17 - 19 FPS middle number same
PARTIAL:2 => 15 - 21 FPS middle number same
ACCUM_BUFFER => 23 - 28 FPS middle number 19 - 20
FRAME_BUFFER => 21 - 28 FPS middle number 19 - 20
VBO => 23 - 28 FPS middle number 19 - 20
SHADER => "Shader compilation failed; details in errorlog.txt" (maybe I don't have the required GPU?)
data/shader.vs preprocessed source:
#version 140 // -*- mode: C -*-
#define dimx 80
#define dimy 50
#define dispx 12
#define dispy 12
const vec4 colors[] = vec4[16](vec4(0,0,0,1.0), vec4(0.0509804,0.403922,0.768627,1.0), vec4(0.266667,0.619608,0.207843,1.0), vec4(0.337255,0.639216,0.803922,1.0), vec4(0.592157,0.101961,0.101961,1.0), vec4(1,0.431373,0.733333,1.0), vec4(0.470588,0.368627,0.184314,1.0), vec4(0.72549,0.752941,0.635294,1.0), vec4(0.345098,0.32549,0.337255,1.0), vec4(0.568627,0.792157,1,1.0), vec4(0.513726,0.831373,0.321569,1.0), vec4(0.690196,0.87451,0.843137,1.0), vec4(1,0.133333,0.133333,1.0), vec4(1,0.654902,0.964706,1.0), vec4(1,0.854902,0.352941,1.0), vec4(1,1,1,1.0));
#line 1 0
// Defines emitted by gridrectst::init_gl at load:
// dimx, dimy: Grid size of the screen array
// dispx, dispy: Grid-cell (font) size
// vec4 colors[16]: Color palette; first non-bold, then bold
#ifdef GRAPHICS
// offset_texpos, offset_addcolor, offset_grayscale, offset_cf, offset_cbr:
// offsets of the corresponding graphicst arrays in data
#endif
uniform usamplerBuffer data;
uniform samplerBuffer coords;
uniform isamplerBuffer fontmap;
uniform uint frame; // Counts up from 0
in vec4 gl_Vertex;
in int gl_VertexID;
flat out vec4 frontColor;
flat out vec4 backColor;
smooth out vec2 texCoords;
void main() {
int tile = gl_VertexID / 6;
int offset_tile = tile * 4;
int ch = int(texelFetch(data, offset_tile).a);
int fg = int(texelFetch(data, offset_tile+1).a);
int bg = int(texelFetch(data, offset_tile+2).a);
int bold = clamp(int(texelFetch(data, offset_tile+3).a), 0, 1);
#ifdef GRAPHICS
uint texpos = texelFetch(data, offset_texpos + offset_tile).a;
texpos += texelFetch(data, offset_texpos + offset_tile + 1).a * 256u;
texpos += texelFetch(data, offset_texpos + offset_tile + 2).a * 65536u;
texpos += texelFetch(data, offset_texpos + offset_tile + 3).a * 16777216u;
uint addcolor = texelFetch(data, offset_addcolor + offset_tile).a;
uint grayscale = texelFetch(data, offset_grayscale + offset_tile).a;
uint cf = texelFetch(data, offset_cf + offset_tile).a;
uint cbr = texelFetch(data, offset_cbr + offset_tile).a;
vec4 tex_square;
if (texpos != 0u && ch != 0) {
tex_square = texelFetch(coords, int(texpos));
if (grayscale != 0u) {
frontColor = colors[int(cf + cbr * 8u)];
} else if (addcolor != 0u) {
frontColor = colors[fg + bold * 8];
} else {
frontColor = vec4(1);
}
} else {
tex_square = texelFetch(coords, texelFetch(fontmap, ch).a);
frontColor = colors[fg + bold * 8];
}
#else
vec4 tex_square = texelFetch(coords, texelFetch(fontmap, ch).a);
frontColor = colors[fg + bold * 8];
#endif
vec2 coords[6] = vec2[](tex_square.sq, tex_square.tq, tex_square.tp,
tex_square.sq, tex_square.tp, tex_square.sp);
texCoords = coords[gl_VertexID % 6];
gl_Position = gl_Vertex;
backColor = colors[bg];
}
data/shader.vs shader compilation log (1291):
0(1) : error C0201: unsupported version 140
0(6) : warning C7532: global type vec4 requires "#version 100" or later
0(6) : warning C7551: OpenGL first class arrays require #version 120
0(6) : warning C7516: OpenGL does not allow constant arrays
0(6) : warning C7553: OpenGL array assignments require #version 120
0(15) : warning C7532: global type uint requires "#version 130" or later
0(18) : warning C7532: global type int requires "#version 100" or later
0(20) : warning C7022: unrecognized profile specifier "flat"
0(20) : error C0502: syntax error at token "flat"
0(20) : error C5060: out can't be used with non-varying frontColor
0(21) : warning C7022: unrecognized profile specifier "flat"
0(21) : error C0502: syntax error at token "flat"
0(21) : error C5060: out can't be used with non-varying backColor
0(22) : warning C7532: global type vec2 requires "#version 100" or later
0(22) : warning C7022: unrecognized profile specifier "smooth"
0(22) : error C0502: syntax error at token "smooth"
0(22) : error C5060: out can't be used with non-varying texCoords
0(63) : warning C7551: OpenGL first class arrays require #version 120
0(64) : warning C7553: OpenGL array assignments require #version 120
0(67) : warning C7532: global variable gl_Position requires "#version 100" or later
[WINDOWEDX:960]
[WINDOWEDY:600]
[FONT:Tileset_unknown_960x300_02.bmp]
WIN XP SP3
NVIDIA GeForce 9800 GTX+, resolution 1024 x 768
Pentium 4 3.80GHz
2.00GB Ram
Other notes:
I second, or third, or whatever, the comment that the FPS meter's new position is awkward. That was also true in 40d18, but I did not comment on it since no one else did. I'm not sure what was wrong with the old position on the left-hand side.
This version ends with a CTD if it does not find a necessary raw. It gives the program's error message with the name of the missing item, but then instead of exiting gracefully afterward, it gives the system error with the offer to report to Microsoft. 40d18 did not do this, by my admittedly vague recollection.
Edit: corrected that comparision used NO partial print for 40d