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

3
votes
1answer
118 views

Do I need Texture Units when NOT using shaders?

Does calling glActiveTexture() even make sense when not using shaders? I only have to switch the textures before drawing a buffer with glBindTexture(), right?
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 ...
0
votes
1answer
468 views

VBO GL_STREAM_DRAW double buffer or new buffer?

There is some conflicting information on the STREAM usage specifier. Apple's documentation states you should use double buffering and update the stream buffer that is not being read by the GPU. ...
10
votes
1answer
863 views

How to reduce image size without pixelation?

I see lots of games with smooth edges characters and high res images, however when I try to reduce images to say 64x64 for my character I just get a pixelated mess. even if I start with a 64x64 canvas ...
0
votes
1answer
83 views

Freeglut: Functions missing

I'm currently learning OpenGL (in class) and we're using freeglut 2.8.2, which works just fine (using Visual Studio 2012). As an additional learning resource I'm reading the "OpenGL Superbible, 5h ...
1
vote
1answer
1k views

glBufferSubData and offset alignment?

I'm having trouble rendering some of my meshes; some display just fine, some are drawn wrong or not at all. While troubleshooting I was looking at the openGL docs ...
2
votes
2answers
153 views

How scanline rendering finds an intersection with an object

I'm a newbie with graphics and after I read many articles on the web I still don't understand how in rasterizing from a pixel coordinate like (0;0) on the screen the intersection with an object (let's ...
1
vote
3answers
930 views

Set a variable inside a GLSL fragment shader that persists for the render

Is it possible to set a varying variable inside a fragment shader and have it persist? I'd like to use the depth component of the first fragment and use it on all the others, making the fragments all ...
21
votes
1answer
591 views

My game seems to be incompatible with recording software. What could be causing this?

I've just finished a little Game-Dev project for university and I need to record a video to accompany my submission (just in case they can't get my source to work). Basically my game doesn't work at ...
4
votes
1answer
722 views

Picking 3D with OpenGL ES 2

I'm trying to implement picking in my framework but I don't understand how I can do this. I'm working with: OpenGL ES 2. GLM mathematic library. What I have understand, picking can be made with ...
2
votes
2answers
563 views

Realtime fisheye to cubic or spherical panorama transformations with OpenGL or pixelshaders

I'd like to transform a sequence of circular fisheye-images to cubic or spherical panorama images to be used in a panorama-viewer based on OpenGL. The viewer-part is nemas problemas but the transform ...
3
votes
2answers
3k views

2D water shader similar to Limbo's effect

I'm wondering how I would go about creating a 2D water shader that is seen in this video http://www.youtube.com/watch?v=phChFfi4GOs The water effect that limbo uses is pretty awesome. I'm not so ...
0
votes
1answer
269 views

How to seamlessly texture a cube in OpenGL

I have been following this site as an intro to OpenGL. After going through the model obj loading tutorial, I wanted to create my own .obj (a cube) as well as my own texture. Following this blender ...
1
vote
1answer
162 views

Size of an image imported with FreeImage

I'm having abit of a brainfart and I can't quite grasp what I'm doing wrong. It's quite simple, I am importing an image with FreeImage (http://freeimage.sourceforge.net/) which has a method ...
1
vote
2answers
404 views

Calling glGetError() in release builds?

Currently, I'm calling glGetError() after each OpenGL function call in order to be able to detect and report bugs. I've been reading that glGetError() calls should be reduced to once per frame in ...
2
votes
0answers
68 views

uniform z slices in clip-space

1) Context I'm using a regular OpenGL perspective projection matrix created with GLM (glm::perspective) and taking the inverse (glm::inverse) to transform clip-space back into view space (and world ...
1
vote
0answers
127 views

Posible to export f-curves in blender?

I work with some friends on a rail shooter game in openGL. For creating our world we are using Blender. Since we want our Tank to follow a path I have started to work with creating bezier curves and ...
1
vote
2answers
136 views

Calling opengl32.DLL from java?

I don't like LWJGL in some cases, so I prefer to use Swing. The thing is that Swing doesn't have OpenGL. I have tried JOGL and it's a mess to install, needs external jars, and I have yet to get it ...
1
vote
0answers
227 views

textures and bouncing balls inside a cube [closed]

i have a cube with texture but when i add 3 balls so that they bounce on the walls of the cubes everything seemed to be wrong,the balls are not bouncing in the right directions, i want them to bounce ...
1
vote
0answers
98 views

How to put OpenGL in a state for drawing blended, colored, nontextured polys?

Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
0
votes
1answer
321 views

gluLookAt strange behavior implementing camera

I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly ...
3
votes
2answers
1k views

FBX Importer - Texture Name

I have a problem with the FBX SDK. I read in the data for the vertex position and the uv coordinates. It works fine, but now I want to read for each polygon to which texture it belongs, so that I can ...
-1
votes
1answer
440 views

OpenGL/SDL2 window stopped rendering [closed]

I have been working on a game engine for a couple of days now and I've had it rendering a colourful cube and playing sounds in OGG format, but, after refactoring my code-base to make things easier; it ...
2
votes
1answer
175 views

Translating Viewmatrix is inverted, why?

So I've defined a Projectionmatrix, Viewmatrix and a Modelmatrix using OpenGL (LWJGL). But when I translate my Viewmatrix to +X it moves my object to the right (hence my camera is moving to the ...
4
votes
2answers
955 views

Manage VBO/VAO in a graphic engine

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX). How can I manage ...
-1
votes
1answer
295 views

