opengl

Shape object in Processing, translate individual shapes.

I am relatively new to Processing but have been working in Java for about 2 years now. I am facing difficulty though with the translate() function for objects as well as objects in general in processing. I went through the examples and tried to replicate the manners by which they instantiated the objects but cannot seem to even get the s...

Applying a 2d mesh to a 3d surface

I have a very complex 3d surface I need to apply a 2d mesh to. What I need is something like the Solidworks Wrap tool : http://www.rickyjordan.com/2009/01/the-solidworks-secret-weapon-the-wrap-tool.html Due to the complexity of the 3d surface normal texture UV unwrapping won't work. For instance, if I want to map a O and the 3d surface ...

Grab OpenGL output of an application from another application

Hi! i would like to know if it's possible, in c/c++, to launch an application and grab it's standard video output? The goal of this would be to grab the buffer of an application, and use it as a texture for a grid of vertex with special texture coordinate (in order to project it in a FullDome)? I'm developing under Linux. Thnaks! ...

Operating system for visualization app in 6 monitors

Hi. I have to plan the development for an application with these major requirements: Show different graphical data and animations in 6 monitors, in fullscreen mode. The hardware to be used is a PC with 3 NVIDIA GeForce 9800 GX2 cards. I have some expertise working with OpenGL, but never with more than one monitor. I have the (some li...

lwjgl: How can I use glCallLists?

So I have a bunch of addresses for my display lists. I can do those and get those on the screen with GL11.glCallList(address) easily enough. My problem is that I don't know how to use the potentially more efficient GL11.glCallLists(something) to call a bunch of lists with one native call. I've tried creating an IntBuffer with IntBuffer i...

How to debug properly and find causes for crashes?

I dont know what to do anymore... its hopeless. I'm getting tired of guessing whats causing the crashes. Recently i noticed some opengl calls crashes programs randomly on some gfx cards. so i am getting really paranoid what can cause crashes now. The bad thing on this crash is that it crashes only after a long time of using the program, ...

Qt opengGL implementation

How Qt's Opengl widget works? Is it a software-only implementation or it relies on the configuration of the platform ...

Porting a project to OpenGL3

Hi everyone, I'm working on a C++ cross-platform OpenGL application (Windows, Linux and MacOS) and I am wondering if some of you could share some advices on porting a large application to OpenGL 3. The reason I am looking into OpenGL 3 is because I think we could benefit a lot from using the new "Sync objects". Nvidia has supported such...

How do I get the length of a VBO to render all vertices when using glDrawArrays()?

I create a VBO in a function and I only want to return the VBO id. I use glDrawArrays in another function and I want it to draw all the vertices in the VBO without needing to also pass the number of vertices. The VBO also contains texture coordinate data. Thank you. ...

dynamic texture compression

Is dynamic texture compression possible in iPhone? (3G or 3GS?) I create a UIImage dynamically each time the app runs. Can I dynamically generate a PVRTC file from it? ...

Which parts of Graphics Pipelines are done using CPU & GPU?

Which parts of pipelines are done using CPU and which are done using GPU? Reading Wikipedia on Graphics Pipeline, maybe my question does not precisely represent what I am asking. Referring to this question, which "steps" are done in CPU and which are done in GPU? Edit: My question is more into which parts of logical high level steps n...

Force OpenGL to keep contents in memory?

I'm using OpenGL to render polygons. I notice that if I minimize the program then start using it again, it will be very slow for a few seconds. (I'm guessing its reuploading my display lists to the card). How can I prevent this because it's a bit annoying. I want it to always have the contents. Thanks ...

Trying to construct a 3D object from a stack of 2D images in VB.NET

I have a stack of 2D dicom images and want to convert to a 3D object using VB.NET. I suppose I can solve it using openGL but any clue would help a lot. Do you know a free (or at least cheap) pack to do it? Would you help me to think my own solution. Thanks... ...

CGFloat vs GLfloat

I understand CGFloat should be used in Cocoa applications to make them 64-bit clean. But what about in a simple OpenGL game that uses Cocoa/Objective-C for everything but the rendering (to an NSOpenGLView)? CGFloat is a part of Core Graphics, so if I would it also be alright to use CGPoint, CGRect etc.? or should I just write rects and v...

Frame skipping with OpenGL and WinAPI?

Here is my situation. I'm creating a drawing application using OpenGL and WinAPI. My OpenGL frame has scrollbars which renders the screen and modifies GlTranslatef when it gets a scroll message. The problem is wen I get too many shapes the scrollbar is less responsive since it cannot rerender it each and every time it gets a scroll messa...

Flipping OpenGL texture

When I load textures from images normally, they are upside down because of OpenGL's coordinate system. What would be the best way to flip them? glScalef(1.0f, -1.0f, 1.0f); mapping the y coordinates of the textures in reverse vertically flipping the image files manually (in Photoshop) flipping them programatically after loading them (I...

OpenGL behaving strangely

OpenGL is acting very strangely for some reason. In my subclass of NSOpenGLView, I have the following code in the -prepareOpenGL method: - (void)prepareOpenGL { GLfloat lightAmbient[] = { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat lightDiffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f }; GLfloat lightPosition[] = { 0.0f, 0.0f, 2.0f }; quality = 0; zCoo...

Algorithm to zoom into mouse(OpenGL)

I have an OpenGL scene with a top left coordinate system. When I glScale it zooms in from (0,0) the top left. I want it to zoom in from the mouse's coordinate (reletive to the OGL frame). How is this done? Thanks ...

OpenGL texture shifted somewhat to the left when applied to a quad

I'm a bit new to OpenGL and I've been having a problem with using textures. The texture seems to load fine, but when I run the program, the texture displays shifted a couple pixels to the left, with the section cut off by the shift appearing on the right side. I don't know if the problem here is in the my TGA loader or if it's the way ...

OpenGL equivalent of GDI's HatchBrush or PatternBrush?

I have a VB6 application (please don't laugh) which does a lot of drawing via BitBlt and the standard VB6 drawing functions. I am running up against performance issues (yes, I do the regular tricks like drawing to memory). So, I decided to investigate other ways of drawing, and have come upon OpenGL. I've been doing some experimenting...