Just ran into this problem, pretty sure it's related to this one, posted by txesmi:

when rendering into a bmap using bmap_rendertarget and draw_quad the quad does not get drawn if it's outside of the window's dimensions.

what I mean by this is that draw_quad can draw on sections of a rendertarget that are outside of the screen's resolution - but only if some part of the quad is inside the rendertarget's dimensions.

Looks like there's some culling going on that uses the dimensions of the engine window instead of the rendertarget's dimensions.

Here's an example to test:
Code:
#include <acknex.h>

void main()
{
	fps_max = 60;
	
	wait(1);
	
	video_set(256, 256, 0, 2);
	
	wait(1);
	
	//
	
	BMAP * RenderTarget = bmap_createblack(512, 512, 8888); // create 512x512 bmap used as rendertarget -> bigger than the video resolution (256x256)
	bmap_fill(RenderTarget, vector(40, 32, 30), 100); // fill it with some dark color
	
	BMAP * SomeQuad = bmap_createblack(100, 75, 8888); // create a bmap to draw
	bmap_fill(SomeQuad, vector(255, 255, 255), 100); // fill with white, this one is colored using draw_quad()'s color-parameter
	
	//
	
	bmap_rendertarget(RenderTarget, 0, 1); // render folowing stuff into bmap, keep the bmap's content
	
	draw_quad(SomeQuad, vector(  0,   0, 0), NULL, NULL, NULL, vector(120, 240,  40), 100, 0); // GREEN: draw at position: 0, 0
	draw_quad(SomeQuad, vector(150,  50, 0), NULL, NULL, NULL, vector( 30, 300, 240), 100, 0); // RED:   draw at position: 300, 100 
	draw_quad(SomeQuad, vector(250, 250, 0), NULL, NULL, NULL, vector(240, 140,  40), 100, 0); // BLUE:  partially outside, can draw outside
	draw_quad(SomeQuad, vector(290, 325, 0), NULL, NULL, NULL, vector(240, 240, 240), 100, 0); // [ISSUE #1]: WHITE: fully outside, this one gets culled
	
	bmap_rendertarget(NULL, 0, 0); // stop rendering into bmap
	
	//
	
	// [ISSUE #2]: without this the BMAP*'s content is lost when changing the video resolution or minimizing the game when running acknex in fullscreen
	bmap_to_format(RenderTarget, bmap_format(RenderTarget)); // force bmap rewrite
	
	video_set(512, 512, 0, 2); // set video resolution to the rendertarget's size
	
	//
	
	PANEL * test_pan = pan_create("flags = SHOW;", 0); // create panel to show the rendertarget's content
	test_pan.bmap = RenderTarget;
}


It starts up with a resolution of 256x256 and creates a 512x512 BMAP*.
Then it renders 4 rectangles into this BMAP* using draw_quad, a green one, a red one, a blue one and a white one.
After this the resolution changes from 256x256 to 512x512 and the rendered image is being displayed using a panel.
In the screenshot I also marked a purple and a white area:



The purple area shows the application's initial dimensions.
The green and red rectangle which are fully inside the window are rendered correctly as expected.
The blue one which only intersects the window's resolution partially is also rendered completely.
However, the white one - which is not inside the window - is not being rendered at all, it should appear where the white area is marked in the screenshot.

The code example also addresses another issue (marked with '[ISSUE #2]' in the above code example):
after using bmap_rendertarget on a BMAP*, it will lose it's content when changing the video resolution or minimizing the game when running acknex in fullscreen.
You can test this by commenting out the line with bmap_to_format();
I suspect that the bmap somehow stays a rendertarget, but I'm not too sure about this.

I sincerely hope that at least the first issue (the one related to draw_quad) can be solved somwhere in the near future since this is a crucial feature I need for my current project.

kind regards, Alex


POTATO-MAN saves the day! - Random