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

9
votes
3answers
17k 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
8k 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
2k 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
663 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
2answers
5k 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
3answers
2k 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
1answer
636 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
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
1answer
4k 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
349 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, ...
9
votes
3answers
3k 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 ...
8
votes
12answers
8k 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
7k 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
3answers
3k 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, ...
8
votes
1answer
730 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
655 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
333 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
5k 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
544 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
1k 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
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 ...
8
votes
2answers
551 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

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 ...
8
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 ...
8
votes
2answers
6k 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. ...
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
3answers
2k views

Why the clip space in OpenGL has 4 dimensions?

I will use this as a generic reference, but the more i browser online docs and books, the less i understand about this. const float vertexPositions[] = { 0.75f, 0.75f, 0.0f, 1.0f, 0.75f, ...
8
votes
3answers
512 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?
8
votes
4answers
284 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
1answer
323 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
610 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
670 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
979 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 ...
8
votes
4answers
8k views

How to improve batching performance

I am developing a sprite based 2D game for mobile platform(s) and I'm using OpenGL (well, actually Irrlicht) to render graphics. First I implemented sprite rendering in a simple way: every game object ...
8
votes
2answers
617 views

OpenGL get the outline of multiple overlapping objects

I just had an idea for my on-going-game made with opengl in c++: I'd like to have a big outline (5-6 pixel) on multiple overlapping object when the player win something. I thought the best way is to ...
8
votes
1answer
1k views

Modern shadow rendering techniques?

What is the state of the art in terms of shadow rendering? My target is OpenGL 3.2, using a deferred rendering pipeline, if that matters. It's been years since I looked into shadow rendering, and at ...
8
votes
2answers
513 views

Does use of simple shaders improve performace/battery life?

I'm making OpenGL game for Android. Till now i've used only fixed function pipeline, but i'm rendering simple things. Fixed function pipeline includes a lot of stuff i don't need. So i'm thinking ...
8
votes
1answer
6k 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 ...
8
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 ...
8
votes
5answers
1k views

Geometric Transformations on the CPU vs GPU

I've noticed that many 3d programs normally do vector/matrix calculations as well as geometric transformations on the CPU. Has anyone found an advantage in moving these calculations into vertex ...
8
votes
2answers
841 views

How to deal with OpenGL and Fullscreen on OS X

I do most of my development on OS X and for my current game project this is my target environment. However when I play games I play on Windows. As a windows gamer I am used to Alt+Tab switching from ...
8
votes
1answer
414 views

2D Water top surface profile

I am trying to create the effect of the water surface thickness with a vertex-fragment shader. I am in a 3D game environment but It's a scroll view so a "2D" view. Here is a good tutorial of creating ...
8
votes
2answers
452 views

Need advice for 3D BSP based graphics engine

I have coded myself a OpenGL BSP viewer for an old game format. It is very similar to the Quake 3 file format. Because my interest is developing graphics engines, I want to be developing while looking ...
7
votes
8answers
4k views

Best (Most Popular?) Image Format For Texturing

Okay, so I am using C++ with OpenGL, and I am going to create a loader to load in textures for my 3D game. (But the textures are 2D). I want the option of transparency, even if I decide not to use it. ...
7
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 ...
7
votes
7answers
4k views

Library to load images into textures, Linux, C and OpenGl

I am looking for simple, self-contained C library for Linux to load images from files into OpenGL textures. The licence should be quite liberal: zlib, bsd, mit or something. I have found SOIL, however ...
7
votes
2answers
233 views

2-components color model

RGB is the natural color model for OpenGL. But a lot of other color models exist. For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and ...
7
votes
5answers
1k views

Correct level of abstraction for a 3d rendering component?

I've seen lots of questions around this area but not this exact question so apologies if this is a duplicate. I'm making a small 3d game. Well to be honest, it's just a little hobby project and ...
7
votes
3answers
1k views

What is a better abstraction layer for D3D9 and OpenGL vertex data management?

My rendering code has always been OpenGL. I now need to support a platform that does not have OpenGL, so I have to add an abstraction layer that wraps OpenGL and Direct3D 9. I will support Direct3D 11 ...
7
votes
2answers
2k views

Using HTML for interface?

The game I've been working on uses opengl/sfml for graphics. I'm currently working on the interface and I've found determining all the proper offsets/positioning etc. to be a pain. To make it ...