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

0
votes
0answers
24 views

Project camera depth onto a 3D plane

Is it possible to project the camera depth onto a plane ? Let me explain, if I simply transfer the depth buffer on a plane, it will always display the depth from the camera point of view. But how can ...
6
votes
1answer
106 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 ...
1
vote
0answers
65 views

How to implement OpenGL triple buffering

I'm trying to implement the triple buffering described here ...
0
votes
1answer
176 views
+50

Simplest way to render image over top of another with another image used as mask in OpenGL?

The effect I'm looking for is to have a single large background image that is always visible (at full alpha) and then show a second image (what I call a light map or specular map) that is partially ...
1
vote
1answer
188 views

Mesa library vs Hardware accelerated OpenGL for my executable - it's just a linking problem?

Supposing that i have my program that is targeting a specific OpenGL version, let's say the 3.0, now i want to produce an executable that will support the software rendering with Mesa and another ...
2
votes
1answer
181 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 ...
6
votes
2answers
508 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 ...
1
vote
1answer
127 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 ...
0
votes
0answers
23 views

Problem adding texture to VBO with png texmap in OpenGL

I was doing a VBO and able to load all the data of OBJ file but now I have problem adding texture to it. what i did is that I use the slick library to get the texture file and bind it to the VBO ...
2
votes
1answer
69 views

How to rotate camera around some point?

I have screen with dimensions: 800x600. The object that I want to rotate around is located at (400,300, -50) - center of the screen. Orthogonal projection: Near plan - 0.1f, far plane - 1000.0f left - ...
0
votes
2answers
61 views

Is this Rotation Matrix correct?

I'm having heavly troubles with setting up a View Matrix and a Projection Matrix. It simply doesnt work. So I think my problem is related to my rotationMatrix function. I'm using this tutorial to ...
0
votes
0answers
31 views

Using shaders with GLFW3

i've setup the newest version of glfw & glew on mingw (i'm using windows 7). I've previously used freeglut & glew but i switched to glfw because i've heard it was better for games. So my ...
2
votes
0answers
32 views

How to pass depth buffer from OGRE to CUDA?

I am using OGRE for rendering some objects. At every frame, I would like to pass the resulting depth buffer to CUDA for running some kernels on it and computing a result. How can I achieve this? How ...
-1
votes
1answer
66 views

How do I use Opengl 3.2? [closed]

My computer is using OpenGL 3.1 and I want to develop in OpenGL 3.2 but I don't know how. Thanks in advance all help is appreciated.
1
vote
0answers
51 views

Aiming with a crosshair with a lot of polygons/triangles

I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ...
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
vote
1answer
58 views

Workaround for reading and writing same texture?

To apply post effects, it is often needed to read the preliminary image, perform computations on its pixels and store the result in the same texture again. For example, think of a tone mapping or ...
0
votes
1answer
137 views

How do I apply 2 rotations about different points to a single primitive using OpenGL

I'm working on a 2D top-down shooter game that has a rotation feature like Realm Of The Mad God such that if you press e the camera rotates around the character in a clockwise direction and q rotates ...
17
votes
0answers
332 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 ...
2
votes
1answer
60 views

TBN Matrix : Eye vs. World Space Conflict

I am tired of misleading and insufficient articles making me more confused each time I read, I need a clarification that will solve my TBN matrix problem forever. Each article I read informs me ...
4
votes
1answer
713 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 ...
0
votes
1answer
72 views

Fog shader camera problem

I have some difficulties with my vertex-fragment fog shader in Unity. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. ...
0
votes
0answers
16 views

How to find the location of JOGL openGL object , after rotation?

