OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for ...

learn more… | top users | synonyms

10
votes
2answers
10k views

converting a mouse click to a ray

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
10
votes
1answer
880 views

How do I create good looking plasma explosion effects?

Is this just a billboard quad with a bloom shader?
10
votes
5answers
3k views

Skybox texture artifact on edge

I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success. It is a skybox of six textures, and ...
10
votes
2answers
3k views

Efficient skeletal animation

I am looking at adopting a skeletal animation format (as prompted here) for an RTS game. The individual representation of each model on-screen will be small but there will be lots of them! In ...
10
votes
1answer
300 views

Rendering only a part of the screen in high detail

If graphics are rendered for a large viewing angle (e.g. a very large TV or a VR headset), the viewer can't actually focus on the entire image, just a part of it. (Actually, this is the case for ...
10
votes
3answers
4k views

Animation in OpenGL using 3D Models

I have created a model in Blender. Now i want to read that 3D model in my c++ program. I figured that a model can be exported to various file formats e.g. .obj, .3ds or COLLADA and then can be read in ...
9
votes
3answers
4k views

How can I bend an object in OpenGL?

Is there a way one could bend an object, like a cylinder or a plane using OpenGL? I'm an OpenGL beginner (I'm using OpenGL ES 2.0, if that matters, although I suspect, math matters most in this case, ...
9
votes
5answers
4k views

OpenGL's matrix stack vs Hand multiplying

Which is more efficient using OpenGL's transformation stack or applying the transformations by hand. I've often heard that you should minimize the number of state transitions in your graphics ...
9
votes
3answers
1k views

Deferred shading - how to combine multiple lights?

I'm starting out with GLSL and I've implemented simple deferred shading that outputs G-buffer with positions, normals and albedo. I've also written a simple point light shader. Now I draw a sphere ...
9
votes
1answer
569 views

Mesh manipulation on GPU vs CPU

Just a bit curious - where do you perform mesh manipulations, on the CPU or in the shader? I've been doing everything on the CPU and a friend suggested moving things on to the GPU side. If you're ...
9
votes
1answer
3k views

Game Engine Design – Ubershader - Shader management design

