opengl

Is it possible to do old school 2d blitting on modern GPU?

Hi, It looks like GL has become mainstream for all gaming platforms (even handheld!) This has pushed the deployment of modern GPU chipsets to large numbers of consumers. This is amazing. With the modern GPU systems out there now, is it possible to do generic old-school graphics programming (aka - blit from X rect to Y rect using VRAM...

2D Engine scrolling on OpenGL via hardware?

hi, I'm using OpenGL as the bottom end for a 2D tiling engine. When everything is 2D, it is simple to optimize certain issues. For example, scrolling. If I know a certain section of the screen needs to scroll off the bottom, then I can just blit over that portion. I'm evening moving more than 1 pixel at a time. Without explicit hardware...

OpenGL outdated version (can't find glMultiDrawElements on header)

I was trying to use the function glMultiDrawElements while studying OpenGL (using red book) but couldn't. I checked the header "gl.h" and the function wasn't there so I checked the version on top of the header and it's 1.1. I know I need at least 1.4 to use it, but I have no idea on how to update it. I tried Windows Update but nothing....

OpenGL Game development for the Desktop / Platform issues

Does anyone have experience writing professional OpenGL games on Windows? For the Mac, due to apple's control, the OS seems quite "uniform". For windows, due to different hardware, different drivers installed, etc ... the hardware base seems to have many many different configurations. In theory, OpenGL provides a API that abstracts all ...

raycasting: how to properly apply a projection matrix?

Hi, I am currently working on some raycasting in GLSL which works fine. Anyways I want to go from orthogonal projection to perspective projection now but I am not sure how to properly do so. Are there any good links on how to use a projection Matrix with raycasting? I am not even sure what I have to apply the matrix to (propably to the...

Rendering browser through OpenGL

I have a browser running on am embedded platform, and I am wondering if there is any advantage to rendering straight to OpenGL. One that comes to mind is the cross-platform access to hardware acceleration. Is anyone aware of any other advantages that may make the work worth it? ...

Standard and reliable mouse-reporting with GLUT

Hello! I'm trying to use GLUT (freeglut) in my OpenGL application, and I need to register some callbacks for mouse wheel events. I managed to dig out a fairly undocumented function: api documentation But the man page and the API entry for this function both state the same thing: Note: Due to lack of information about the mouse, i...

Physically realistic decals

I'm in the process of developing a visualization engine for the company I work for. We create decals for the outside of aircraft. As such we would like to be able to visualize the our decals on the aircraft that we support. So here's the problem: in real life, if I were applying the decals to the outside of an aircraft, I pay pick a an...

Can normal maps be generated from a texture?

Hi, If I have a texture, is it then possible to generate a normal-map for this texture, so it can be used for bump-mapping? Or how is normal maps usually made? Sandra ...

How to Install OpenSG on macOS 10.6 snow Leopard

Any hints on openSG installation on macOS 10.6 (in particular: which dependencies are needed, where to get them and how to compile everything)? The official documentation for macOS is particularly poor and it's not up-to-date. ...

Question about running a program at same speed in any computer

I made a program (in C++, using gl/glut) for study purposes where you can basically run around a screen (in first person), and it has several solids around the scene. I tried to run it on a different computer and the speed was completely different, so I searched on the subject and I'm currently doing something like this: Idle function: ...

Rotating a model in 3D: Suggestions for center of rotation

I need to allow the user to pan, rotate, zoom in/out of my scene in 3D which uses a parallel projection. Panning and zooming in/out has been pretty straight forward. However, when using the mouse for rotation, I am not sure what to use as the center of rotation. In particular, I am not sure at what depth inside the screen the center of r...

Rendering mathematical notation in Python / OpenGL ?

How can I render mathematical notations / expressions in Python with OpenGL? I'm actually using pyglet however it uses OpenGL. Such things as this: I can't store static images as I am generating the expressions as well. ...

Externally Define Preprocessor Macros in GLSL

GLSL has a full C-style preprocessor. The only thing that does not work is #include. One of the great features is that that you can used #ifdef to comment out functions and thus create one shader that can be thinned out if certain features are not used. My Question is: Is there a way to define a macro from C code? There seems no way...

Modal dialogs opened by a fullscreen OpenGL window on Windows 7 are not showing.

Hi, It seems that my problem may be the same as an unanswered related question (OpenGL with GLUT on windows 7, fullscreen mode not showing the message box). Since I switched to Win7 as a development environment, and a possible target platform for my applications, I noticed a regression in their behaviour. Whenever I have a fullscreen ...

use core-image in 3d

hello, i have a working Core Video setup (a frame captured from a USB camera via QTKit) and the current frame is rendered as a texture on an arbitary plane in 3d space in a subclassed NSOpenGLView. so far so good but i would like to use some Core Image filter on this frame. i now have the basic code setup and it renders my unprocessed v...

entering fullscreen on subclassed NSOpenGLView leaves empty window

hello, i have an application with 2 windows, one is a custom subclassed NSOpenGLView and one is displaying some standard cocoa user interace. making the opengl view go fullscreen (only on one NSScreen) works by calling enterFullScreenMode and exitFullScreenModeWithOptions and supplying the right screen and setting NSFullScreenModeAllS...

GLSL problem with fragment shader renders only black GL_POINTS

Hi! I am trying to add some shaders to my old OpenGL program that draws a lot of GL_POINTS and some GL_LINES. I created these two shaders: Vertex shader: void main() { vec4 v = vec4(gl_Vertex); v.z = v.z + sin(v.x*v.x + v.y*v.y)/10.0; gl_Position = gl_ModelViewProjectionMatrix * v; } Fragment shader: #version 120 vo...

Fog drawing using Core Graphics

I know that OpenGL has functionality that allow fog drawing. But, how to draw fog (smoke) using Core Graphics? Is this hard task? And, what concepts for implementing this task? ...

shadow techniques in opengl

This is comprehensive http://developer.nvidia.com/object/doc_shadows.html however, it's a bit overwhelming can anyone familiar with shadow techniquyes in opengl provide a short summary of the pros/cons and implementation difficulty of the various algorithms? ...