Advertisement

Cross hair

Started by January 12, 2001 06:34 PM
2 comments, last by Leyder Dylan 23 years, 10 months ago
Hi, With the lesson 22 or 23, we can use the mouse. How can i do to display a cross hair like in Half-Life ? Thanks in advance. dylan.leyder@ibelgique.com
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
You''ll need to impliments some billboarding routine, then just map a sem-transparent texture where you want the crosshair to be. By semi-transparent I mean only one color (usually black) has an alpha of 0 and all other values are 1.

HHSDrum@yahoo.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Advertisement
i wouldnt use billboards

just 2 viewmatrices eg
gluPerspective(...)
draw 3d stuff and world.

glOrtho(..)
draw HUD and 2d stuff like the crosshairs

http://members.xoom.com/myBollux
Why not use :

glRasterPos2f(..);
//print Cross hair

glTranslatef(..);
//draw 3d world



This should work just fine...

This topic is closed to new replies.

Advertisement