attaching csqc entities to the hud
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
attaching csqc entities to the hud
i'm very curious if there's a proper way to do this that isn't FOV dependant.
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
Draw the view as normal. Then...
clear the scene.
set the viewport min pos, size to place the new scene on the hud. (VF_MIN, VF_SIZE)
I recommend you try setting VF_PERSPECTIVE(200) to 0 too.
set VF_ORIGIN to '0 0 0'.
set VF_ANGLES to '0 0 0' (or some other usable constant).
set VF_DRAWWORLD to 0!
Add an entity with R_AddEntity set to some displacement so that it is visible in the mini scene. With the approriate model and optional rotation.
Call R_RenderScene.
You now have an entity shown on your hud in a place that doesn't move when you change the fov, clamped to within a box.
This is the 'official' method. It does work in FTE. I hear DP doesn't support it though, as DP will clear the colour buffer when you render the second scene - wiping the main view.
clear the scene.
set the viewport min pos, size to place the new scene on the hud. (VF_MIN, VF_SIZE)
I recommend you try setting VF_PERSPECTIVE(200) to 0 too.
set VF_ORIGIN to '0 0 0'.
set VF_ANGLES to '0 0 0' (or some other usable constant).
set VF_DRAWWORLD to 0!
Add an entity with R_AddEntity set to some displacement so that it is visible in the mini scene. With the approriate model and optional rotation.
Call R_RenderScene.
You now have an entity shown on your hud in a place that doesn't move when you change the fov, clamped to within a box.
This is the 'official' method. It does work in FTE. I hear DP doesn't support it though, as DP will clear the colour buffer when you render the second scene - wiping the main view.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Seems to be working in DP.
...but with pespective 0 I can't seem to get entities to draw.
...but with pespective 0 I can't seem to get entities to draw.
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
well, disabling perspective (making it isometric/parallel projection or whatever else you want to call it) is an optional feature. But it makes the hud look nicer without making the objects distorted. You can supposedly achieve a similar effect with a very small fov and putting the object further away (I think), although this is less mathematically precise.
In FTE with perspective disabled, the fov specified is not the angle of the view (technically the angle here is always 0). It is instead how wide the view is in qu. That is if you have a model that is 64*64 when drawn 2d, setting the fov to 64 will make the view range from -32 to 32. Its a bit of a kludge though, so set both x/y fov explicitly.
I don't know what happens in DP.
In FTE with perspective disabled, the fov specified is not the angle of the view (technically the angle here is always 0). It is instead how wide the view is in qu. That is if you have a model that is 64*64 when drawn 2d, setting the fov to 64 will make the view range from -32 to 32. Its a bit of a kludge though, so set both x/y fov explicitly.
I don't know what happens in DP.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest