code/platform_win32/4ed_directx_render.cpp: Fixed the way texture array are updated. Note that the font provider rectangle packer contains a bug, and it will never produce several texture slice, it will only grow the texture on y to accommodate for more characters.
code/platform_win32/win32_opengl.cpp: Enabled double buffering to fix graphical glitches on AMD cards.
This commit is contained in:
parent
911df4ce05
commit
e4b4e5c943
|
@ -130,10 +130,11 @@ gl__fill_texture(Texture_Kind texture_kind, u32 texture, Vec3_i32 p, Vec3_i32 di
|
|||
box.right = p.x + dim.x;
|
||||
box.top = p.y;
|
||||
box.bottom = p.y + dim.y;
|
||||
box.front = p.z;
|
||||
box.back = p.z + dim.z;
|
||||
// TODO(simon): Try to make the font renderer several texture in the array to verify this works.
|
||||
g_directx.context->UpdateSubresource( tex->pointer, 0, &box, data, dim.x, dim.x * dim.y );
|
||||
box.front = 0;
|
||||
box.back = 1;
|
||||
|
||||
u32 sub_resource_index = D3D11CalcSubresource( 0 /* MipSlice */, p.z /* ArraySlice */, 1 /* MipLevels */ );
|
||||
g_directx.context->UpdateSubresource( tex->pointer, sub_resource_index, &box, data, dim.x, dim.x * dim.y );
|
||||
}
|
||||
|
||||
return(result);
|
||||
|
|
|
@ -191,7 +191,7 @@ win32_gl_create_window(HWND *wnd_out, HGLRC *context_out, DWORD style, RECT rect
|
|||
/* 0*/WGL_DRAW_TO_WINDOW_ARB, TRUE,
|
||||
/* 2*/WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
/* 4*/WGL_SUPPORT_OPENGL_ARB, TRUE,
|
||||
/* 6*/WGL_DOUBLE_BUFFER_ARB, false,
|
||||
/* 6*/WGL_DOUBLE_BUFFER_ARB, true,
|
||||
/* 8*/WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
|
||||
/*10*/WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, GL_TRUE,
|
||||
/*12*/0,
|
||||
|
|
Loading…
Reference in New Issue