I am having trouble implementing a trackball rotation on OpenGL. When I rotate my cube using the trackball rotation 90 degrees to the right along the X axis (dragging mouse left to right on screen) and then try rotating it dragging my mouse from the top to the bottom of the screen, I expect the cube to rotate along my perspective's y-axi...
Greetings all,
As seen in the image
I draw set of contours (polygons) as GL_LINE_STRIP.
Now I want to select curve(polygon) under the mouse to delete,move..etc in 3D .
I am wondering which method to use:
1.use OpenGL picking and selection. ( glRenderMode(GL_SELECT) )
2.use manual collision detection , by using a pick-ray and che...
I am trying to use geometry shaders in my OpenGL application that is currently using Freeglut, and I am trying to use GLEW to do that because as I understand it, the geometry shader functionality is in an extension. My include order is as follows:
#define GLEW_STATIC
#include <glew.h>
#include "freeglut.h"
However when I do t...
In OpenGL I have always understood that glEnable(GL_TEXTURE1D), glEnable(GL_TEXTURE2D) and/or glEnable(GL_TEXTURE3D) (and corresponding glDisable) is a per texture unit parameter.
Recently I tried to confirm this but have not found any clear documentation confirming either way regarding this question.
Put simply and in code, should I...
Reviewing for midterm, need some help with the following:
Given the points p0 = [1 0] and p1 = [4 6] write the implicit equation for a line in vector form (i.e. compute the appropriate v and n). Is the point p2 = [1.5 3] on the line or above or below the line?
What is the equation for a plane with the norman n = [5 3 4] going through t...
Hi guys.
I got a problem and need you help.
I'm about to implement a model slicing algorithm. The idea is simple.
User selects with mouse the vector along wich the clipping pan have to move, and one time it fixed, he uses, let's sat track bar to move clipping pan along that vector, by slicing the chosen model.
So the problem is to set ...
Can someone explain what is happening in the example below:
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glRotatef(45,0,0,1);
DrawCube();
glTranslatef(4,0,0);
glRotatef(-45,0,0,1);
DrawCube();
glPopMatrix();
I am assuming that it will just rotate the square, shift it right 4 units, and then rotate it back to its origi...
I am new to OpenGL and Qt, and I am learning both simultaneously(3 days already:). I couple of years ago I did some exmerimenting with DirectX and I clearly remember that it was possible to make a full-screen window there. By full-screen I mean really full-screen, even without the top part where you have the close fullscreen and minimize...
I'm looking for interesting algorithms for image magnification that can be implemented on a gpu for real-time scaling of video. Linear and bicubic interpolations algorithms are not good enough.
Suggestions?
Here are some papers I've found, unsure about their suitability for gpu implementation.
Adaptive Interpolation
Level Set
I've s...
For some reason, when I translate my object around the window, it disappears. Here is an image to show what I am talking about. Can you see why this would be happening? Thanks.
http://img215.imageshack.us/img215/160/disappearingbunny.png
...
I am working on a 3d tile-based strategy game and have read that implementing VBO's will significantly increase the game's frame rate and reduce the cpu usage (sounds great right?). However, among the tutorials I've looked at I can't quite get a handle on how to implement it. Has anyone had experience doing this and can either point me...
Hello,
for a simple demo program I am using the SDL library to play a mpeg movie file.
Unfortunately the demo app should be executed on one of our windows 7 servers and it should be looked at remotely.
The problem is, that when I connect via RDP to the server the SDL window stays black - although the movie becomes played (I hear the ...
Hi all.
Is there any algorithm/formula that can help me to figure out natural dimensions of a drawn object on OpenGL scene by using orthogonal projection. ?
For examle: 3 Units = 3milimeters.
Thank you in advance.
...
Rendering contexts usually have a solid color on the background (black or whatever, see the image below):
I'm wondering if it's possible to setup a window, with no decorations AND with the transparent background, while allowing me to render OpenGL stuff on it.
This would give the illusion that the triangle is floating on the screen. ...
Hi,
I want to use Vector graphics in an OpenGL game. I want to use vector graphics because they can be scaled cheaply without loss of quality.
Of course, the drawing should be hardware accelerated, so I do not want to draw in software to a texture.
Now I am wondering if a library doing this already exists. Is there a library, that can...
My application links against these Frameworks:
Cocoa.Framework
AppKit.Framework
CoreData.Framework
Foundation.Framework
Note that OpenGL.Framework is NOT linked. However, after setting DYLD_PRINT_LIBRARIES=1, I note that:
...
dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
dyld: loaded: /Syste...
I have an windowless IViewObject object.
I want to call its Draw function to render into Opengl PBO memory (alternatively OleDraw is simpler).
Right now i first create an HBITMAP using CreateDIBSection (which allocates its own memory) and then copy from this into my PBO memory. However, I'd like to avoid this extra copy. I believe this...
Hi,
Can anyone tell me how I can draw text at a 2d location using the tao framework?
Thanks
...
I'm reading the sample code for the bezier curve on the online version of opengl's tutorial.
I'm curious about how is resize being handled in the example cause I figure I might use it on my own version of this program , I placed my questions on its comments:
void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h); ...
I'm working on a top-down rpg, and want to implement seamless scrolling maps. That is, as the player explores the world, there is no loading screen between maps and no "doors" to the next area.
I have two ways to break down the world. At the top level, I have "zones" which is simply a collection of 9 "maps"(These zones are only represe...