• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code [SOLVED] Alpha issue when drawing application_surface manually

gnysek

Member
I've just noticed (but this happens probably even before GMS2), that there is issue with drawing application_surface manually.
When I enable it, and draw manually in Post-draw event, sprites which have alpha-transparency are blended in a strange way (like transparency between 1 - 254 is divided by 2):

App-surface disabled:
surf-disabled.jpg

App surface enabled:
surf-enabled.jpg


The code I'm using:
Code:
// CREATE
application_surface_draw_enable(false);
application_surface_enable(true);
Code:
// POST-DRAW
if (application_surface_is_enabled()) {
       draw_surface(application_surface, 0, 0);
}
And that's all. Anybody encountered this issue, or I'm forgetting about something here ?
 

gnysek

Member
Code:
if (application_surface_is_enabled()) {
       gpu_set_blendenable(false);
       draw_surface(application_surface, 0, 0);
       gpu_set_blendenable(true);
   }
Seems to work now :) Thanks!
 
Top