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

7
votes
2answers
223 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
1k views

Enabling multisampling in Irrlicht?

I'm working on a little game that uses Irrlicht. I'm pretty new to Irrlicht and I was wondering how I could enable multisampling. The device driver is EDT_OPENGL initiated as such: IrrlichtDevice ...
7
votes
2answers
332 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
2answers
213 views

How to avoid subpixel values in a resolution independent 2D game with orthographic projection?

I'm trying to do resolution independent rendering of moving sprites in a 2D game. My plan is work in a fixed coordinate system in my world (for example 960x540) and use orthographic projection to ...
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
1answer
165 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
550 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
899 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: ...
7
votes
4answers
2k views

OpenGL 2D Rasterization Sub-Pixel Translations

I have a tile based 2D engine where the projection matrix is an orthographic view of the world without any scaling applied. Thus: one pixel texture is drawn on the screen in the same size. That all ...
6
votes
3answers
1k views

What features does D3D have that OpenGL does not (and vice versa)?

Are there any feature comparisons on Direct3D 11 and the newest OpenGL versions? Well, simply put, Direct3D 11 introduced three main features (taken from Wikipedia): Tessellation Multithreaded ...
6
votes
4answers
3k views

2D Platformer Collision Handling

I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font ...
6
votes
3answers
965 views

Understanding how to create/use textures for games when limited by power of two sizes

I have some questions about the creating graphics for a game. As an example. I want to create a motorbike. (1pixel = 1centimeter) So my motorbike will have 200 width and 150 height. (200x150) But the ...
6
votes
2answers
3k views

OpenGL ES 2.0: Using VBOs?

OpenGL VBOs (vertex buffer objects) have been developed to improve performance of OpenGL (OpenGL ES 2.0 in my case). The logic is that with the help of VBOs, the data does not need to be copied from ...
6
votes
3answers
513 views

shadowing billboards

