Jump to content


Kriptic

Member Since 31 Mar 2012
Offline Last Active Today, 02:05 AM

Topics I've Started

D3D_Draw_Floor Overlap

21 February 2013 - 12:40 AM

Does anyone know why this is happening?
https://docs.google....dit?usp=sharing

Im using d3d_draw_floor to draw the water, and to draw the shadow. For some reason when they overlap it blends with the room color.

Surface Confusion

08 November 2012 - 03:39 AM

I run this in the draw event of my object:
//surface_reset_target();
if(surface_exists(forground_surface))
{
    draw_surface_part(forground_surface,0,0,1280,736,0,0);
}else
{
    init_forground();
}

and I get the image on the left.

But if I uncomment the surface_reset_target(), I get the image on the right.

The tree's on the left image shouldn't be semi-transparent, but at least I see them. On the right, nothing appears.

The reason this confuses me, is that surface_reset_target() makes GMS draw to the screen, so how come when I run it before drawing, I don't see the surface I'm trying to draw.  (Also I know I spelled foreground wrong, but I was consistent throughout my code so :P)

>K

https://docs.google.com/open?id=0B6ZjMqHBpS9wa05vQ3BPM0JtTVU

Does a "with" follow Depth

04 November 2012 - 11:36 PM

If I have a loop like this:

with(myObj)
{
       doSomething();
}



Will it run it the same order as the draw order?

If not, is there anyway to get a list of the order instances are being drawn?
>K

EDIT: Actually, a better question to ask is: Is there a big performance drop in calling "surface_set_target" a bunch of times?

EDIT2: sorry, I keep adding to this. Is there a performance drop in constantly changing the blending mode with "draw_set_blend_mode_ext" ?

YoYo mouse screen position

01 April 2012 - 04:31 AM

Is there a way to get the xy coordinates of a touch, but get the xy of where on the screen it was pressed, As opposed to where in the room?

YoYo_MouseX(device) returns the x value in the room, not the x value on the screen.