D
Dengar
Guest
im using gm studio1.4 and im trying to draw text on a wall in 3d. I'm using billboarding so its a 2d sprite that faces the player at all times, everything works except the text part.
the method im trying is to create a surface, then draw sprite and text to surface, then use surface as texture for the d3d_wall. but when I run the code below nothing is drawn.
ive not included the part that calculates the x1,x2,y1,y2 variables for drawing the wall as its not part of the problem.
I don't have a lot of experience with surfaces so I assume I'm just declaring things wrong, id be grateful for any help. also if you have a better way then please share.
the method im trying is to create a surface, then draw sprite and text to surface, then use surface as texture for the d3d_wall. but when I run the code below nothing is drawn.
ive not included the part that calculates the x1,x2,y1,y2 variables for drawing the wall as its not part of the problem.
I don't have a lot of experience with surfaces so I assume I'm just declaring things wrong, id be grateful for any help. also if you have a better way then please share.
Code:
su=surface_create(32, 32);
surface_set_target(su);
draw_clear_alpha(c_black,0.0);
draw_sprite(sprite4,spritedir,0,0);
draw_set_font(font0);
draw_text(0,0,"testing");
draw_set_font(-1);
d3d_draw_wall(x1,y1,16,x2,y2,0,surface_get_texture(su),1,1);
surface_reset_target();
surface_free(su);