I have a lot of billboarded 3D spheres (they have a heightmap so work properly with depth and penetration; although each is made of just a quad (with slight distortion), they look and feel and are ...
6
votes
4answers
1k views

How can I generate a view or projection matrix for OpenGL 3.+

I'm transitioning from OpenGL 2 to OpenGL 3.+ and to GLSL 1.5. I'm trying to avoid using the deprecated features. My question how do we now generate the view or projection matrix. I was using the ...
6
votes
1answer
277 views

GLSL vertex shaders with movements vs vertex off the screen

If i have a vertex shader that manage some movements and variations about the position of some vertex in my OpenGL context, OpenGL is smart enough to just run this shader on only the vertex visible on ...
6
votes
2answers
3k views

How do I load textures with SFML for OpenGL?

I'm looking at NeHe's texture mapping tutorial. It looks overly complicated for just loading a texture. Is there a way to load a texture in SFML and then use it in Open GL? I use SFML for my ...
6
votes
4answers
1k views

Spell Effects/Shaders

I want to be able to achieve spell effects that cause a fragmenting/discoloring effect on the sprite. The first couple seconds of this video http://www.youtube.com/watch?v=HNCFh7mkvuc shows what I ...
6
votes
1answer
8k views

How to render a texture partly transparent?

Good Morning StackOverflow, I'm having a bit of a problem right now as I can't seem to find a way to render part of a texture transparently with openGL. Here is my setting : I have a quad, ...
6
votes
2answers
6k views

How do you determine which object/surface the user's pointing at with lwjgl?

Title pretty much says it all. I'm working on a simple 'lets get used to lwjgl' project involving manipulation of a rubik's cube, and I can't figure out how to tell which side/square the user's ...
6
votes
2answers
626 views

OpenGL or OpenGL ES

What should I learn? OpenGL 4.1 or OpenGL ES 2.0? I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about ...
6
votes
1answer
779 views

How would one draw many objects using the same VBO

I'm kind of stuck with this question for some time now, maybe because I don't know exactly what to search for, it might be a term I have not heard of yet as most tutorials ends after drawing one ...
6
votes
4answers
2k views

Generating triangles from a square grid

I have a 2D square grid of values representing terrain elevations, and I want to generate triangles from that grid to make a 3D view of the terrain. My first thought was to split each square ...
6
votes
1answer
2k views

How to invert background pixel's color

I'm writing a game and map editor using Java and jMonkeyEngine. In the map editor, I've got a brush done by wireframed sphere. My problem is: I want to make it visible everywhere, so I want to invert ...
6
votes
2answers
547 views

GL_EXT_draw_instanced vs VBO's

I'm having trouble understanding the benefit of the newer GL_EXT_draw_instanced over traditional VBO's. Don't both keep geometry cached on the gpu for faster redrawing? VBO's seem much more ...
6
votes
1answer
435 views

Display Lists in OpenGL

I heard that there was a faster method of displaying vertices, rather than recreating the GL_TRIANGLES, each time the scene is drawn. I thought I read somewhere that this method was obselete. Why ...
6
votes
2answers
747 views

Fixed Function vs Programmable Pipeline performance with many batches

In OpenGL 2.0 I can easily make 10,000 draw calls per frame (with state changes in between each call). However, if i try to do this in either OpenGL ES 2.0 or DirectX9 with shaders, my peformance is ...
6
votes
1answer
691 views

Efficiently rendering to 3D texture

I have an existing depth texture and some other color textures, and want to process the information in them by rendering to a 3D texture (based on the depth contained in the depth texture, i.e. a ...
6
votes
1answer
198 views

Get SFML to report the version of OpenGL that is being used

How can I get SFML to report the version of OpenGL that is being used by the render window?
6
votes
4answers
5k views

Object-Oriented OpenGL

I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state ...
6
votes
2answers
458 views

Should I batch up debug primitives for rendering in modern OpenGL?

I've recently started porting some old rendering demos I did to modern OpenGL. I had a debug drawing class in my old code which used immediate mode glBegin(), glEnd() etc. for rendering debug objects ...
6
votes
3answers
2k views

Direct3D and OpenGL Matrix representation

As I read in OpenGL matrices are column major. It means that if I create a 16 element array first four elements are the first column in matrix. Is it the same for Direct3D or any transformation's ...
6
votes
4answers
10k views

Wavefront *.obj loader in C++

I'm creating a game using OpenGL (via SDL) and C++ (via Visual Studios 2010 Professional). During the game, I will be using 3D character animation. I'd like to use wavefront *.obj files for all the 3D ...
6
votes
1answer
5k views

Help understanding gluLookAt()

I am fairly new to openGL( 3 months ) and am asking for assistance in understanding the fundamentals behind gluLookAt(). Currently I have spent most of my time with openGL modeling scenes with fixed ...
6
votes
1answer
612 views

GLSL subroutine not being used

I'm using a gaussian blur fragment shader. In it, I thought it would be concise to include 2 subroutines: one for selecting the horizontal texture coordinate offsets, and another for the vertical ...
6
votes
2answers
886 views

How are dynamic blending shadows like this created?

I would like to know, how dynamic shadows, that 'blend' onto other objects, are created.
6
votes
1answer
1k views

Rendering 2D grass

My current project, using Java and OpenGL, has a fairly standard overhead tilemap in the style of the Zelda games. I'd really like to add "real" grass to the grass tiles so that there are actually ...
6
votes
2answers
352 views

Changing player color without multiple player bitmaps [duplicate]

Possible Duplicate: How to colorize certain parts of a model - like RTS games have those team colors? Ok, so here is my current situation. I have a player model, fully UV mapped, and ...
6
votes
1answer
503 views

Sprite with alpha Blending in 3D world

I'm working on a game in a 3D world with elements 2D only (Like Don't starve game) for Android and IOS. Currently, I've managed "Sprite" without alpha blending, I've just put a condition in the pixel ...
6
votes
1answer
496 views

How can I debug _why_ glDrawArrays is very slow?

I'm working on a game that uses CEGUI and Ogre. Recently, we've discovered that some of our customers with GeForce4 MX 4000's, performance is terrible. After a night spent debugging, I've tracked ...
6
votes
1answer
4k views

GLSL - Rewriting shaders from #330 to #130

I recently created a game (LD21) that uses a geometry shader to convert points into textured triangles/culling. Since I was under the impression that the support for #330 was widespread I only wrote ...
6
votes
1answer
264 views

With what projection matrix should I render a portal to a texture?

I'm using OpenGL. I have problem with my engine's portal implementation. To create the first portal I do: create a virtual camera with the position of the second portal and the correct orientation ...
6
votes
1answer
755 views

Do I need to rewrite my HLSL shaders when porting from XNA to MonoGame?

I'm looking at porting an XNA project I have to monogame, but I have a fair number of HLSL shaders. It seems that Monogame for PC uses OpenGL as the rendering backend, and I'd rather not have to ...
6
votes
1answer
942 views

Octree implementation for fustrum culling

I'm learning modern (>=3.1) OpenGL by coding a 3D turn based strategy game, using C++. The maps are composed of 100x90 3D hexagon tiles that range from 50 to 600 tris (20 different types) + any ...
6
votes
2answers
556 views

An odd performance problem rendering a simple scene (less than 14k vertices) in OpenGL using two vbos with LWJGL

Problem I have been having a strange degrading performance issue rendering a simple scene containing two "chunks" of 4x4x4 cubes each. Video of problem This is a screen capture showing my console ...
6
votes
1answer
1k views

How is animation handled in non-immediate OpenGL?

I'm a newbie to modern OpenGL. I'm comfortable with the immediate OpenGL methodology, but I've never done any serious use of VBOs. My question is about animation. In immediate mode, to achieve ...
6
votes
1answer
4k views

Making a camera in a 2D game (glOrtho)

I'm trying to make a camera that follows my character and it seems I've managed. However, I don't know how to limit that my camera don't follow me when my character reachs the boundaries of the ...
6
votes
2answers
677 views

Textures for an underwater environment?

I'm trying to build an underwater scene. I'm including my scene in a large cube, which I'm going to texture with images that resemble an underwater environment. Where can I get textures for something ...
6
votes
3answers
947 views

How can I get into opensource game development? [closed]

The short and sweet question I'm new to game programming in general, so how do I go about making GOOD QUALITY opensource games? What I have come across There are a multitude of games that I have ...