Hi all,
May I please ask for some help understanding what I am doing wrong?
(or if what I need can be done)
Please review the screenshot below
This is a view sitting on the pit wall of a race track. The white box directly in front of the view is supposed to be a TV screen showing footage from around the racetrack.
I have just learnt about surfaces. I tried to draw the projection footage from the other cameras onto a surface. That surface is then used as a texture to draw this polygon.
NOTE: when ran properly, the polygon is not visible at all. Only if I white it all out on refresh can I get this white screen.
Here is the code...
Thank you in advance for any help anyone may have.
Nick
May I please ask for some help understanding what I am doing wrong?
(or if what I need can be done)
Please review the screenshot below
This is a view sitting on the pit wall of a race track. The white box directly in front of the view is supposed to be a TV screen showing footage from around the racetrack.
I have just learnt about surfaces. I tried to draw the projection footage from the other cameras onto a surface. That surface is then used as a texture to draw this polygon.
NOTE: when ran properly, the polygon is not visible at all. Only if I white it all out on refresh can I get this white screen.
Here is the code...
Code:
//Drawing to surface...
d3d_start()
surface_set_target(o_main.tv_screen)
draw_clear_alpha(c_white,1)
draw_set_alpha_test(true)
d3d_set_culling(false)
d3d_set_hidden(true)
d3d_set_zwriteenable(true)
d3d_set_projection_ext(cam_from_x,cam_from_y,cam_from_z,cam_to_x,
cam_to_y,cam_to_z,
0,0,1,45,1280/720,1,5000)
surface_reset_target()
//Drawing to screen
d3d_start()
draw_set_alpha_test(true)
d3d_set_culling(false)
d3d_set_hidden(true)
d3d_set_zwriteenable(true)
d3d_set_projection_ext(man_camf_x,man_camf_y,man_camf_z,man_camt_x,man_camt_y,man_camt_z,
0,0,1,45,1900/1000,0.1,5000)
//Drawing the TV
d3d_transform_set_identity()
d3d_transform_add_rotation_z(270)
d3d_transform_add_translation(man_camf_x,man_camf_y,man_camf_z)
draw_set_colour(c_white)
tex_tv = surface_get_texture(tv_screen)
d3d_model_draw(tv_model,0,0,0,tex_tv)
d3d_transform_set_identity()
Nick