It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I got stuck with displaying multiple windows in openGL... That is if i display two windows, tranformation is not possible in both the windows... Is there any other way i can do it..???
Each window should have it's own OpenGL context thus you will need to perform the same operations in each window for the views to stay consistent. If you perform a geometry transformation when rendering in the first context it will only appear in the second context if it is explicitly executed in that second context.
More details on your setup and desired goals would be helpful. On what platform and framework are you working? Are you trying to render the same scene from different views in different windows or are you rendering different scenes in the different windows?
Tutorial #42 of the NeHe OpenGL tutorials shows how to have multiple viewports (which you can have in one window or multiple windows).
Also, here is some source code that is a modification of that tutorial using multiple windows.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am using libgdx and I was wondering how to simulate a lamp.
What I mean is that I have a background texture and all the colors in it are pretty dark becuase it is suppose to a dark environment. What I want to do is to grab a region of the texture and make all the colors brighter like if it there was a lamp somewhere.
Now, the lamp is supposed to be moving and that will be calculated at run time so it is unpredictable to know where it would be, and the only thing that comes to my mind is to get every pixel from the texture and get the color and just change the rgb values to be higher to have that effect.
The thing is that the lamp is suppose to be moving a lot. It wont stop moving until the game is over and I feel that changing the color of every pixel is kind of a heavy process. Is there another way to it?
By the way, the game is a cartoon so I don't need the lamp too be realistic.
Could you instead layer an alpha blended transparency to darken the visible area except where the lamp is? I plan to use this to achieve a pseudo-lighting effect in a game.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Ive got a project for school that is to create the tanks game ( like worms or something else )
With a little research I found that the best way to create the 2D world would be to hold a bitmap of 1 and 0 to switch between background and foreground. So that I could load 2 images one for the background like the worms game the sea or something and another image with the map that is placed on it. Now because of that bitmap if I shoot something I could simply replace a 1 in a 0 so that there is a whole in the map..
With QT I could then just draw a canvas where I could display that bitmap.
I just don't find how to program this, maybe someone could help me out, where to start?
What you're describing with the 1's and 0's is called transparency and bitmaps can be made to encode this information in them, usually known as the alpha channel.
The key is to break down the problem into smaller parts and then tackle each small part - your question is very broad. So, break it down like this:
Create a window
Draw a bitmap on the window (no transparency - it's the background)
Draw a second bitmap with transparency
Modify transparency of second bitmap at run time
Although I think the qt is not the right tool for that, you can start with Graphics View Examples. That should give you a quick start.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to take an image in jpg format, split it up in pixels and then manipulate those pixels (duplicate them, change their position etc..)
Of course I'm not asking for the code :-) but the tools to do it. I am newbie in programming.
I know nothing about reading from an image, manipulating and outputing it. Do I need special libraries to import? Special commands to use in order to manipulate the image?
What I want to do is experiment with zooming a jpg to infinity by manipulating the number and position of pixels.
There are a few libraries that can be used for manipulating images. I recommend ImageMagick (see documentation for the C++ interface), but there's also DevIL.
Using ImageMagick, all the details are hidden from you, and manipulating the pixel data can be as simple as in this example:
Image my_image(); // create an *empty* image using the default Image constructor
my_image.read("picture.jpg");
my_image.pixelColor(50,50,Color("red")); // set the pixel at position (50,50) to red
my_image.write("saved_picture.jpg");
You can use CImg Library, Also you might find something on this list
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am creating a game that requires heavy use of 3D Models. I started using Blender for creating models. Here are some models which I came across while developing a model
I need to create a model of a Cube with Horizontal Grooves/Depressions and impart glow to those Grooves. I went through a blender tutorial which described how to impart glow to certain objects but I don't how to create a Cube with Grooves/Depressions.
Second Question is related more to the field of Graphics. What is Bloom effect ? Is it related to lighting models in any way? How do I impart it using Opengl and C++ ?
I can only try to help you with your second question, since I'm not experienced with blender. A Bloom effect is a graphical effect to visualize strong light sources. It is often implemented as a shader. The wikipedia article is actually quite interesting.
You should be able to find tons of tutorials for both OpenGL and DirectX respective their shader languages. A quick search provided these, which look promising:
http://prideout.net/archive/bloom/
http://doenemeier.de/2011/03-opengl-bloom-shader.html
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to create a desktop recorder that require very little HD space.
It should capture the current display into a buffer, compare it to the previous state, and save only the rectangles that differ to the previous state.
What API, function or library I have to use ?
Well if you want to save the differences from each frame to frame only you could simply use a substraction-method. Simply substract the color values at image(t+1) from image(t)... All parts that stay equal haven't changed... only the parts that are different will result in something non-zero. You can then extract the rectangles around it and save them. But of course be aware since there might be more than one part changing of course and you probably wanna save each one instead of the big rectangle that contains all changes...
You could use OpenCV for this... it has all basic functions for image substraction, rectangle fitting, cropping, ...
Hope that helps...
Consider using Windows Media Screen Capture encoder for the task. You will feed your captured frames to it, and it will do the rest and create highly efficient wmv file for you.