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 ...
6
votes
1answer
174 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
2k 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 ...
6
votes
4answers
872 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
5k 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 ...
6
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 ...
6
votes
2answers
586 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
4answers
499 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
334 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
2k 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 ...
6
votes
2answers
4k 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.
...
6
votes
4answers
389 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
116 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
3answers
1k 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
1answer
4k 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
2answers
594 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
924 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
1answer
2k 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
609 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 ...
6
votes
2answers
319 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
2answers
766 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 ...
6
votes
1answer
747 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
2answers
493 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
773 views
How can I get into opensource game development?
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 ...
6
votes
1answer
69 views
Texture coordinate discontinuity with mipmaps creates seams
I just started learning openGL and I am getting this artifact when texturing a sphere with mipmaps. Basically when the fragment samples the edge of my texture, it detects the discontinuity (say from 1 ...
6
votes
2answers
393 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
639 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. ...
6
votes
2answers
2k views
Using a GLSL fragment shader to draw a texture in the middle of a quad
I'm not sure how possible this is, but I'm trying to use a fragment shader to draw a portion of a texture in the middle of a quad. This is all 2D. The quads consist of four vertices from (0, 0) to ...
6
votes
1answer
665 views
Using glReadBuffer/glReadPixels returns black image instead of the actual image only on Intel cards
I have this piece of code
glReadBuffer( GL_FRONT );
glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer );
Which works just perfectly in all the Nvidia and AMD GPUs I have tried, ...
6
votes
4answers
462 views
Impact of variable-length loops on GPU shaders
Its popular to render procedural content inside the GPU e.g. in the demoscene (drawing a single quad to fill the screen and letting the GPU compute the pixels).
Ray marching is popular:
This means ...
6
votes
1answer
145 views
Excluding Background from Color Picking
I've implemented picking based on color coding, but I don't want the background color to be pickable. Is there any way in openGL (2.x) to exclude the background color? For some reason, doing ...
6
votes
2answers
784 views
Getting the number of fragments which passed the depth test
In "modern" environments, the "NV Occlusion Query" extension provides a method to get the number of fragments which passed the depth test. However, on the iPad / iPhone using OpenGL ES, the extension ...
6
votes
1answer
1k 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: ...
6
votes
3answers
966 views
Common light map practices
My scene consists of individual meshes. At the moment each mesh has its associated light map texture, I was able to implement the light mapping using these many small textures.
1) Of course, I want ...
6
votes
1answer
179 views
Getting started to OpenGL - little question
Im starting to learn opengl, and after 2 days, searching and trying hard, i finally installed all the libraries i need (lol).
So, I'm following this tutorial, and it says to use glfwOpenWindowHint ...
5
votes
5answers
1k 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 ...
5
votes
3answers
969 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 ...
5
votes
4answers
2k 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 ...
5
votes
3answers
1k 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 ...
5
votes
2answers
249 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 ...
5
votes
2answers
1k 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 ...
5
votes
5answers
755 views
What are some low-level performance tweaks for iPhone games written in c?
I'm interested in some performance tweaks for a relatively simple OpenGL ES based 2D iPhone game. What performance tweaks have you found? The performance of the game is pretty good on most devices ...
5
votes
3answers
3k views
How can I get started programming OpenGL on Mac OS X?
I'm trying to start OpenGL programming on a Mac, which brings me into unknown territory on a lot of things.
During the day, I'm a Web Developer, working in C# and before that in PHP and Delphi, all ...
5
votes
1answer
4k 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, ...
5
votes
2answers
691 views
OpenGL 2 and back vs 3 and forward: What are the key differences for 2D graphics?
OpenGL contexts before and after OpenGL 3.0 are rather different. So far I've really only worked with buffers on either side anyway, I do know the most notable difference is lack of Immediate Mode.
...
5
votes
2answers
832 views
How to change the sprite colors
In my rhythm game, I have a note object which can be of different colors depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to ...
5
votes
2answers
424 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 ...
5
votes
2answers
644 views
Atmospheric Scattering
I want to add some nice atmospheric scattering to my 3D game engine but I am very concerned with conserving resources. I am not very familiar with how its done but can someone please give me some ...
5
votes
1answer
327 views
Why would I support multiple rendering engines simultaneously?
I've seen some games from the early 2000s that had a launcher where you could select the rendering engine you wanted to use: DirectX or OpenGL.
Maybe I haven't looked hard enough, but I haven't seen ...
5
votes
2answers
430 views
Which are the most futureproof languages for graphics (shader) programming?
I have written some GLSL and Cg shaders a couple years back. I am starting another graphics engine project and I want to choose my technologies carefully so that my code will be accessible years down ...
5
votes
1answer
293 views
Is a 10 meg 2048x2048 bitmap too big a size texture to use in an OpenGL game?
This is a speed question, I have a texture, which is 2048 per 2048, the texture is designed to run in big resolutions (1920x1080 for example).
The problem is, that the texture have a size of 10MB in ...