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

6
votes
1answer
455 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
848 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
6k 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
919 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. ...
6
votes
2answers
499 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
4answers
1k 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
1answer
385 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
258 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
160 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
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
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
1answer
262 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
529 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
3answers
4k 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
775 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
340 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
315 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
3k 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
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 ...
6
votes
1answer
416 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
2answers
485 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
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 ...
6
votes
2answers
597 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
875 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 ...
6
votes
1answer
273 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
3k 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
1k views

How to manage shaders?

I've done some shader programming some time ago but only simple stuff. I'm especially interested in how do you manage shaders? Do you just write one of each kind, or do you need more of them? If so, ...
6
votes
1answer
1k 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
669 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
152 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
1answer
296 views

OpenGL ES object rotation around z axis

I have an object on my screen which is presented rotated and panned, But i have 2 problems regarding the z axis rotations. It's a bit tricky to explain so i uploaded 2 videos to describe each problem. ...
6
votes
1answer
183 views

How to debug framerate drops with VBOs, OpenGL

I'm working on an experimental app to test how VBOs perform when rendering a minecraft-like world. If the performance is better than what I use now I'll update my actual game. Based on what everyone ...
6
votes
1answer
255 views

How to find the bottleneck in a typical OpenGL game?

I am working on a little game engine. All major features are implemented yet, despite game logic which I assume not to be such a computational effort. The framerate is at least around 40 FPS, most of ...
6
votes
1answer
388 views

Weird problem with advect program in fluid simulator

I implemented 2d fluid simulator. Solver runs entirely on GPU. All works fine... on my work PC. But on home PC I have some awful glitches, and I can`t understand how to fix them. Empirically I ...
6
votes
2answers
1k 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
971 views

How can I get my meshes to work with Bullet Physics?

The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game. When I attempted doing this method with my GLM(model loading library by nate robins) model, I ...
6
votes
1answer
2k views

gl_PointCoord always zero

I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero. Here is my code Setup: //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, "p");) ...
6
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: ...
6
votes
3answers
1k 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
0answers
145 views

OpenGL profiling with AMD PerfStudio 2 [closed]

I'm rendering just a really small amount of polygons for my UI but however I still tried to increase the FPS. In the end I removed redundant calls which increased the FPS. I really don't want to lose ...
6
votes
1answer
243 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
3answers
797 views

Started game development no idea of computer graphics. Should I learn tools or concepts? [closed]

I am in 6th semester of my Computer science bachelor degree program, Working as Intern in a start up company. I started game development using AndEngine, things are going good because I have good hold ...
5
votes
3answers
4k views

Should I use Game Engines to learn to make 3D games? [closed]

HI i am a software engineering student in his second-last year. I am proficient with C,C++,C# and java programming languages, and being a student of engineering I have studied calculus, vectors etc ...
5
votes
2answers
1k views

What is the order-less rendering technique that allows partial transparency?

I've seen somewhere rendering technique that allows order-less rendering of partially transparent sprites/objects. Though I can't remember what the technique is called, so I'm having trouble Googling ...
5
votes
3answers
304 views

What is the purpose of indices in 3D rendering?

Suppose you were creating a 3D cube in OpenGL. You implement the necessary vertex data for the object (cube). What would be the point of using indices? void CreateCube() { ...
5
votes
2answers
5k views

How many textures can usually I bind at once?

I'm developing a game engine, and it's only going to work on modern (Shader model 4+) hardware. I figure that, by the time I'm done with it, that won't be such an unreasonable requirement. My ...