Jump to content

  • Log In with Google      Sign In   
  • Create Account


Stephen R

Member Since 07 Oct 2003
Offline Last Active Mar 22 2013 09:57 AM

Topics I've Started

Port 443 closed on gamedev.net

10 December 2012 - 07:52 AM

I tried to see if this bug has been reported elsewhere, but couldn't find anything. I can't connect to the https port on gamedev.net, which meant I couldn't log in. I was able to get around this by changing the the facebook login url to http (which should probably also not be allowed?). This was also the case when I tried to log in last night.

curl -v https://www.gamedev.net
* About to connect() to www.gamedev.net port 443 (#0)
* Trying 77.235.62.204... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host


[SOLVED] gluLookAt oddities

15 January 2008 - 09:58 AM

I'm trying to implement gluLookAt myself, out of a silly desire not to use GLU. I took the formula in the documentation and implemented it using my own matrix and vector classes and it works... kinda. It behaves in a completely sane way, and I'd be perfectly happy with it if it wasn't clearly a little bit more zoomed out than result of using gluLootAt. I've gone over the source in MESA and I can't find a single difference between my implementation and theirs... I'm on windows and wondering if MS distributes the source for their implementation (if it is even their implementation?) I couldn't find any info in my searches. My source and the MESA source:
//Mine

void Matrix::MakeLookAt(const Vector3& eye, const Vector3& center, const Vector3& up) {
	Vector3 f = center - eye;
	f.Normalize();

	Vector3 normalUp = up;
	normalUp.Normalize();

	Vector3 s = f.CrossProduct(up);
	Vector3 u = s.CrossProduct(f);

	Matrix M;
	M.MakeIdentity();

	M.Set(0,0,s[0]);
	M.Set(0,1,s[1]);
	M.Set(0,2,s[2]);
	M.Set(1,0,u[0]);
	M.Set(1,1,u[1]);
	M.Set(1,2,u[2]);
	M.Set(2,0,-f[0]);
	M.Set(2,1,-f[1]);
	M.Set(2,2,-f[2]);

	Matrix T;
	T.MakeTranslate(-eye.X(),-eye.Y(),-eye.Z());

	*this = M * T;
}

// MESA
void GLAPIENTRY
gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx,
	  GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy,
	  GLdouble upz)
{
    float forward[3], side[3], up[3];
    GLfloat m[4][4];

    forward[0] = centerx - eyex;
    forward[1] = centery - eyey;
    forward[2] = centerz - eyez;

    up[0] = upx;
    up[1] = upy;
    up[2] = upz;

    normalize(forward);

    /* Side = forward x up */
    cross(forward, up, side);
    normalize(side);

    /* Recompute up as: up = side x forward */
    cross(side, forward, up);

    __gluMakeIdentityf(&m[0][0]);
    m[0][0] = side[0];
    m[1][0] = side[1];
    m[2][0] = side[2];

    m[0][1] = up[0];
    m[1][1] = up[1];
    m[2][1] = up[2];

    m[0][2] = -forward[0];
    m[1][2] = -forward[1];
    m[2][2] = -forward[2];

    glMultMatrixf(&m[0][0]);
    glTranslated(-eyex, -eyey, -eyez);
}



Thanks a million. SOLUTION: Apparently the vectors that fill the first two rows of the matrix have to be normalized for it to behave exactly like glu32. [Edited by - Stephen R on January 15, 2008 6:29:26 PM]

Nordic Interactions

05 November 2007 - 10:19 AM

K, this question has been bugging me, and the internet isn't supplying me with any answers. Its a simple question - what language do people in the nordic countries (especially those in the IT field) use when interacting with each other? Like at a demoparty, what is the lingua franca? Thanks all

Can't create hardware video mode in SDL

22 June 2006 - 11:07 PM

Hey, I'm having a bit of an issue with my current project. The resolution is 800x600 and I'm not directly accessing pixel data so hardware mode should provide a performance boost. I create the screen with this line:
Screen = SDL_SetVideoMode(800,600,32,SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN);
It creates a video mode but it is never a hardware surface. I know this because the performance is the exact same as if I choose SDL_SWSURFACE and I check Screen->flags to see if it has the SDL_HWSURFACE bit, which it doesn't. My system is relatively high spec and should have no problem creating a hardware surface. I tried a few other resolutions from the supported resolution list in the DirectDraw tab of the DirectX SDK control panel, none created a hardware surface. I have no idea what could be causing it, and it is resulting in unnacceptable performance. Any help with this would be brilliant. I don't want to have to change my backend over to D3D at this stage, just to get hardware support. Thanks a million.

X Files from Blender missing UV coords.

26 May 2006 - 02:02 AM

I'm having a bit of trouble getting Blender to export the texture coords to a .x file. I have a very simple model. A UV sphere, with smoothed normals. I added a texture from a .bmp file to the material for the sphere, adjusted its alignment and rendered the scene to make sure its set up the way I want. The texture is showing, properly mapped in Blender. But when I go to export to .X it doesn't include a MeshTextureCoords object in the Mesh. I've also tried exporting to .3ds and using conv3ds to create the .x file. It includes a MeshTextureCoords object but all the coords are 0,0. I'm a complete newbie when it comes to 3d modelling, and am just trying to create test models to work with in my game. Any help would be greatly appreciated. There will be punch and pie for all who reply* [smile]! Thanks! *Terms and conditions apply

PARTNERS