I have 3 Vectors, Up Right and Front that represent a direction.
I need to convert these into an XYZ angle (3 floats) so i can use with glRotatef()
Please help
[EDIT]
Its not rendering properly. can you see if its anything blatant here: pastebin.com/f6683492d
...
This polygon could be shaped like a C
I tried the formula located here
http://stackoverflow.com/questions/217578/point-in-polygon-aka-hit-test
however it doesn't actually correctly predict if the point is in the polygon.
...
After learning more about how monotouch works, I believe I know the answer to this anyway, but can you use the cocos2d-iphone framework with monotouch? I believe most likely this will be a 'no', because cocos2d is an an objective c library and there would most probably have to be some sort of .net port for this to be achieved? is that so...
Hi SO,
I started playing with OpenGL and GLUT today. I would like to draw some points, but the problem is that they turn out to be squares, and I would like them to be round dots (filled circles).
This is what I do:
void onInitialization( )
{
glEnable( GL_POINT_SMOOTH );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, G...
Hi Friends,
I am just starting with openGL and it found myself disappointed as there is not clear reference at all regarding openGL. Even apple documents and sample codes are not that friendly fro laymen.
Can someone suggest me any easy to start kinda reference for openGL
...
heya, i am running linux (ubuntu),
I am having some trouble with this. i've tried downloading glut32.dll and sticking it in mingw's lib/ directory and also setting up the appropriate headers in include/, however - although the compile is fine - the linker has a serious problem looking up the symbols.
how do i go about doing this? how ...
The question is fairly self explanatory. I'm asking in terms of using texture coordinates that could have come from anywhere (a uniform, a varying, another texture fetch).
Say for example I do a texture fetch on a mipmapped (or anisotropically filtered) texture, and I use the square of a varying which was set in the vertex shader. I ass...
I have multiple input devices and I want to create a cursor for each one. I'm given x and y coordinates, and I want to draw it on the screen.
How do I calculate the x,y when using glTranslatef?
...
I am using artoolkit to create an augmented reality based project.I can load vrml 3d objects in the video feed using openvrml.
Now I wanted to load a bitmap or any other image file like jpg,png etc file on the marker in the video feed.How do I go about achieving this?
...
Most resources available online are very outdated. Specifically, they are all about OpenGL 2 which matches to DirectX 9.
The current specification is 3.2 which is equivalent (or, well, very close) to DirectX 10 (11). But the specification itself is very hard to read. In contrast, DirectX SDK is a wonderful piece of documentation, sample...
I am looking for a book that discusses about how to write a GUI libray.
...
Hi,
Currently I am developing an application in Jogl(My first application actually).
Frist I have to load model into the canvas from a .obj file.(I manage to do so).
Next is I have to use the mouse dragged event to draw stroke on the same canvans and it the stroke must be in front of the teapot.(I use GL.GL_LINE_STRIP)and (glu.gluUnpr...
I have a point at 0,0,0
I rotate the point 30 deg around the Y axis, then 30 deg around the X axis.
I then want to move the point 10 units forward.
I know how to work out the new X and Y position
MovementX = cos(angle) * MoveDistance;
MovementY = sin(angle) * MoveDistance;
But then I realised that these values will change because of ...
Hi,
(This is all in ortho mode, origin is in the top left corner, x is positive to the right, y is positive down the y axis)
I have a rectangle in world space, which can have a rotation m_rotation (in degrees).
I can work with the rectangle fine, it rotates, scales, everything you could want it to do.
The part that I am getting reall...
I have loaded an object from an object file into the scene.
I peform some transformation,mapulation on it.
How am I able to retrive the new information of the object?
Eg:all vertices new location after a rotation operation.
Thanks in advance.
...
I have create my own NSOpenGLView class, right now the data that i want to displayed with an inverted co-ordinate system.
The origin starts at the bottom-left corner. I would like to change it so that the co-ordinate starts at the top-left corner.
How should I inverted the view/setup a new co-ordinate system.
...
Here is an abstract of my code. I'm trying to use glutSpecialFunc to tell glut to use my KeyPress function
class Car : public WorldObject
{
public:
void KeyPress(int key, int x, int y)
{
}
Car()
{
glutSpecialFunc(&Car::KeyPress); // C2664 error
}
}
The error message I get is:
Error 1 error C2664: 'glutSpecialFunc' : cannot ...
Hi,
reading the docs i see that the glGetTexImage2d() function has a 'type' parameter.
The docs say that the type parameter "specifies the data type of the pixel data" and gives some examples of types such as GL_INT, GL_BYTE, etc.
but what does it mean precisely when the image format is GL_RGBA and GL_INT ? is it an int for each channe...
I was wondering if anyone knew of a simple opengl game engine for linux where the source is available to read.
I basically want to read the source to get a better idea of how things are put together without worrying about the code being cross platform or having fancy particle effects or anything.
...
Hello,
I'm wondering if anyone has/knows of any examples of networking code integrated with OpenGL.
Basically, I need to send position coordinates of something over a network to my OpenGL display... which would then draw the object at the correct position.
The problem I'm having is integrating my UDP code with the game. I basically ...