|
@@ -396,6 +396,10 @@ DXGraphicsStateGuardian8(const FrameBufferProperties &properties) :
|
|
|
|
|
|
|
|
_cur_read_pixel_buffer=RenderBuffer::T_front;
|
|
_cur_read_pixel_buffer=RenderBuffer::T_front;
|
|
|
set_color_clear_value(_color_clear_value);
|
|
set_color_clear_value(_color_clear_value);
|
|
|
|
|
+
|
|
|
|
|
+ // DirectX drivers seem to consistently invert the texture when
|
|
|
|
|
+ // they copy framebuffer-to-texture. Ok.
|
|
|
|
|
+ _copy_texture_inverted = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -3148,7 +3152,7 @@ copy_texture(Texture *tex, const DisplayRegion *dr) {
|
|
|
|
|
|
|
|
HRESULT hr;
|
|
HRESULT hr;
|
|
|
int xo, yo, w, h;
|
|
int xo, yo, w, h;
|
|
|
- dr->get_region_pixels(xo, yo, w, h);
|
|
|
|
|
|
|
+ dr->get_region_pixels_i(xo, yo, w, h);
|
|
|
|
|
|
|
|
PixelBuffer *pb = tex->_pbuffer;
|
|
PixelBuffer *pb = tex->_pbuffer;
|
|
|
pb->set_xsize(w);
|
|
pb->set_xsize(w);
|
|
@@ -3240,7 +3244,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) {
|
|
|
nassertr(pb != NULL && dr != NULL, false);
|
|
nassertr(pb != NULL && dr != NULL, false);
|
|
|
|
|
|
|
|
int xo, yo, w, h;
|
|
int xo, yo, w, h;
|
|
|
- dr->get_region_pixels(xo, yo, w, h);
|
|
|
|
|
|
|
+ dr->get_region_pixels_i(xo, yo, w, h);
|
|
|
|
|
|
|
|
// only handled simple case
|
|
// only handled simple case
|
|
|
nassertr(xo == 0 && yo==0 && w == pb->get_xsize() && h == pb->get_ysize(), false);
|
|
nassertr(xo == 0 && yo==0 && w == pb->get_xsize() && h == pb->get_ysize(), false);
|