Are there huge differences in OpenGL 3.x vs 2.x? Is it waste of time learning OpenGL 2.x or are they both following the same concept? I think i read somewhere that 2.x was state based and that 3.x was not, is that correct?
...
We're doing some serious games interface work. Games allow unique new interfaces, but we also want to avoid having to reimplement traditional 2D controls, we want to leverage the years of refinement to windows controls.
How would we go about hosting and rendering .NET controls in a '3D' context? 3D in the sense of, eventually they wil...
Ok, in my glsl fragment shader I want to be able to calculate the distance of the fragment from a particular line in space.
The result of this is that I am first trying to use a varying vec2 set in my vertex shader to mirror what ends up in gl_FragCoord:
varying vec2 fake_frag_coord;
//in vertex shader:
gl_Position = gl_ModelViewProjec...
I'm writting a 2d game in Iphone, which uses textures as sprites, I'm getting colored noise around some of the images I render ( but such noise never appears over the texture Itself, only in the transparent portion around It). The problem does not happen with the rest of my textures. This is the code I use to load textures:
- (void)load...
Hi,
i need a simple logging solution while writing Cocoa/OpenGL application in C++.
I'd like:
cout << "debug line" << endl;
to open a console window and show the text. Is it possible?
I'm using XCode, maybe it has some logging utility in debug mode?
Thanks in advance,
Etam.
...
I'm trying to implement picking using Pyglet's OpenGL wrapper, but I'm having trouble converting a C tutorial to Python. Specifically the part below.
#define BUFSIZE 512
GLuint selectBuf[BUFSIZE]
void startPicking(int cursorX, int cursorY) {
GLint viewport[4];
glSelectBuffer(BUFSIZE,selectBuf);
glRenderMode(GL_SELECT);
...
I have a scene written in Java 3d, where the user's viewing position is set to some coordinate using the following code:
ViewingPlatform vp = simpleUniverse.getViewingPlatform();
TransformGroup steerTG = vp.getViewPlatformTransform();
Transform3D t3d = new Transform3D();
steerTG.getTransform(t3d);
t3d.lookAt(
new Point3d(-5, 1...
I download the rss-glx 0.9 project's source codes to build. But the configure script complained GL library was not found!
...
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glx.h usability... yes
checking GL/glx.h presence... yes
checking for GL/glx.h... yes
checking for glNewL...
I would like to write a library that draws some opengl on a given window handle.
How can I initialize an opengl-context inside a given window?
Is it possible to do that platform independent using SDL or some other library?
...
How can I set the bounds on a SimpleUniverse instance created with a canvas3d object?
I tried the code below, but I get either a "Capability not set exception" if I try to set the bounds and a "Restricted access exception" if I try to set the capability to write bounds.
Here's my code:
GraphicsConfiguration config = SimpleUniverse.get...
I have a scene inside of a TransformGroup that allows the mouse to zoom/rotate/pan.
I need to set the camera position back far enough that I can see the entire scene, which I do with the following code:
// Position the position from which the user is viewing the scene
ViewingPlatform viewPlatform = universe.getViewingPlatform...
I have been writing an OpenGL game engine for a while which uses SDL for all the window management and for portability. I would like to create a level editor using the full engine. The engine itself isn't at all tied in with SDL except for input. I would like to use wxWidgets for the GUI and I have been looking at some OpenGL samples whi...
I would like to render two scenes in OpenGL, and then do a visual crossfade from one scene to the second. Can anyone suggest a starting point for learning how to do this?
Cheers
...
I'm trying to more or less recreate Johnny Lee's Wii head tracking app, but using an augmented reality toolkit for the tracking, and WPF for graphics. To do this, I need to create a perspective camera using the top, bottom, right, and left parameters to create my viewing frustum, instead of field of view and aspect ratio (to those famili...
In my OpenGL program, I am doing the following in sequence:
// Drawing filled polyhedrons
// Drawing points using GL_POINTS
// Displaying information for each above point beside it
For displaying the point information (say a point identifier/number), I convert the 3D coordinates of the point to 2D window coordinates using gluProject()...
I have one texture that has some portions which are transparent transparent I want to apply over an object whose faces are some opaque material (or colour if it's simpler) but the final object gets transparent. I want the final object to be totally opaque.
Here is my code:
First I set the material:
glDisable(GL_COLOR_MATERIAL);
...
I am creating a series of scrolling windows, created by openGL. This code is legacy code and able to do this successfully. Then I want to add text to these scrolling lists, which I do through a drawing callback function. When the scrolling list appears in the window, the draw callback prints the text into the list. This normally works. H...
Hey.
I'm trying to write a game where the user can issue commands by drawing certain patters with his fingers..for example, if he draws a circle, an 'S' letter, an expiral, ect.
I'm already familiar with touch events and I'm capable of reading the coordinates... my problem Is in finding algorithms and information about the recognition ...
Imagine that you've got one of these guys:
Aka GL_TRIANGLE_STRIP. If you wanna color it using different colors, you could use:
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colorArray);
glEnableClientState(GL_COLOR_ARRAY);
Where each "item" in the color array matches a vertex point in the strip. But what if the colors just alternate betwe...
This is related to my last question. To get this image:
I draw a white background (color = (1, 1, 1, 1)).
I render-to-texture the two upper-left squares with color = (1, 0, 0, .8) and blend function (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), and then draw the texture with color = (1, 1, 1, 1) and blend function (GL_ONE, GL_ONE_MINUS_SRC...