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

52
votes
7answers
16k views

Good resources for learning modern OpenGL (3.0 or later)? [closed]

I stumble upon the search of a good resource to start with OpenGL (3.0 or later) . Well, I found a lot of books but none of them can be considered a good resource! Here two examples: OpenGL ...
64
votes
15answers
24k views

What are some good learning resources for OpenGL? [closed]

I have been using the OpenGL ES on the iPhone for a while now and basically I feel pretty lost outside to the small set of commands I've seen in examples and adopted as my own. I would love to use ...
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 ...
20
votes
4answers
10k views

How to avoid texture bleeding in a texture atlas?

In my game there is a Minecraft-like terrain made out of cubes. I generate a vertex buffer from the voxel data and use a texture atlas for looks of different blocks: The problem is that the texture ...
8
votes
4answers
13k views

How can I orbit a camera about it's target point?

I'm drawing a scene where the camera freely moves about the universe. The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector. These vectors/points ...
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 ...
3
votes
1answer
203 views

LWJGL Eclipse Resource Deployment

I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now ...
2
votes
3answers
2k views

Optimized rendering of a cube mesh world

I want to render a cube-mesh (a.k.a. Minecraft-style) world. If I render each existing cube it will eat up FPS pretty quickly. How can I optimize it? I understand that the point is to not render ...
20
votes
2answers
14k views

A good way to build a game loop in OpenGL

I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I ...
46
votes
9answers
45k views

Good GUI for OpenGL [closed]

I am starting to learn OpenGL with FreeGLUT using the Superbible and the knowledge i have from my elementary graphics to brush up on my skills. To get more from this experience i want to integrate a ...
14
votes
2answers
1k views

What are the common rendering optimization techniques for the geometry pass in a deferred shading renderer? [closed]

I have been developing a game engine using OpenGL 3 and C++ (and glfw for window management). I have advanced so far, got most of the things done except sound entities and optimizations. The engine ...
12
votes
1answer
9k views

Making a HUD/GUI with OpenGL (LWJGL)

I'm at the stage in my game development where I need to make a HUD or GUI. I've never gotten to this part, so I don't know how its done. I tried rendering a simple quad at a fixed position on the ...
10
votes
2answers
10k views

converting a mouse click to a ray

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
54
votes
9answers
16k views

Why do we move the world instead of the camera?

I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around. For example here is an extract of this tutorial: OpenGL View matrix ...
38
votes
10answers
10k views

Is learning OpenGL 2.1 useless today?

I'm new to 3D OpenGL/DirectX world and I found out that OpenGL 4.1 and GLSL specifications were just released today. A friend of mine gave me the Red Book for OGL v2.1 but, as far as I've read, 3.x ...
36
votes
1answer
4k views

How can I reduce aliasing in my outline glow effect?

I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect: I'm ...
20
votes
2answers
7k views

How many threads should an Android game use?

At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by GLSurfaceView. Renderer.onDrawFrame() should be doing a minimum of work to get the higest FPS. The physics, AI, ...
14
votes
3answers
8k views

Starting out with OpenGL when most tutorials are out of date

I'm sure there are already a bunch of questions like this asked, but the constant updating of the OpenGL library throws them all away, and in a month or two, the answers here will be worthless again. ...
28
votes
9answers
3k views

Should I continue studying OpenGL or just switch to DirectX to give me a better chance of landing a job in the game industry? [closed]

I've been learning graphics programming for some time now using OpenGL and Linux. I'm pretty familiar with most of the concepts, but I would really like to further my knowledge and eventually pursue a ...
1
vote
2answers
8k views

Where to start learning OpenGL with C++? [duplicate]

Possible Duplicate: What are some good learning resources for OpenGL? I have learnt C++ and made some cool text based games and such but I would love to start graphical programming. I'm a ...
11
votes
1answer
3k views

How does UVW texture mapping work?

I'm trying to understand the mathematical theory behind UVW mapping. Can anyone explain me how UVW mapping works? Or at least provide me a pointer?
3
votes
4answers
17k views

Starting programming in 3D with C++ [closed]

EDIT: There aren't sufficient enough tutorials for what I'm trying to do in Python, so I'm going to take my time and slowly build up my skills in C++. It's hard to trip and not land in a book of C++ ...
8
votes
1answer
685 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?
4
votes
2answers
837 views

Square game map rendered as sphere

