Couple o' questions/problems

Started by
3 comments, last by dirtypope 22 years, 8 months ago
number 1) my crosshair is pissing me off! =P mmkay, i have it centered in the screen and make it move with forward backward side/side, but i cant get it to stay in the center of screen no matter what, i want it to like move with the mouse etc, so i was wondering if i could use somthing similar to the, getCursorpos and setCursorpos, heres my current code for the crosshair, void Crosshair() { glBindTexture(GL_TEXTURE_2D, texture[4]); glTranslatef(chx,chy,chz-0.12f); glBegin(GL_QUADS); glColor3f(1.0f,1.0f,1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.003f, -0.003f, 0.003f); glTexCoord2f(0.003f, 0.0f); glVertex3f( 0.003f, -0.003f, 0.003f); glTexCoord2f(0.003f, 0.003f); glVertex3f( 0.003f, 0.003f, 0.003f); glTexCoord2f(0.0f, 0.003f); glVertex3f(-0.003f, 0.003f, 0.003f); glEnd(); } as you can see, it wont do any mouse movements... my 2nd question/problem is, i need a good tut on billboarding for my sun/moon im making and finally, is there a better way to make an object orbit arround some x,y,z coords/other objects that translatef... thx 9in advance, dirtypope
Theres no such thing as stupid people... only people with under clocked brains. -dirty
Advertisement
1/ setup a 2d orthogonal window (info in faq http://www.frii.com/~martz/oglfaq/ ) draw the crosshairs in the middle
2/ nate miller (google) has a demo + info
3/ not really to rotate around a point u must first translate the point to (0,0,0) + then perform the translation. u can do this with a cobination of glTranslate(..) + glRotate or glMultMatrix() or glLoadMatrix. the last 2 require u to do the maths
go to glvelocity.gamedev.net and then in to the code archhive there is a sampel of showing a crosshair
with source of course!
)
Bye THo
i dont think i set up the 2dortho window correctly, cuz i did it how that page said to draw 2d controlls to a 3d app, and when i did that, my textures all like started mixing and rotating when i moved etc etc, looked like my app was on some strong acid or somthing =P is there any tuts that go more in detail on that subject?
Theres no such thing as stupid people... only people with under clocked brains. -dirty
that crosshair class on the site isnt commented very well =(
Theres no such thing as stupid people... only people with under clocked brains. -dirty

This topic is closed to new replies.

Advertisement