FoxyOfJungle
Kazan Games
Hello!
I have a question:
Are
Because they're giving me incorrect proportions in my texture...
See:
1 - This works:
2 - Doesn't works:
Notes:
This texture is then received by the shader, then rendered to the screen in the same way as the first method.
view_get_surface():
Thanks for listening.
I have a question:
Are
sprite_create_from_surface()
and sprite_get_texture()
working normally?Because they're giving me incorrect proportions in my texture...
See:
1 - This works:
GML:
ftr_from_surface = view_get_surface(view_number);
ftr_from_surface_tex = surface_get_texture(ftr_from_surface);
2 - Doesn't works:
GML:
ftr_from_surface = view_get_surface(view_number);
ftr_from_surface_tex = sprite_get_texture(sprite_create_from_surface(ftr_from_surface, 0, 0, surface_get_width(ftr_from_surface), surface_get_height(ftr_from_surface), false, false, 0, 0), 0);
Notes:
- Above, the sprite is created with the wrong proportions...
- The surface and texture are created only once.
This texture is then received by the shader, then rendered to the screen in the same way as the first method.
view_get_surface():
GML:
function view_get_surface(view) {
var _w = view_wport[view];
var _h = view_hport[view];
var _s = surface_create(_w, _h);
surface_copy_part_fixed(_s, 0, 0, application_surface, view_xport[view], view_yport[view], _w, _h);
return _s;
}