I have a rotating object - a cube , here : @Override public void display(GLAutoDrawable gLDrawable) { moveFirstPerson(); checkCameraCollisionWithObject(); final GL gl = ...
0
votes
0answers
29 views

Any alternatives to libhand? [closed]

LibHand seems to be tightly integrated with OGRE for rendering. And extending any OGRE program beyond the basics is an uphill task. Are there any alternatives to LibHand? I'm hoping to use it with ...
-3
votes
1answer
46 views

Opentk: Move Bones model 3d [closed]

I have a model in 3ds max and have exported to obj file using tutorials and I managed to load my model and apply a texture. My problem is that I have to move a part of this model and to move while ...
3
votes
2answers
141 views

How to ray cast 2D light in a block-based game

I want to use 2D lighting that can be blocked by in-game objects. My game is block-based and has a view from the top of the flat world. Now lets say I have a 10x10 world and I place a light at 1x1 and ...
-1
votes
1answer
49 views

Ray picking gives inversed results

I'm trying to do a simple ray picking implementation to allow a user to select a cell in a grid rendered in 3D. I'm almost there, but I've ran into an issue which I can't seem to solve. Consider the ...
0
votes
0answers
55 views

GLSL gl_ModelViewMatrix breaks my code?

So I have the following shaders which work (to the extent that they are completed anyway). //Vertex Shader uniform float offset; void main() { gl_TexCoord[0].t = gl_MultiTexCoord0.t; ...
9
votes
3answers
10k views

Fastest way to draw quads in OpenGL ES?

I am using OpenGL ES 2.0 I have a bunch a quads to be drawn, would love to be able to have to pass only 4 vertices per quad as if I were using GL_QUADS, but basically I just want to know the best way ...
0
votes
0answers
29 views

OpenGL rotate to face an object [duplicate]

I am attempting to create a small game and in opengl and c++ and I am in need of the ability to rotate an object towards another object in 3d space(horizontal rotation is not needed), I have no idea ...
3
votes
1answer
106 views

small independent game development on a virtual machine

I've been learning about OpenGL and SFML with c++ now for about 6-8 months, and would like to work on a small little personal game to put some of my skills to the test. Now I want to kill two birds ...
-2
votes
2answers
116 views

What are the benefits of using a game engine for a voxel game?

I'm learning and developing a Minecraft like game. I've seen many games being made without a game engine, so I'm worried using a game engine will end up having performance issues. If I was ...
0
votes
1answer
126 views

Shader program compiles fine on Ati, fails on other vendors

Got a real annoying problem here. My shader program compiles fine on my Ati Radeon HD card, but on Nvidia and Intel it failes to compile. Vertex shader: #version 120 attribute vec3 in_position; ...
3
votes
2answers
106 views

How to subdivide a quad?

I'm working with OpenGL and I'm importing from a file coordinates for quads in the following format: 0.0 1.0 0.0 //normal vector 20.0 -5.0 20.0 10.0 10.0 //x y z u v 20.0 -5.0 -20.0 10.0 0.0 ...
1
vote
1answer
52 views

OpenGL light not shining quad

I've constructed a scene using OpenGL/GLUT with a spot light but I'm getting troubles with light shining some of the walls what is going on and how to solve?
0
votes
2answers
82 views

What is the best method to update shader uniforms?

What is the most accepted way for keeping a shader's matrices up to date, and why? For example, at the moment I have a Shader class that stores the handles to the GLSL shader program & uniforms. ...
0
votes
0answers
67 views

Deferred rendering extremely slow [closed]

I'm trying to setup deferred rendering in my Voxel Engine, and so far it works pretty good: The texture, worldpos, normal and uv textures seem to be correct. One problem: With normal rendering ...
0
votes
0answers
39 views

Blur Shader strange behaviour

I tried to implement the blur shader shown here. But instead of having a simple 2D texture I use Unity GrabPass function to capture what's behind the plane to have a transparent effect. Then I apply ...
-1
votes
0answers
41 views

What OpenGL lib should I use for 3D object manipulation? [closed]

I have a 3D .obj model I want to use in my phone game. The target platform for now is Android, but the game is ultimately going to be released for iOS as well. My main goal for now is loading the ...
-2
votes
0answers
68 views

Precompiled Headers? [closed]

In an attempt to narrow down an OpenGL error I've encountered the following error: fatal error: can't create precompiled header triangles.exe: Permission denied My code consists of including two ...
2
votes
1answer
88 views

GLSL Multiple Uniform Structs

I'm developing a lighting system for my voxel game, and I have to send multiple (alot, say up to 200) lights to my shader program. Those lights contain the following data: Position (vec3) Color ...
0
votes
1answer
365 views

rotate opengl mesh relative to camera

I have a cube in opengl. It's position is determined by multiplying it's specific model matrix, the view matrix, and the projection matrix and then passing that to the shader as per this tutorial ...
5
votes
1answer
102 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 ...
5
votes
1answer
164 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 ...
2
votes
1answer
62 views

How to get independent from GLEW dll file

I'm literally an absolute noob in GL. I just wrote my first GLEW piece of code yesterday: #include <stdio.h> #include <stdlib.h> #include <GL/glew.h> #include <GL/glfw.h> int ...
2
votes
1answer
94 views

Simple Optimized Blur Shader

I have a vertex-fragment shader that use the Unity3D GrabPass functionality (it grabs the screen). And I apply my GrabPass to have a transparent effect. GrabPass { "_GrabTex" } sampler2D ...
3
votes
1answer
141 views

Making a game “resize-safe”

It's one thing to get the graphics aligned perfectly, it's another to do this for every single resolution and not take too much time and/or make the code unreadable due to size. Games like Battlefield ...
6
votes
8answers
2k views

Best (Most Popular?) Image Format For Texturing

Okay, so I am using C++ with OpenGL, and I am going to create a loader to load in textures for my 3D game. (But the textures are 2D). I want the option of transparency, even if I decide not to use it. ...
1
vote
1answer
96 views

GLSL Light (Attenuation, Color and intensity) formula

I'm implementing point lights in my Voxel engine, and I'm really struggling to get a good flow of light, from 100% near the light source to 0% at the light radius. I have 5 arguments for the ...
3
votes
1answer
897 views

Opengl-es picking object

I saw a lot of picking code opengl-es, but nothing worked. Can someone give me what am I missing? My code is (from tutorials/forums) Vec3 far = Camera.getPosition(); Vec3 near = ...

1 2 3 4 5 28