Inside3D!
     

attaching csqc entities to the hud

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Wed Nov 14, 2007 8:18 am    Post subject: attaching csqc entities to the hud Reply with quote

i'm very curious if there's a proper way to do this that isn't FOV dependant.
_________________
-daemon [ daemonforge.org ]
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Nov 14, 2007 2:31 pm    Post subject: Reply with quote

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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Thu Nov 15, 2007 4:06 am    Post subject: Reply with quote

Seems to be working in DP. Very Happy

...but with pespective 0 I can't seem to get entities to draw.
_________________
-daemon [ daemonforge.org ]
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Nov 15, 2007 1:36 pm    Post subject: Reply with quote

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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group