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

8
votes
2answers
933 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
2k 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
552 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
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
804 views

Deferred tiled shading, tile frusta calculation in OpenGL

I'm trying to do deferred tiled shading in OpenGL using the compute shader but I have hit a snag when trying to create the frustum for each tile. I'm using AMD's Forward+ demo (written in D3D) as a ...
8
votes
2answers
983 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
530 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
482 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
5answers
9k views

OpenGL vs OGRE : Which is the best for beginner? [closed]

I am interested in getting into game development and posses good C/C++ programming skills. I have tried OGRE before, and I am curious whether I should learn either OGRE or OpenGL as a starting point. ...
7
votes
4answers
9k views

What is the purpose of glScissor?

I know that it is more efficient than stencil test, but am I right assuming that the same functionality could be achieved using projection transformations with viewport?
7
votes
7answers
5k 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
242 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 ...
7
votes
3answers
3k views

Draw contour around object in Opengl

I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
7
votes
1answer
1k views

Most efficient way to draw vertex with OpenGL

I am writing an OpenGL 3D game. There will be tons of triangles for terrain and objects in use. I am studying from the OpenGL official guide and the first presented method is to call a function ...
7
votes
1answer
521 views

How wise is this multithreading architecture?

I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
7
votes
6answers
870 views

Does one need normals for a strictly 2d Game?

I'm starting to learn OpenGL by creating a pure 2D game. I have to decide on the format of the Vertices. Do I need a normal component? Or is this for a 2d component not needed? My gut feeling says I ...
7
votes
4answers
1k views

glsl demo suggestions?

In a lot of places I interviewed recently, I have been asked many a times if I have worked with shaders. Even though, I have read and understand the pipeline, the answer to that question has been no. ...
7
votes
2answers
314 views

Must I worry about quad-based rendering in real world scenarios?

Most of the time in the first chapters of a random book about rasterization and rendering techniques, I find some phrases about a triangle-based rendering system and a quad-based one. I have never ...
7
votes
2answers
1k views

Missing features from WebGL and OpenGL ES

I've started using WebGL and am pleased with how easy it is to leverage my OpenGL (and by extension OpenGL ES) experience. However, my understanding is as follows: OpenGL ES is a subset of OpenGL ...
7
votes
3answers
4k views

First time shadow mapping problems

I have implemented basic shadow mapping for the first time in OpenGL using shaders and I'm facing some problems. Below you can see an example of my rendered scene: The process of the shadow mapping ...
7
votes
3answers
922 views

What is the contents of the buffer *after* a call to glSwapBuffers()?

(SDL_GL_SwapBuffers() in particular) When you have drawn a scene, and you call swap-buffers, it is routine to then glClear() the scene before drawing anything; if you don't clear, what is the ...
7
votes
2answers
1k views

How do I change a sprite's color?

In my rhythm game, I have a note object which can be of a different color depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to ...
7
votes
5answers
1k views

Is there a way to blur objects in a 2d game with OpenGL without using shaders?

Is there a nice way in OpenGL to blur objects without using shaders? Currently, I'm accomplishing blur by rendering the object slightly up, down, left, right, and the four diagonals from its original ...
7
votes
1answer
584 views

Most efficient way to draw large number of the same objects, but with different transforms

I'd like to draw a large number (multiple thousands) of simple meshes (each maybe... a maximum of 50 triangles, but even that is a very large upper bound), all of which are exactly the same. As a ...
7
votes
3answers
3k views

How do I implement occluded lighting in a block-based 2D game?

I want to have 2D lighting that can be blocked by in-game objects. My game has a top-down view and all game objects are described by rectangles. Let's say I have a 10x10 world and I place a light at ...
7
votes
1answer
502 views

Best practices with Vertices in Open GL

What is the best practice in regards to storing vertex data in Open GL? I.e: struct VertexColored { public: GLfloat position[]; GLfloat normal[]; byte colours[]; } ...
7
votes
2answers
4k views

GLSL Shader - Change Hue/Saturation/Brightness

I'm trying to change the hue of an image using a GLSL fragment shader. I want to achieve something similar to Photoshop's Hue/Saturation Adjustment layer. In the following image you can see what I've ...
7
votes
2answers
4k views

Why should I not use glTools/glut when developing complete applications?

I've started learning how to use OpenGL a while back, using the OpenGL SuperBible, Fifth Edition, and I've had people arguing about the fact that the book doesn't really teach how to use OpenGL but ...
7
votes
3answers
2k views

