Please help! =)
I can't get the correct transformation in OpleGL.
I have point3D - P(X,Y,Z), and projection matrix M, which equal to K*(R|T) where
K - camera calibration matrix
(R|T) - point (object) coordinate system transformation (R - rotation matrix, T - translation vector)
As a result we have projected point as p = M*P
I kno...
I'm trying to use the Assimp library to import models to a rudimentary OpenGL application with VBO use.
If I understand it correctly glDrawElements is one of the ideal modern ways to draw things.
But how do we get that information from a generic import library?
If you have specific Assimp library knowledge it's appreciated.
--
What...
My application is a vector drawing application. It works with OpenGL. I will be modifying it to instead use the Cairo 2D graphics library. The issue is with zooming. With openGL camera and scale factor sort of work like this:
float scalediv = Current_Scene().camera.ScaleFactor / 2.0f;
float cameraX = GetCameraX();
float cameraY = Get...
I have tried so many different strategies to get a usable noise function and none of them work. So, how do you implement perlin noise on an ATI graphics card in GLSL?
Here are the methods I have tried:
I have tried putting the permutation and gradient data into a GL_RGBA 1D texture and calling the texture1D function. However, one call t...
I've created a C++ class (myPixmap) to encapsulate the work performed by the OpenGL GLUT toolkit. The display() member function of the class contains most of the code required to set up GLUT.
void myPixmap::display()
{
// open an OpenGL window if it hasn't already been opened
if (!openedWindow)
{
// command-line ar...
Given that I do something like this:
void glOrtho( GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble nearVal,
GLdouble farVal);
and the result is: http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xmlw could I achieve a matrix like this:
http://cairographics.org/manual...
I have a vector array of triangles which basically consist of a bunch of squares that need to be billboarded. Something that looks like
GLfloat vertexpositions[60 * 3];
// [x,y,z] * 6 for each square, and there are 10 squares
And after that, calling glDrawArray with the appropriate arguments to draw a total of 10 squares.
Is it poss...
I've written a small example program using OpenGL and GLUT to display a 2-by-2 grid of four colored squares using the glDrawPixels function. Unfortunately, I've found that:
The colors in the grid are not being displayed properly; and
When the glPixelZoom function is passed negative arguments to rotate the pixmap, nothing is displayed...
I'm trying to get a fairly simple effect; I'd like my sprites to be able to have their alpha channels used by GL (that is, translucent across parts of the image, but not all of it) as well as the entire sprite to have an "opacity" level that affects the entire sprite.
I've got the latter part, that was a simple enough matter of using GL...
What exactly is back face culling in OpenGL? Can you give mi a specific example with e.g. one triangle?
...
I am trying to get OpenGL and Glut running on Eclipse Linux FC13.
After spending two days on it, I admit that help is needed. On FC13 Eclipse, I see
/usr/include/GL and /usr/include/SDL -- so the libs are there. I started Eclipse, and then tried to run a simple program on it, just like suggested here. However, two things were missing in...
I'm trying to achieve an object rotation about 3 axes by incrementing values of rotation angles for axes, and displaying those axes to make next rotation direction predictable for the viewer. But after a few rotations, only rotation about Z-axis is performed in accord with displayed axis. Is there a chance it can be done simply, without ...
I tried to set up glew and then devIL/openIL in visual studio but still have runtime and link error .
I want to know it can be from openGL version of my visual studio or what?
what should i do for upgrading my openGL?
Thanks.
...
Hello.
I would like to create a browser based, interactive, realtime animation, showing the Earth as it goes around the sun, depending on the time of day and time of year. This animation should also (eventually) show the other planets in the solar system and the user should be able to pan around the solar system and see it from differen...
Hi all,
(Mac OS X, iOS apps)
Q. What does glDeleteTextures actually do, on the above platforms?
(The official documentation is... sparse, at best.)
In terms of mem management, do the textures actually get removed from the video card? (Or at least their space set to reusable?)
Cheers.
...
I am using the GL selection buffer to implement mouse picking. Unfortunately, OpenGL is returning hits in the selection buffer even for objects that are entirely occluded. For example, if there is a man hidden behind a wall, the selection buffer will include a hit record for the man even though he is not visible.
Selection is implemente...
using '#version 330 core' on NVIDIA,
By using glBindAttribLocation(program, 0, "in_Vertex"); the input vertex works with an "in vec4 in_Vertex;". However, I noticed without the OGL function call in the client app, it still works. It appears to be 'the default first input variable'. Why? Should it be omitted or be explicitly connected to...
Im using gluUnProject() to get the screen 2d coordinate in 3d world coordinate. I take 4 positions from each corner of the screen to get the area of visible objects.
How to check which points are inside that "rectangle" ?, i have no idea about the terms or anything. The image below shows what that "rectangle" looks like:
...
How can i perform backprojection in OpenGL?
Or how translate back projection model to forward projection model?
...
I'm having trouble wrapping my head around how these work. First, in a 2d game the projection matrix should be set up as ortho with left, right, top, bottom matching the window, right? But when the window resizes, should I just change glViewport, not the projection matrix? And how do I keep the aspect ratio?
Could someone explain the pu...