- Viewing Profile: Posts: uzipaz
Community Stats
- Group Members
- Active Posts 27
- Profile Views 884
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Contacts
uzipaz hasn't added any contacts yet.
Posts I've Made
In Topic: Camera and Viewing Transformations
19 August 2012 - 06:05 AM
As you suggested, I will take a look at quaternions, I never heard this term before.
As far as camera and inverse transformations are concerned, this is what I am trying to do here already, the knowledge that I have with Opengl and viewing transformations come from the red book.
From what I understand, there is no such thing called a 'Camera' in Opengl library. If you want view an object that is drawn and centered at the origin, then you can either use the gluLookAt(0, 0, +z, 0, 0, 0, 0, 1, 0) or insted you can use glTranslatef(0, 0, -z), both of these will have the same effect (for this case at least).
From what I have studied and understand, the function name " LookAt " is like a false advertisement. You are not actually looking somewhere in the scene, it just applies inverse transformations to the whole scene and you think that you are moving a camera in the scene when you are acutally just transforming the scene. But then again, I might be incorrect here and its a completely different debate.
In my class, I am doing a similar thing, taking vector input in euclidean space and then finding the appropriate angle of rotations of heading and pitch, and then apply the inverse of this when I am rotating about an axis and it works fine as I please.
The problem I am having, is that if you take a look at my code, as long you give the initial arguments such that your hypothetical camera is located at the XZ plane, the heading will work fine, however, If I pitch or Roll to 180 degrees, and then I apply my heading calculation, then they will seem to work in reverse order. If I give the input to turn left, it will turn right and vice versa, because I am still rotating around this +ve y-axis.
Please note that, when I was trying to implement this class, I was not thinking in terms of matrices, I was thinking in terms of these transformation commands (glRotatef and glTranslatef).
In Topic: Updating opengl version
11 August 2012 - 12:23 AM
SDL 1.2 will not create an OpenGL 3 context for you. To get one with SDL, you have to use SDL2 and explicitly request a 3.x context using SDL_GL_SetAttribute with GL_CONTEXT_MAJOR_VERSION and GL_CONTEXT_MINOR_VERSION.
that might be it, I will try using the SDL 2.
What type of graphics card do you have?
ATI Mobility Radeon HD 4330
Other note, when I download the GLEW 1.90 win32 binary files, there was an .exe in its bin folder with name "glewinfo.exe", I executed and it generated a text file and what I think I did is to find out if all the functionalities provided by openGL versions are supported by my Video card ( I might be wrong here).
The text file said...
GLEW version 1.9.0
Reporting capabilities of pixelformat 1
Running on a ATI Mobility Radeon HD 4330 from ATI Technologies Inc.
OpenGL version 2.1.8781 is supported
From OpenGL Version 1.1 to OpenGL Version 3.0, all the fucntions had the status of 'OK', from 3.1 to 4.3 they were all "MISSING"
In Topic: Updating opengl version
10 August 2012 - 06:23 AM
OpenGL itself requires nothing new. Everything is already on your system if your graphics card driver supports it. It just needs to be queried via the extension mechanism.
GLEW itself needs to be linked though, as usual for libraries. It can be linked either statically or dynamically. Remember to define GLEW_STATIC before including glew.h if static linking is desired. You should not need anything beyond what is already included with GLEW, but that depends largely on what compiler you are using. The precompiled libraries should work with all flavours of MSVC though.
I never really worked with SDL, so I cannot really answer any questions about that. Both GLFW and SFML seem to support modern OpenGL fine though.
Thank you for the reply.
I have downloaded GLEW 1.90, I download the binary version, I am statically linking glew32.lib along with SDL.lib and SDLmain.lib(removed opengl32.lib and glu32.lib), replaced gl.h and glu.h inclusion from the program by glew.h and placed glew32.dll in my Systems 32 folder. My sample OpenGL program runs fine as it was already....
however, glGetString(GL_VERSION) still returns 2.1.8781.
I am not sure If I have everything I need or done it correctly... I think I should continue to learn with what I have... I am wasting a lot of time in this....
In Topic: Updating opengl version
10 August 2012 - 05:43 AM
When you say that I should use GLEW, then it means that it already contains the necessary header, .lib, .dll files that I need to work with opengl 3.0?
If I do use GLEW, will I still need to download the glext.h from www.opengl.org/registry?
Thank you for your answers...
In Topic: undefined reference to 'function'
06 August 2012 - 09:25 AM
Use free functions and group functions together using namespaces.
Sure, I will try that next time....
- Home
- » Viewing Profile: Posts: uzipaz

Find content