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 ...
9
votes
1answer
404 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
0answers
58 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.
...
8
votes
1answer
383 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
48 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
129 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
76 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
198 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 ...
17
votes
0answers
324 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
160 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
144 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
386 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
104 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 ...
0
votes
0answers
23 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
86 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 ...
-4
votes
1answer
99 views
What's the complexity, given current technology, of writing a decent scene renderer in OpenGL? [closed]
What's the complexity, given current technology, of writing a scene renderer that produces reasonably high-quality output in OpenGL?
I'm definitely not asking about writing a full games engine - ...
2
votes
0answers
44 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
54 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
75 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 ...
0
votes
0answers
59 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
64 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
0answers
37 views
trying to add texture to my code [closed]
I have been working on making a cube and I have some balls inside it though I am having problems on how I can put or add texture to my code. I am trying to learn but it seems whatever material I'm ...
-1
votes
1answer
132 views
Why does OpenGL doesn't draw anything to the screen? [closed]
So, I was following the tutorial by Swiftless for openGL 4.x. The program that I created by following his tutorials doesn't output anything. I've tried checking shaders for errors - I don't seen any ...
1
vote
0answers
91 views
Help with perspective in OpenGL [closed]
Disclaimer: this is a trick-question. It's not about transforms or projections it's about 'gaining perspective'.
Example: I want to create a smoking camp-fire in my game but all the tutorials on ...
0
votes
1answer
108 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 ...
1
vote
1answer
125 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
128 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
64 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
200 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
97 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.
...
3
votes
2answers
177 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 ...
3
votes
1answer
151 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
74 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 ...
0
votes
0answers
40 views
gluQuadricTexture vs glTexGen
I'd like to perform env mapping on a sphere. It seems I have two options:
Use gluQuadricTexture:
GLUquadric *obj = gluNewQuadric();
gluQuadricTexture(obj, GL_TRUE);
Use glTexGen:
glEnable ...
2
votes
2answers
97 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
97 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 ...
0
votes
2answers
195 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 ...
0
votes
0answers
190 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
155 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
114 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
65 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
103 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
186 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
98 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?
0
votes
1answer
136 views
Ogre3d or OpenGl or other [closed]
I want to learn Graphics for games or use a game engine. I don't know whether to use ogre3d, I know its a rendering engine however android isn't really supported, Boost is used for multithreaded when ...
5
votes
1answer
418 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
94 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
51 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
74 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 ...
1
vote
1answer
482 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
177 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 ...