OpenGL - Stack overflow if I do, Stack underflow if I don't!

I'm in a multimedia class in college, and we're "learning" OpenGL as part of the class. I'm trying to figure out how the OpenGL camera vs. modelview works, and so I found this example. I'm trying to ...
7
votes
2answers
2k views

Fastest way to draw small particles in opengl?

Quick question : Which is the fastest method to render a large array of 4x4/8x8 particles in opengl ? Currently i spend 2triangles for each one but i think that its slow so i would really like to know ...
7
votes
3answers
2k views

Optimizing Octree Rendering

Say I have an octree and at a certain level I store VBOs in that octree. I know the dimensions of of the nodes that own the vbo so I can do basic frustum culling. That works nicely because everything ...
7
votes
1answer
3k views

Interleaving Arrays in OpenGL

In my pursuit to write code that matches todays OpenGL standards I have found that I am completely clueless about interleaving arrays. I've tried and debugged just about everywhere I can think of but ...
7
votes
1answer
714 views

Do I really have to write my own optimized model format?

So I'm a brand new noob to the world of game dev and I'm starting off by trying to write my own game using C++ and openGL. I'm getting into loading models etc and while searching around for "the best ...
7
votes
2answers
1k views

What causes some computers to have no or slow OpenGL, and how to fix it?

I am using Java with JOGL to create OpenGL enhanced 2D graphics. The graphics operations I use are nothing fancy, and should be supported by almost any recent graphics card. For example, my game ...
7
votes
1answer
2k views

Which c/c++ model animation library for OpenGL [closed]

I'm fairly new to game development, played around with xna before and just learning OpenGL & c now and I'm interested to know which c/c++ based model animation libraries are out there and which ...
7
votes
1answer
7k views

How does gluLookAt work?

From my understanding, gluLookAt( eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z ); is equivalent to: glRotatef(B, 0.0, 0.0, 1.0); ...
7
votes
1answer
3k views

SDL2 with OpenGL — weird results, what's wrong?

I'm porting an app to iOS, and therefore need to upgrade it to SDL2 from SDL1.2 (so far I'm testing it as an on OS X desktop app only). However, when running the code with SDL2, I'm getting weird ...
7
votes
2answers
220 views

Can applications using old versions of Opengl still run on newer cards?

OpenGl 3.0 and up has a quite big difference from the older versions like OpenGl 2.x and opengl 1.x in terms of implementation, does that mean applications which are written with the old versions of ...
7
votes
2answers
2k views

How do I apply skeletal animation from a .x (Direct X) file?

Using the .x format to export a model from Blender, I can load a mesh, armature and animation. I have no problems generating the mesh and viewing models in game. Additionally, I have animations and ...
7
votes
2answers
140 views

How do games handle rendering Asian unicode text?

I'm currently in the process of implementing text rendering in my game engine, and I decided to utilize AngelCode's BMfont to generate font textures, and then have OpenGL render textured quads for ...
7
votes
1answer
1k views

How can I organize render and transformation data in a scalable fashion?

I am writing for OpenGL 2.0 and in the future porting to OpenGL ES 2.0. I only use VBOs and shaders (no immediate mode, no vertex arrays). I already have working solutions, they just... feel wrong. ...
7
votes
2answers
2k views

Frustum Culling with VBOs

I have terrain being rendered in my project using VBOs in OpenGL. I would like to apply some Frustum Culling but have no idea how to access each polygon as its drawn to check if it is in view. I think ...
7
votes
1answer
140 views

Slow uniform array in shader causing FPS drop

I'm trying to use an uniform array of matrices in my compute shader. However, it's really slow. I've narrowed it down to this lines of code: uniform mat4 someMatrixArray[64]; ... vec4 result = ...
7
votes
3answers
350 views

Terrain & Multi-Texturing

I'm using OpenGL (Version 4.4) (and C++ if that matters). I've created a terrain renderer, the terrain is stored as a 3D scalar field (isosurface/voxels). It uses a slightly modified version of ...
7
votes
2answers
864 views

How would I setup fog to follow a players coordinates?

I'm wondering if its possible to setup a fog to a player's coordinates (where there is fog around the player to make it more third-person) the main reason I ask this is because I have my player more ...
7
votes
1answer
2k views

Atmospheric Scattering

I'm trying to implement atmospheric scattering based on Sean O`Neil algorithm that was published in GPU Gems 2. But I have some trouble getting the shader to work. My latest attempts resulted in: ...