Merge pull request #1619 from kd-11/gl_shadowmap_clamp

gl: Fix RTT clamp mode; Fix vertex winding for emulated QUAD_STRIP triangles
This commit is contained in:
B1ackDaemon 2016-03-24 13:25:14 +02:00
commit cf402c8954
2 changed files with 4 additions and 2 deletions

View File

@ -333,8 +333,8 @@ void write_index_array_for_non_indexed_non_native_primitive_to_buffer(char* dst,
typedDst[6 * i + 2] = 2 * i + 2 + first;
// Second triangle
typedDst[6 * i + 3] = 2 * i + 2 + first;
typedDst[6 * i + 4] = 2 * i + 3 + first;
typedDst[6 * i + 5] = 2 * i + 1 + first;
typedDst[6 * i + 4] = 2 * i + 1 + first;
typedDst[6 * i + 5] = 2 * i + 3 + first;
}
return;
case rsx::primitive_type::points:

View File

@ -94,6 +94,7 @@ struct gl_render_target_traits
.type(format.type)
.format(format.format)
.swizzle(format.swizzle.r, format.swizzle.g, format.swizzle.b, format.swizzle.a)
.wrap(gl::texture::wrap::clamp_to_border, gl::texture::wrap::clamp_to_border, gl::texture::wrap::clamp_to_border)
.apply();
__glcheck result->pixel_pack_settings().swap_bytes(format.swap_bytes).aligment(1);
@ -120,6 +121,7 @@ struct gl_render_target_traits
.type(format.type)
.format(format.format)
.internal_format(format.internal_format)
.wrap(gl::texture::wrap::clamp_to_border, gl::texture::wrap::clamp_to_border, gl::texture::wrap::clamp_to_border)
.apply();
__glcheck result->pixel_pack_settings().aligment(1);