For a hobby project of mine I have created a finite voxel world (similar to Minecraft), but as I said, mine is finite. When you reach the edge of it, you are sent to the other side. That is all ...
9
votes
1answer
2k views

GLSL, all in one or many shader programs?

I am doing some 3D demos using OpenGL and I noticed that GLSL is somewhat "limited" (or is it just me?). Anyway I have many different types of materials. Some materials have ambient and diffuse color, ...
3
votes
2answers
377 views

GLM Velocity Vectors - Basic Maths to Simulate Steering

UPDATE - Code updated below but still need help adjusting my math. I have a cube rendered on the screen which represents a car (or similar). Using Projection/Model matrices and Glm I am able to ...
16
votes
3answers
11k views

full screen anti-aliasing in opengl

I want to do a full screen anti aliasing in opengl and dont want to use the anti-aliasing that is provided by opengl itself since I am building a game and want good effects in it. So can any one ...
28
votes
5answers
9k views

How can I achieve a good fire effect with alpha blending and particles?

Using the following setting for the OpenGL particle effect: SRC: GL_SRC_ALPHA DST: GL_ONE Creates an additive blend, which looks spectacular on a black background but terrible on brighter colours, ...
23
votes
6answers
6k views

Creating a retro-style palette swapping effect in OpenGL

I'm working on a Megaman-like game where I need to change the color of certain pixels at runtime. For reference: in Megaman when you change your selected weapon then main character's palette changes ...
5
votes
3answers
5k 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 ...
21
votes
7answers
3k views

How to get PS3/Xbox 360 experience without having access to Dev kits?

I am a budding game programmer trying to get into the industry programming for PS3, Xbox 360. The main problem I see is the need to demonstrate my skills to a potential employer, but without access ...
14
votes
6answers
3k views

Modern Shader Book?

I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about ...
9
votes
1answer
3k 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 ...
4
votes
1answer
2k views

Implementing a skybox with GLSL version 330

I am trying to get a skybox working with OpenGL 3.3 and GLSL version 330. I could not find a completely modern OGL skybox tutorial anywhere on the web, so I modernised an older one (using ...
14
votes
5answers
16k views

Drawing lots of tiles with OpenGL, the modern way

I'm working on a small tile/sprite-based PC game with a team of people, and we're running into performance issues. The last time I used OpenGL was around 2004, so I've been teaching myself how to use ...
13
votes
1answer
2k views

Which is the best LOD method for planet rendering?

I'm currently working on my thesis, it is an engine to render terrains of planetary size. I'm still finishing my research and I have encountered a lot of stuff about this subject, the problem is that ...
19
votes
3answers
12k views

What is the difference between OpenGL ES and OpenGL?

Android uses OpenGL ES, what is the difference between it and OpenGL?
14
votes
3answers
2k views

How can I unit test rendering output?

I've been embracing Test-Driven Development (TDD) recently and it's had wonderful impacts on my development output and the resiliency of my codebase. I would like to extend this approach to some of ...
5
votes
2answers
2k 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 ...
13
votes
1answer
1k views

Normals vs Normal maps

I am using Assimp asset importer (http://assimp.sourceforge.net/lib_html/index.html) to parse 3d models. So far, I've simply pulled out the normal vectors which are defined for each vertex in my ...
5
votes
2answers
855 views

Is the “impossible object” possible in computer graphics?

This may be a silly question but I want to know the answer to it. I saw this thing called the "impossible object", while they're many different images of this online, it's suppost to be impossible ...
4
votes
2answers
1k views

interpolating frames in a vertex shader

My models are stored as a set of meshes, each with a vertex list and normal list per key-frame, and indices for GL_TRIANGLES which is shared for all frames. Each frame I lerp between two adjacent ...
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 ...
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
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
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 ...
3
votes
1answer
375 views

How to do perspective projection “parallax” but without changing the scale or offset of objects?

Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
1
vote
1answer
344 views

Are interleaved vertex data formats better than non-interleaved formats?

I have been reading up on data formatting for 3D objects so that I can render my meshes as fast as possible in OpenGL. I am quite new to OpenGL so bear with me. The format for interleaving your ...
9
votes
1answer
1k 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 ...
3
votes
1answer
876 views

Rotating To Face a Point

I am trying to rotate a line to point to the mouse's world coordinates (rather where the mouse lies on the plane where y=0). I am running into a couple of problems though: Whilst it follows the ...