SDL Access Violation

I've created a SDL game project and this window popped up while trying to compile: First-chance exception at 0x00000000 in SDL_Game.exe: 0xC0000005: Access violation executing location 0x00000000. ...
4
votes
2answers
269 views

Grids and vertices

I have no idea what this is even called or even to start searching how to solve this problem. So figured I would post here for any information at all. Specially looking for already known solutions to ...
4
votes
1answer
897 views

variable number of lights in a glsl shader?

I want to render an arbitrary number of lights in my fragment shader. I do not understand how you can properly pass them into the shader though. For example, I want something like this: uniform int ...
0
votes
1answer
121 views

How to alter the angle of texture projection

I'm currently working on a 3Dish game; it's on a grid, with 3D props and the camera looking down on the grid at about 45º, but I want to use 2D sprites for the player and NPCs. Currently, I'm using a ...
2
votes
2answers
140 views

OpenGL global/local states [closed]

OpenGL has so many APIs which can modify different states. It's not so obvious whether an API has global effect or local effect. For example, rumour says glTexEnv has global effect while ...
0
votes
1answer
214 views

glDisableClientState in OpenGL

I'm just wondering why we need to call glDisableClientState(GL_VERTEX_ARRAY) after the drawing of a vertex array. Is it possible to just leave it there for the next drawing? Is there any side effect ...
1
vote
2answers
832 views

First person camera with Bullet Physics

Before integrating the Bullet Physics, the camera worked fine. But instead of using my own simple struct for transform data, I use rigid body structs provided by the physics library now. There are ...
1
vote
0answers
368 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
-1
votes
2answers
244 views

GLSL: Why can only some of the matrices be found? [closed]

I've been learning GLSL and to start I've been trying to replicate the fixed-function pipeline functionality with it, for 2D graphics. I've done it successfully in most things, so far, but I came into ...
2
votes
1answer
211 views

gbuffer - how to store an integer data

In a gbuffer I store a diffuse color in following texture: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); I want to store an integer data which ...
3
votes
2answers
106 views

using DirectX to generate a sprite sheet

I am building a site in HTML5 for my client and it must run on the iPad/iPhone (i.e. Safari on iOS). They want a 3D effect where they have a simple, yet, specific product they want to show on the ...
3
votes
1answer
650 views

Multiple Textures in Shader?

I have this (pseudo) code: unsigned int TextureLoc = glGetUniformLocation(programID, "objectTexture"); for(int i = 0; i < object->texturesCount; i++) { glActivateTexture(GL_TEXTURE0); ...
1
vote
1answer
214 views

Sidescrolling troubles [closed]

I'm making a sidescroller using java and Lwjgl. But I'm having some trouble getting the screen to actually ... well... sidescroll. The world is randomly generated and drawn in blocks. Like so: ...
3
votes
1answer
223 views

Rendering a black and white image in OpenGL 1.1

Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?
5
votes
1answer
2k views

How to do simple bump mapping

I'm trying to do bump mapping, and I'm getting fairly close at achieving my goal. I miss one crucial piece of my puzzle to have bump mapped effect in my scene; I need to transform the normals from my ...
0
votes
1answer
821 views

Reinhard tone mapping and color space [closed]

I found two ways of doing tone mapping (first, second): //Ld - this part of the code is the same for both versions float lum = dot(rgb, vec3(0.2126f, 0.7152f, 0.0722f)); float L = (scale / ...
-1
votes
1answer
168 views

Transformations are not correct using GLM and OpenGL

The aim of my program is to render a simple colored triangle in rotation. The rotations are correct if all Z values of my vertices are equals to 0.0f. If one of these values are different of 0.0f the ...
-2
votes
1answer
234 views

Incorrect rotations using openGL GLM and shaders [closed]

The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...
2
votes
1answer
2k views

How to implement a basic arcball camera in OpenGL with GLM

I only just started learning OpenGL and even things like vector maths etc a couple of days ago, so I am having a bit of trouble figuring out exactly what to do to implement an arcball camera system. ...
4
votes
2answers
244 views

generating animations in runtime

i am creating my 3d game engine using Opengl. this question might sound stupid to you but i am still in the process of learning, i have a 3d animated girl that slaps guys of different talls on the ...
2
votes
1answer
358 views

RGB to xyY color space conversion and luminance

The luminance calculated by following GLSL functions (fragment shaders - tonemap) has different value: float GetLuminance (vec3 rgb) { return (0.2126 * rgb.x) + (0.7152 * rgb.y) + (0.0722 * ...
3
votes
2answers
192 views

Shaders and Performance

I'm coding my first Shader in my little game engine, and I have some questions about it's performance and common approaches. Is the Shader code processed by the video card instead of the PC ...
2
votes
0answers
446 views

Converting Mouse Coords to 3d coords with Camera position [closed]

So I've looked at all the answers I can possibly find, and nothing seems to fit what I need exactly (because im bad at math). I'll explain what I have thus far: A camera with x,y,z, Pitch and Yaw ...
5
votes
2answers
689 views

3D models on 2D tilemap perspective when scrolling

I am creating a small top-down game, where the player traverses a 2D tilemap, with an illusion of depth provided by 3D models for things like buildings or trees. Having gotten to the point where I ...
3
votes
1answer
166 views

Rendering metallic look

I would really like to get the same metallic reflection look as in CSR Racing for my game in the simplest way possible. It doesn't have to be top-notch, but right now my rendering looks horrible and ...