opengl

Edges on polygon outlines not always correct

I'm using the algorithm below to generate quads which are then rendered to make an outline like this http://img810.imageshack.us/img810/8530/uhohz.png The problem as seen on the image, is that sometimes the lines are too thin when they should always be the same width. My algorithm finds the 4 verticies for the first one then the t...

Good OpenGL tutorial for Linux/Ubuntu?

I'm looking for a good Ubuntu OpenGL tutorial for a friend who already knows how to use OpenGL in Windows. Can anyone recommend any? ...

Drawing filled circles as one vertex array using OpenGL?

Is there a way to draw many filled circles using one vertex array. Is there a way to draw a circle with triangles? I basically have hundreds of circles far apart from each other that need to be drawn but I feeling calling the vertex pointer for each circle is inefficient. I'd rather make 1 call for all circles if possible. Thanks ...

Most efficient way to draw circles for polygon outlines

I'm using OpenGL and was told I should draw circles at each vertex of my outline to get smoothness. I tried this and it works great. The problem is speed. It crippled my application to draw a circle at each vertex. I'm not sure how else to fix the anomaly of my outlines other than circles, but using display lists and trying with vertex a...

What does setting the GL color before doing a texture mapping operation do?

I am looking at some sample code in a book that creates a jittered antialiasing effect by repeatedly rendering a scene (at different offsets) onto a offscreen texture, then using that texture to repeatedly draw a quad in the main view with some blend stuff set up. To accumulate the color "correctly", the code is setting the color like s...

Filling in gaps for outlines

I'm using an algorithm to generate quads. These become outlines. The algorithm is: void OGLENGINEFUNCTIONS::GenerateLinePoly(const std::vector<std::vector<GLdouble>> &input, std::vector<GLfloat> &output, int width) { output.clear(); if(input.size() < 2) { return; } int temp; float dirlen; ...

OpenGL UV Texture tool

Hello all. I am looking for the 'UV Texture makeing tookl'. It is the one to supply image to 1024x1024, by the automatic operation. Will anyone learn a free tool? Thank you. ...

Writing OpenGL enabled GUI

I am exploring a possibility to write a kind of a notebook analogue that would reproduce the look and feel of using a traditional notebook, but with the added benefit of customizing the page in ways you can't do on paper - ask the program to lay ruled paper here, grid paper there, paste an image, insert a recording from the built-in came...

how to detect if openGL/card supports non power of 2?

What is the best way to detect if a graphics card and compiled openGL binary supports textures which are not a power of 2 at run time? ...

OpenGL how to hide the lines between triangles with vertex coloring?

It's a cube, looking from the corner at two sides. You can pretty easily tell where the four triangles that make up the two sides are. I am drawing it with vertex, color, and index arrays. What causes the obvious line and how might I be able to avoid it? ...

Raw OpenGL equivillant of GLUPerspective?

how could I do the same as GluPerspective without Glu? Thanks ex: gluPerspective(45.0, (float)w / (float)h, 1.0, 200.0); ...

OpenGL polygons stuck at top left?

I'm using theallegro library and through it OpenGL. I enable depth testing, then upon resize I do: glEnable(GL_CULL_FACE); glCullFace(GL_BACK); glEnable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(0,event.display.width,event.display.height,0,1,300); Then my drawing looks like: floa...

How can i download openGl for C#?

How can i download openGl for C#? ...

Simulating brush strokes for painting application

I'm trying to write an application that can be used to create pictures that look like paintings using simulated brush strokes. Are there any good sources for simple ways of simulating brush strokes? For example, given a list of mouse positions that the user has dragged the mouse through, a brush width and a brush texture, how do I determ...

How to check for mip-map availability in OpenGL?

Recently I bumped into a problem where my OpenGL program would not render textures correctly on a 2-year-old Lenovo laptop with an nVidia Quadro 140 card. It runs OpenGL 2.1.2, and GLSL 1.20, but when I turned on mip-mapping, the whole screen is black, with no warnings or errors. This is my texture filter code: glTexParameteri(GL_TEXTU...

Video display with openGL

I want to display very high resolution video directly with OpenGL. The image data is going to be processed on the GPU and I want to avoid a round-trip back to the PC to show the video in a standard bitmap based window. Cross platform is nice, Windows only would be OK (so would nvidia only) Anyone have any links to ways doing this? ...

Blurring the depth buffer in OpenGL - how to access mipmap levels in a fragment shader?

I'm trying to blur a depth texture by blurring & blending mipmap levels in a fragment shader. I have two frambuffer objects: 1) A color frambuffer with a depth renderobject attached. 2) A z framebuffer with a depth texture attached. Once I render the scene to the color framebuffer object, I then blit to the depth buffer object, and ca...

how to use glCopyImage2D

I'm trying something like glEnable(texture_2d) glBindTexture glCopyTexImage2D glDisable(GL_TEXTURE_2D); I think glCopyTexImage2D won't work with a non-power of two image, so that's one problem; I've also tried glReadPixels, but it's too slow for my purposes. Thanks! ...

Thick Bezier Curves in OpenGL

Hi all, I am writing a program in java using the jogl opengl bindings. I need to create a bezier curve that varies in thickness along the curve. So far I've only managed a thin bezier curve of single points. I'm pretty sure that this isnt going to be an easy thing to do, but i I have no idea where to even begin looking for the solution. ...

Full screen OpenGL app blinks every time an IME window is rendered on top of it

As the title suggests, I am trying to get the built-in Windows IMEs to render into a full screen OpenGL window. It seems that whether or not I actually change the display mode and just use a pop-up that fills the screen, I still get a prolonged black screen (for about 1 second) every time the IME GUI begins and ends its rendering. Oddl...