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
216 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
721 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
162 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
221 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
240 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
329 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
191 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
427 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
666 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
164 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 ...
3
votes
1answer
691 views

Proper way to maintain Vertex Buffer Objects

I've started learning WebGL, currently I'm building a 2D lighting system, but there is some confusion going on inside my head. How the lighting works is based on this tutorial ...
0
votes
2answers
199 views

Proper opengl learning curve + tools [closed]

My first post here, so at first i would like to say HI to everyone! Had a course of computer graphics at my uni and got interested with opengl. Unfortunatelly we used it with java + jogl + some funky ...
0
votes
2answers
982 views

Setting up openGL on Linux

I am trying to figure out how to set up openGL on Linux based operating systems (Ubuntu 12.10) without using any *GLUT libraries. I don't have much experience with developing on Linux distributions. ...
2
votes
1answer
177 views

Camera not strafing (GLSL)

I use this code in my GLSL vertex shader, where v_position is the vertex position: gl_Position = v_position * u_camera; and set u_camera as follows: meshShader.setUniformMatrix("u_camera", ...
1
vote
2answers
507 views

OpenGL - question about glColorPointer

So, I'm just starting out with LWJGL, and my current task is to render two colored cubes on the screen. I can render them, however, I'm looking for some advice on the most efficient way to specify the ...
1
vote
2answers
647 views

How to clear a buffer to 1.0 instead of 0.0 in OpenGL?

Using glClear() you can set the buffer specified by the parameter to 0.0. This is useful say if you want pixels not covered by models to be black. Because vec3(0.0, 0.0, 0.0) results in black. But ...
0
votes
1answer
192 views

Box2D OpenGL debug renderer convert box2d coordinates to world space

I made an OpenGL 3.x renderer for Box2D's debug draw (b2Draw base class). Unfortunately I've tried for a while now to convert the box2D units, which are meters to my internal units which are pixels. I ...
-1
votes
1answer
174 views

How to go about front end UI to main Game Engine and then to Game Over Phase [closed]

I am about to complete my first ever game. I have used Qt for windowing and OpenGL for actual game logic. I am confused about .. things which are related to design so according to FAQ, these kinda ...
1
vote
1answer
245 views

Delta Time in Videos

When playing a Video in my OpenGL Game (e.g. startup video), I want to sync it with my delta time. What is the delta time and how to use here. Do I need to sync with the delta time (and how?) or is ...
0
votes
1answer
171 views

How do I pass textures into a fragment shader in Slick?

I've written a shader that uses three different textures, tex0, tex1, and tex2. I can load it into Slick and successfully display it, but I can't figure out how to set the three different textures. ...
1
vote
1answer
435 views

Selecting and moving object in OpenGL Gameplay3D Engine

I'm using Gameplay3d as a game engine to develop a simple board game. PEG Solitaire I've come to the part where I've created a 2D grid for all the movable object, empty locations and also where it's ...
-5
votes
1answer
215 views

multiplayer game in openGL [closed]

what is the easiest way how to make network communication in openGL/glut? Does anybody know any good tutorial for beginners? thanks (or is there any simpler way then openGL?)
2
votes
0answers
247 views

Displacement Mapping opengl-es [closed]

I need to do an application similar to this Morfo. And I posted a question here where the answer states the solution is "Displacement Mapping" . And I googled this to do it in opengles. I couldnt get ...
1
vote
1answer
257 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 ...
2
votes
1answer
444 views

Physics engine for Billiard game [closed]

I need to write a simple 3D billiard game using OpenGL. Which physics engine is simple and best to use in this case? Or it's better to write physics by myself?
1
vote
1answer
741 views

How expensive is OpenGL Texture Binding

I'm currently working on a renderer for Tiled's .tmx maps. Among one of the features there is that layers and tilesets are independent, so that a layer can use any tile set on any tile. It's not so ...
0
votes
2answers
671 views

WinAPI SwapBuffers and Threads

I'm trying to use a different Thread for the whole WinAPI-Message-Loop stuff, so the window always keeps being responsive. Of course I'm using the main thread as the "window thread", because I need a ...
2
votes
1answer
418 views

How to solve artifacts caused by vertex lighting in my voxel engine?

My current lighting system bakes the light amount based on ray-tracing from the light source to the 8 corners of the block (so per-vertex) and the distance to the light on the blocks. It works ...
0
votes
1answer
206 views

How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?

I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
0
votes
1answer
253 views

How to get a smooth dimming with SSAO?

I implemented SSAO in my game based on the tutorial at gamerendering.com. But the results I get are disappointing. Instead of a smooth effect as seen in the nvidia demos, my implementation causes ...
0
votes
2answers
232 views

LWJGL Game crashes on some other machines [closed]

I just tried running my game on a friend's laptop, but for some reason it crashes. The exported .jar runs fine on my machine, and some others too. I can see that is has something to do with the ...
7
votes
1answer
511 views

How wise is this multithreading architecture?

I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
-1
votes
3answers
250 views

Directional light and matrix issues

I'm trying to implement basic directional lightning in OpenGL 3.3 by emulating the logic shown in this guide: http://www.arcsynthesis.org/gltut/Illumination/Tutorial%2009.html I do not understand ...
5
votes
1answer
141 views

GLImpl.gldrawelements longer than usual

I'm developing a little game engine for the Android platform and I'm trying to improve the performance of this one. (I'm not an OpenGL expert) I can see a framerate drop sometimes, when using DDMS ...
3
votes
1answer
526 views

Rotation matrix from OpenGL to DirectX

I have an application which uses openGL and i have to port it to DirectX. To sum up my issue : How can I port rotation matrix based on a right-handed coordinate system to a left-handed coordinate ...
4
votes
1answer
658 views

deferred rendering and point light radius

I use a common attenuation equation for point lights: attenuation = 1 / kc + kl * d + kq * d^2. I use deferred rendering so I need to know a light radius. An example light has following intensity: ...
4
votes
1answer
364 views

How do you display non-cutout transparent 2D textures with a depth buffer? (OpenGL)

I've been able to get my 2D renderer to display transparent cutout textures by testing the alpha of a fragment and discarding if it is less than 1 (or any fraction really). The problem is I want to ...
4
votes
3answers
705 views

Voxel engine artifacts

There are white little dots between blocks at random places, mainly at very near blocks. They disappear when I move the mouse and change the view direction. I use Vertex Arrays with ...
0
votes
2answers
338 views

Translate camera position toward camera orientation

I have a camera position (Vec3) and camera horizontal/vertical angle. Now I want to translate my camera position toward the current camera orientation - what is the best way to do that? I am sure it's ...
1
vote
1answer
179 views

OpenGL VBO Additional Attributes

If I have a buffer with my vertices, normals and texture coordinates, and I use glDrawArrays to draw the VBO to the screen, how can I send attributes per vertex that I placed in an array to the shader ...
3
votes
1answer
203 views

Rotate an image and get back to its original position - opengles glkit

I need to rotate an image in opengles GLkit and get it back to its original position in GLkit. rotation += 5; _modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, ...
4
votes
2answers
634 views

Do opengl games tend to use multiple shaders? [duplicate]

For any given object that you want to render, there may be a whole bunch of things that need to be considered for rendering (Material, Texture, Lighting, Blending etc). But, you may also have some ...
3
votes
1answer
181 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 ...
3
votes
1answer
353 views

Should I learn OpenGL 1.5? [closed]

I want to start learning OpenGL with a book I have since a long time ago (Beginning openGL Game Programming) and it uses OpenGL 1.5 so my question is, should I learn OpenGL using this book and then ...
0
votes
2answers
171 views

lemniscate of Bernoulli [closed]

I am trying to learn and teach myself openGL and I wanted to draw a figure 8 in a 3D setting but I'm having a problem. Please forgive me, I am very new at this but I'll attempt to explain what I have ...
0
votes
0answers
941 views

How to do collision detection in 3D using bounding boxes?

I am using c++ in visual studio 2010 with opengl. I am trying to make a programme that has 2 boxes that are able to be stacked on top of each other but I am having some trouble with the collision ...
1
vote
1answer
2k views

Setting Up GLEW with VS2012 [closed]

I'm trying to set up GLEW with Visual Studio 2012 and I'm having some trouble with it. I downloaded the GLEW binary from http://glew.sourceforge.net/ and moved the contents from it's lib folder to ...
1
vote
1answer
400 views

OpenGL ES screen to world coordinate

I am currently attempting to convert my screen coordinates to world coordinates, to be able to interact with objects. I am using glm and unProject to try and achieve this, so far this is my code: ...