Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411125 Posts in 69302 Topics- by 58375 Members - Latest Member: Essential34Games

March 13, 2024, 10:27:31 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 96 97 [98]
1941  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 04, 2009, 10:50:44 AM
see, the thing is that the plane I am drawing on IS z=0 so I don't know what's going wrong...
1942  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 04, 2009, 09:49:38 AM
right, Ive tried using zaphos's code, and got slightly better results.

I can now see that the opengl coordinate is being affected by the value fed in, however, by miniscule amounts.

also, I get a z value of 147, even though the one I put in is 0.
1943  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 04, 2009, 09:23:23 AM
As far as I'm aware I'm using perspective view, however I do have everything on the same plane...

I've tried putting in the top left and bottom right values for my window (when in fullscreen these are 640,512 and -640,-512 respectively) however I get the same results.

thanks for your help so far guys!
1944  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 04, 2009, 09:11:35 AM
yes, yes I am, however it still returns strange results
1945  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 04, 2009, 09:04:17 AM
no, it is too good to be true, when I use it I get the same value EVERY TIME, that of the centre of the screen, no matter what numbers I put into it

heres my code:
Code:
void GetPos(int x, int y)
{
GLint viewport[4];
GLdouble modelview[16];
GLdouble projection[16];
GLfloat winX, winY, winZ;
GLdouble posX, posY, posZ;
glGetDoublev( GL_MODELVIEW_MATRIX, modelview );
glGetDoublev( GL_PROJECTION_MATRIX, projection );
glGetIntegerv( GL_VIEWPORT, viewport );
winX = (float)x;
winY = (float)viewport[3]- (float)y;
winZ = 0.0;

gluUnProject( winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ);

        printf("X:%f Y:%f\n",posX,posY);
}
1946  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 03, 2009, 09:12:59 AM
@Ivan
That looks almost perfect for what I want to do, pets hope it's not to good to be true!
1947  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 03, 2009, 08:51:22 AM
Yes, I looked into that too, however all I really need is a way of turning the coordinates of the mouse in the window into an x,y coordinate at z=0
1948  Developer / Technical / Re: Finding visible area of OpenGL "world" using OpenGL and glut on: August 03, 2009, 07:45:01 AM
Thank you, I'll try this when I get a chance.
Thanks!
1949  Developer / Technical / Finding visible area of OpenGL "world" using OpenGL and glut on: August 03, 2009, 07:14:26 AM
Hey, I'm doing a game using glut and OpenGL and I need a way of finding the size of the area I am viewing in OpenGL coordinates so I can aim correctly with a mouse. I plan on having a character moving around a 2d world with the camera following him and need some way of figuring out the size of the are I am looking at at a certain z axis position so that I can then calculate where the player is aiming with his mouse.

Thanks In advance!

(btw I am writing this in c++)
 
1950  Developer / Playtesting / Re: Random-Platformer Demo on: July 28, 2009, 11:40:46 AM
hmm, wont run for me, says "not a valid win32 application"

(also, I'm assuming the graphics are place holder, as I KNOW that the sprite of the knight with the sword is a warhammer 40,000 space marine with chainsaw, and thus not your own art)
1951  Developer / Playtesting / Re: Game Name Clinic - I will rate your game's name on: July 25, 2009, 02:40:28 AM
Hmmm, I like the sound of kreisis 271. even if it is a pun it's quite a clever one
Thanks guys!
1952  Developer / Playtesting / Re: Obsessive Nuclear Testing Disorder on: July 22, 2009, 09:11:39 AM
My mistake, sorry. I assumed that that was the problem (or a similar one) that I had encountered that when sending an early buld of somthing I made to a freind, and it was fixed   by building in release mode

my mistake
1953  Developer / Playtesting / Re: Game Name Clinic - I will rate your game's name on: July 22, 2009, 08:47:10 AM
Hey I'm in the process of making a platforming, physics based shooter based around the idea of a malfunction in a robotics research lab (a little cliched I know) with all the robots gaining self conciousness, and you (An unaffected robot) being sent in to clean up. It's still in the planning stages, however I think that a good name would help shape the overall direction in the game. I was wondering if you guys had any suggestions for names or critiques for the ones I've already thought up.

(btw, I haven't checked any of theese for dupes, so if there are games with the same name, sorry!)
-Machinations
-Kreis (the protagonist is a circular robot, and kreis is German for circle)
-271 (the facility's reference number)

any ideas?
1954  Community / Townhall / Re: Wheelz, the Game on: July 19, 2009, 09:37:59 AM
Hey, that's built with box2d isint it? I remember it from their forum.
Looks pretty fun, I'll have to check it out when I get a chance...
1955  Developer / Playtesting / Re: Obsessive Nuclear Testing Disorder on: July 17, 2009, 08:19:13 AM
You shouldn't need to install the redistributable if you have built it in release configuration (assuming if course thAt you are using Microsoft visual c++)
Pages: 1 ... 96 97 [98]
Theme orange-lt created by panic