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 ...
0
votes
2answers
89 views
+50
Screen or World Coordinates to tile Coordinates
I have Plane made of tiles in opengl. I start drawing them at (0, 0, -20) after that i do my translations so that the view is rotated somewhat similar to an isometric (kind of) perspective.
I'd now ...
0
votes
1answer
29 views
Drawing the same scene with perspective then orthographic projections
I have a scene that I'm rendering first with a perspective matrix. I then want to rerender it in a different viewport using an orthographic matrix for a top-down 2D view of the scene. I think I may be ...
3
votes
2answers
65 views
Extract smaller frustum from camera frustum?
Background:
I was thinking of implementing multiselection by performing a frustum culling on a sub-part of the screen.
Problem:
Given total screensize, a rectangle on the screen (pos, size), and ...
1
vote
0answers
83 views
Reconstructing Position from Linear Depth
In gBuffer (RGBA32F) I store a linear depth (camera space z position). Next I draw a full screen quad (two triangles) and I want
to reconstruct the position.
Vertex shader:
#version 420
...
1
vote
1answer
60 views
OpenGL / Assimp oddity or error?
A friend and I are working on developing a game engine in C++. He doesn't live anywhere near me, so we use Dropbox to sync our files. I opened his project to test his code, and I kept getting errors ...
3
votes
2answers
121 views
Using a programmable pipeline in a game engine
As a learning experience, I'm developing my own 3D game engine using OpenGL. I'm a little confused as to how to implement my rendering engine such that it uses a programmable pipeline while still ...
-3
votes
0answers
44 views
How to multiply mouse coordinates by view matrix?
I'm working on mouse coordinates to convert them from window to openGL. I'm multiplying the mouse vector with x,y coordinates by the glm::lookAt matrix to rotate mouse vector. I start with 90deg. and ...
1
vote
1answer
176 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 ...
1
vote
1answer
44 views
Get the address of a matrix in GLM library
Is there a way to get the address of a matrix from a GLM matrix?
I'm using opengl 4 and glm library though I can't seem to find anything, which might help.
2
votes
1answer
153 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 ...
1
vote
1answer
83 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 ...
2
votes
1answer
61 views
smooth shading vs flat shading, what's the difference in the models?
I'm loading the exact same model with Assimp, except one is exported from Blender, shaded smoothly, and the other was exported from Blender, shaded flatly. Here is my results from loading both into my ...
2
votes
1answer
49 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 - ...
-1
votes
2answers
34 views
Need help drawing obj file!
I'm using GLFW and I want to draw a obj file. How are they drawn? I know how to draw 3D in OpenGL but when I open the obj file I see "v"s, "vn"s, "f"s, "vt"s, what are these? I don't know how to read ...
0
votes
0answers
43 views
Default material properties and assimp
I am using assimp to import 3d models and I have a question on the default properties on materials, more specifically on the diffuse, ambient and specular material colors.
In assimp, if the model ...
0
votes
2answers
2k views
Visual Studio 2010 C++ & OpenGL project cannot detect .lib files
So I'm trying to start a C++, OpenGL project on Visual Studio 2010, and I have put glut.h and glut32.dll in the project directory, along with the glut.dll and glut32.lib files in a folder named "glut" ...
-2
votes
1answer
128 views
SDL_BlitSurface does not works
I have an issue with the SDL_BlitSurface...
When I blit (SDL_BlitSurface) in a transparent (background) surface, it does not blits, actually I tried all the existants functions ...
7
votes
0answers
104 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 ...
2
votes
1answer
128 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 ...
3
votes
2answers
244 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 ...
1
vote
0answers
37 views
Separating rendering and logic thread in GLFW? [closed]
I want to separate my rendering thread (the main thread) and my logic thread in my GLFW game. I'm new to the concept of threading inside games. How would this be done? GLFW isn't thread safe so it ...
0
votes
1answer
121 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 ...
0
votes
1answer
18 views
pygame pyopengl resizing problem (under linux) [closed]
In test setup, i use no matrix transformations (screen coord space, -1.0 to 1.0)
The shader is simply gl_Position = position.
After resize i get correctly scaled render, but viewport is cropped into ...
0
votes
0answers
44 views
Correct way to calculate Perspective Matrix
I have seen at least 3 different ways to calculate the perspective matrix and I'm confused as to which one I should be using and what the differences are?
OpenGL says to do it this way:
f = ...
4
votes
1answer
701 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 ...
3
votes
2answers
172 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 ...
-5
votes
0answers
109 views
Best game engine design? [closed]
So I'm creating a 3D game. It is a simulation style game similar to Roller Coaster Tycoon 3....you create your own theme park and manage it. Therefore I'm going to need things like AI, animation, ...
0
votes
2answers
174 views
OpenGL: Transformations
I'm not sure if I correctly understand 3D transformations in OpenGL. Let's assume I'm using the typical matrix stack.
It seems like you move the world X units over, drop in a bag of verts (a mesh) ...
-4
votes
0answers
67 views
OpenGL parsing normals from obj gets shading wrong [closed]
I have written a simple OBJ file parser for my game engine and it renders everything correctly, but, when I try and use the normals to do lighting it gets shaded all wrong!
I draw using an index ...
1
vote
1answer
41 views
Can't get Depth testing to work (cube faces shine through)
I'm making my first steps with OpenGL with LWJGL. I am currenlty constructing a... wait for it... CUBE. Quite creative...
Up to now i made it to three of its faces and thats where the Problems began. ...
0
votes
0answers
80 views
How can I fix dark banding artifacts when I turn on SSAO? [closed]
When enabling SSAO on my object ( in grey on the picture, background in green), sometimes, claimed in position of the camera, dark bands appear on my object (see picture).
The shader is written in ...
4
votes
1answer
66 views
How to skip the sky in lighting shaders?
I recently implemented a sky in my deferred rendered game. It is a procedurally calculated sphere with a texture applied to it. Unfortunately all lighting shaders (light sources, ambient occlusion) ...
5
votes
1answer
96 views
Slow glReadPixels
I have implemented a lense flare for my game, and it looks great.
The first draft used individual sprites each with its own draw call. This was very slow, so I reengineered it to use a single draw ...
4
votes
5answers
5k views
OpenGL vs OGRE : Which is the best for beginner? [closed]
I am interested in getting into game development and posses good C/C++ programming skills. I have tried OGRE before, and I am curious whether I should learn either OGRE or OpenGL as a starting point.
...
35
votes
6answers
5k views
Good resources for learning modern OpenGL (3.0 or later)?
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 ...
-1
votes
1answer
90 views
How do I animate images with OpenGL? [closed]
I've been thinking about using set of PNG images (representing frames) and continuously change between them to look like an animation.
Is there a simpler/better way? (maybe using GIF?)
0
votes
1answer
54 views
Direction from the camera to the light source
I'm currently writing a game using OpenGL and GLSL. For the shader I need the direction from the current camera to the light source. The lightsource is given by lightSource.position as a uniform as ...
0
votes
1answer
63 views
Framebuffer formats with enhanced Alpha precision
I render some lines with alpha values into an FBO. Because I play a lot with alpha, I need the alpha channel to have more detail than RGBA8. For example, RGBA32F works like a charm.
As I have only a ...
3
votes
1answer
277 views
OpenGL FBO to OpenCV image
I am trying to figure out the best way to share an image between OpenGL and OpenCV libraries. I perform a render to texture on OpenGL, so I have and FBO/texture that then I want to pass it OpenCV, ...
0
votes
0answers
26 views
Specular Light not working Phong shading
I want to implement Phong-Shading using GLSL. I also want to calulate all values using uniforms in the shaders.
Nearly everything works fine, but there is an error with the specular term of the ...
-2
votes
2answers
64 views
Using Win32 and OpenGL in game loop? [closed]
I'm making a Java game library (too many problems with the existing ones) and I'm building the win64 native right now. In the native I need to handle the window, OpenGL contexts, and advanced ...
0
votes
0answers
49 views
NVIDIA FX Composer 2.5 not updating time in preview
I started testing shaders today and got a problem with
FX Composer.
When I download Shaders from the Shader Library it compiles them fine and
I get a preview which applies the material to the object, ...
-1
votes
0answers
135 views
Loading .obj file with my own parser; textures aren't mapped correctly
I have written a simple .obj parser for my OpenGL game engine that reads vertices, uv's and normals; but when I get to drawing the model in the texture isn't mapped correctly.
I have tried uv.y = ...
0
votes
1answer
353 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 ...
-1
votes
1answer
110 views
OpenGL noob: Using VBO to draw a colored triangle [closed]
I tried using straight vertex arrays to draw a triangle with different colors for each vertex and it works fine, but when I use VBO it won't work, so I'm doing something wrong.
// point 1
...
1
vote
1answer
93 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 ...
1
vote
0answers
75 views
How to implement a multi-platform Java 2D game engine's graphics?
I'm not sure whether this question should be posted here. I'm trying to make a basic generic game engine in Java. Here's what I have so far.
public abstract class Device {
public abstract void ...
3
votes
0answers
80 views
OpenGL: Filtering/antialising textures in a 2D game
I'm working on a 2D game using OpenGL 1.5 that uses rather large textures. I'm seeing aliasing effects and am wondering how to tackle those.
I'm finding lots of material about antialiasing in 3D ...
3
votes
1answer
845 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
votes
1answer
43 views
Trouble using position and colour vertex data in single Array Buffer [closed]
Answer: a simple typo. Of course. Can't close until tomorrow due to reputation.
I'm currently learning OpenGL from the new 4.3 guide, and I'm having trouble using position and colour data stored in a ...

