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
1answer
23 views

Get world-position in Vertex shader

I'm wondering how I can get the final position of a vertex. I use glTransform in my render code, and I'm not getting the world-coordinates correct. My world is devided in chunks and my position get's ...
0
votes
1answer
42 views

GLSL Shaders-> How to manage?

As your game get's bigger and bigger, you will use more and more different shader effects. Let's take an easy example: I have clouds in my voxel-based world, and I want to give it a blue-ish tint ...
0
votes
0answers
14 views

Opengl 3.2 Flickering after smooth animation?

Okay I am new to OpenGL I am getting an odd issue. I am performing rotation on a bunch of triangles on a scene graph. The rotation starts off really smooth everything is animating then much later you ...
0
votes
1answer
38 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 ...
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
128 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 ...
0
votes
2answers
127 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 ...
3
votes
2answers
66 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 ...
-3
votes
0answers
45 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 ...
2
votes
1answer
63 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 ...
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.
-1
votes
2answers
36 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
47 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 ...
2
votes
1answer
50 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 - ...
7
votes
0answers
120 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 ...
1
vote
0answers
38 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
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 = ...
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 ...
-5
votes
0answers
111 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, ...
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. ...
-4
votes
0answers
68 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 ...
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
67 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 ...
-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
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 ...
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 ...
0
votes
1answer
56 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 ...
-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 ...
-1
votes
1answer
113 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
0answers
76 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
81 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 ...
-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 = ...
-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 ...
0
votes
0answers
16 views

Change TargetGlesGraphics at runtime

anyone know if it possible change TargetGlesGraphics via script? I've seen that it's an Editor class, so im not so sure that is possible, but i'd like to ask anyway. This can be useful if u need to ...
-1
votes
0answers
64 views

OpenGL 2D Screen to 3D World

I'm in the process of making a block voxel game (not minecraft clone) and I now need to be able find which block I am looking at. I've come across two methods: Ray tracing and gluUnProject I found a ...
-1
votes
0answers
117 views

c++ game programming course [closed]

Does some one know some good C++ Game programming course? I've tried lots of tutorial of OpenGL (3.3+). I've done simple games using opengl and glsl... but... game programming is another thing. ...
0
votes
0answers
68 views

Android OpenGL ES 2.0 gameloop problems

I implemented a gameloop found here: http://www.koonsolo.com/news/dewitters-gameloop/ into my OpenGL ES 2.0 Android game. The tutorial was written with the canvas API in mind, not OpenGL so I made a ...
1
vote
2answers
97 views

State propagation in modern OpenGL

When last I dabbled in game development, I managed my geometry in a tree. Every node would call the render method on it's children, prior to resetting it's transformations, thus allowing the ...
3
votes
1answer
88 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?
9
votes
1answer
318 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
46 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
303 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
45 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
94 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
64 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
174 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 ...
10
votes
0answers
223 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 ...
-3
votes
0answers
50 views

How to animate the Tilemap object in Libgdx? [closed]

I am facing problem to animate or move the object(Cell) of Tilemap??? Is there any solution for this???
3
votes
1answer
117 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 ...

1 2 3 4 5 26