I want to implement a flexible Ubershader system (with deferred shading). My current idea is to create shaders out of modules, which deal with certain features (FlatTexture, BumpTexture, Displacement ...
9
votes
3answers
19k views

Writing Game Engine from scratch with OpenGL [closed]

I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that, what programming languages and things you recommend me? Also if you have good ...
9
votes
1answer
10k views

when to use vertex array and when to use vbo

i'm trying to learn about vertex array and vertex buffer object, but i don't understand the differences in term of: case-of-use (static geomerty like terrains, geometry that change every frame like ...
9
votes
1answer
3k views

differences between opengl 3 and opengl 4

I'm just getting started with game programming and I want to start learning opengl. I found a very great tutorial from scratch to get started with opengl 3 and I'm wondering if there is a big ...
9
votes
2answers
7k views

Most common 3D model format for opengl

I'm a novice that is starting to play with OpenGL ES on Android devices. To practice OpenGL I wanted to create a small game engine and so I was wondering what the best 3D model file format would be. ...
9
votes
2answers
1k views

Large vertex buffer vs multiple draw calls

I'm just getting started with OpenGL, and I'm attempting to use it to create a 2D game. In this game, I have a hexagonal grid made up of a very large variety of differently-colored hexagons. As a ...
9
votes
1answer
3k views

How can I create a “night sky” effect in OpenGL?

I am creating a game using OpenGL and I want to render the effect of a night sky with a few stars in it. I want to have a shiny black effect in the sky so that it looks good. Could some one help in ...
9
votes
2answers
734 views

Handle many lights in a scene (with shaders)

I'm curious about how to handle many lights in a scene. Given a very big map in a role playing game, with dungeons (with lights in there) etc. I know about deferred lighting, but that only answers how ...
9
votes
3answers
762 views

How can I create a glitter effect?

I am trying to create a glittering effect for my realtime shader but I don't know how. Here is one example, and another example. What technique can I use to implement this?
9
votes
2answers
6k views

How do I use depth testing and texture transparency together in my 2.5D world?

Note: I've already found an answer (which I will post after this question) - I was just wondering if I was doing it right, or if there is a better way. I'm making a "2.5D" isometric game using OpenGL ...
9
votes
1answer
1k views

Engine Rendering pipeline : Making shaders generic

I am trying to make a 2D game engine using OpenGL ES 2.0 (iOS for now). I've written Application layer in Objective C and a separate self contained RendererGLES20 in C++. No GL specific call is made ...
9
votes
3answers
3k views

Lighting in a Minecraftian World

Minecraft is a game that is largely based on a heightmap and uses that heigtmap information to flood the world with light. From my understanding the highest point in the heightmap is the end of the ...
9
votes
2answers
1k views

Are there still advantages to using gl_quads?

OK, I understand that gl_quads are deprecated, and thus we're not 'supposed' to use them anymore. I also understand that a modern PC when running a game using gl_quads is actually drawing two ...
9
votes
2answers
2k views

Sorting objects before rendering

I'm trying to implement a scene graph and in all the articles i've come across there is talk about object sorting. So you'd sort your objects by "material" for example. Now untill i sat down and ...
9
votes
1answer
8k views

OpenGL/GLSL: Render to cube map?

I'm trying to figure out how to render my scene to a cube map. I've been stuck on this for a bit and figured I would ask you guys for some help. I'm new to OpenGL and this is the first time I'm using ...
9
votes
1answer
3k views

How to use multi-thread OpenGL application to update VBO and use it at the same time?

I have simple application. It has two threads. Each thread has it's own rendering context, but they share one VBO (this is working, I tested it). Now what I want: One thread is rendering some data ...
9
votes
1answer
2k views

GLSL, all in one or many shader programs?

I am doing some 3D demos using OpenGL and I noticed that GLSL is somewhat "limited" (or is it just me?). Anyway I have many different types of materials. Some materials have ambient and diffuse color, ...
9
votes
1answer
5k views

Generate an endless 3D race track

How would I go about generating the track for this game I'm trying to prototype? http://www.youtube.com/watch?v=uQwn7Ufypqo It should be an endless tunnel that sweeps along a 3D spline, with some ...
9
votes
1answer
395 views

Deforming surfaces

I try to accomplish an deforming physic behaviour for levelsurfaces, but don't get an idea how to start with the implemenation so far. Regardless of the shape from the surface (planes, cubes, ...
8
votes
12answers
9k views

Is it a waste to learn OpenGL?

What I've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the graphics API domain. And to be honest, I gave learning DirectX10 a chance, ...
8
votes
5answers
2k views

Is GLUT obsolete?

A question was asked about good, up-to date OpenGL resources, one of the answers was a link to a tutorial about modern OpenGL programming. The tutorial in question uses GLUT and GLEW, but I have read ...
8
votes
5answers
9k views

What alternatives to GLUT exist?

I am trying to learn OpenGL, and I just found out that GLUT is obsolete. I already know SDL, and it seems it is a good alternative. Should I use SDL to develop games with OpenGL, or are there any ...
8
votes
1answer
760 views

OpenGL vs physics?

I am very new to game programming and I am in my first project. I have come to a point that I need expert advice: Now for the game physics to be able to work on objects, it needs to know each ...
8
votes
4answers
676 views

I need help with 3d shading/lighting

How do you guys handle shading in a 3d game? I have a directional light source that shades one side of a tree made of cubes. The remaining 3 sides all get ambient shading only. So the 3d effect is ...
8
votes
3answers
468 views

Why is it possible to encounter a texture coordinate greater than 1 or less than 0

I'm studying a text about texture mapping and in the preparing to draw session, I read: Define the texture wrapping parameters. This will control what happens when a texture coordinate greater than ...
8
votes
6answers
6k views

AAA Games and OpenGL?

What modern AAA games on the top of the market used OpenGL? If applicable, what engine did they use?
8
votes
1answer
685 views

what is world space and eye space in game development?

I'm reading a book about 3D stuff and OpenGL. The book often talks about world space and eye space. What exactly is the "world space?" Does the "eye space" mean the projection?
8
votes
3answers
2k views

Font outline in OpenGL, FTGL

I'm using FTGL library to render fonts in my game, but I have completely no idea how to create an outline around text. Achieving a shadow could be easy, because I can simply do it like this: (pseudo ...
8
votes
4answers
2k views

Order independent transparency in particle system

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because: Each particle is a point sprite in a single mesh and I can't use ...
8
votes
4answers
13k views

How can I orbit a camera about it's target point?

I'm drawing a scene where the camera freely moves about the universe. The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector. These vectors/points ...
8
votes
2answers
586 views

What is the primary use of Vertex Buffer Objects?

From what I've read, it seems VBOs are purely for performance. I'm working on a very rudimentary learning project in lwjgl and I'm just trying to figure out what more advanced features of the library ...
8
votes
1answer
2k views

Should I give each character its own VBO or should I batch them into a single VBO?

I'm making a 3D first person game. Should I give each character its own VBO or should I batch all characters into a single VBO? What are the pros/cons?
8
votes
1answer
1k views

Sprite sheets with buffer objects and shaders

What is the "best" way to handle sprite sheets with shaders and buffers? In immediate mode it is easy to modify a sprite's texcoords when it is drawn, but I don't know how to do this with modern ...
8
votes
1answer
118 views

How can I profile the speed of my vertex and fragment shaders separately?

I'd like to know how I can check to see if either my vertex or my fragment shader is a bottleneck in my rendering pipeline. I've read about using glQueryCounter with the GL_TIMESTAMP target to get ...
8
votes
4answers
326 views

Why nearby triangles tend to disappear?

I've just enabled back face culling and I'm noticing a weird behavior: when all vertices of my triangle is outside the view and 2 of them is behind me (I think) the triangle disappears. So to see it, ...
8
votes
4answers
486 views

What types of effects or shaders would you teach in a rendering class? [closed]

I am looking for a list of topics that would be fun to learn and not too complicated to implement with a prototyping tool like FX Composer or Rendermonkey for an intermediate class of real-time ...
8
votes
1answer
364 views

OpenGL: Light at end of tunnel effect

Anyone knows any implementation of the "light at the end of tunnel" effect? where the outside is entirely bright and gradually becomes more visible? The reverse could also be true, where the inside ...
8
votes
3answers
673 views

I would like to know how an OpenGL driver will be implemented to learn opengl internals?

I'm learning OpenGL and really like to know how the interaction with the Graphics card will be. I feel understanding how it was implemented in the Graphics driver, will let me know complete internals ...
8
votes
1answer
823 views

Rendering 8 bit graphics

I have a strong programming background just not from game development. I only made some pong and snake in high school and I did some OpenGL in college. I want to make my own game engine. Nothing ...
8
votes
1answer
1k views

Getting OpenGL hardware acceleration with SDL on Linux

I'm trying to use SDL + OpenGL but I don't believe hardware acceleration is working because the framerate for around 18000 polys is about 24fps on a quad core machine but is a hopeless 1-2fps on an ...