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 ...
1
vote
1answer
25 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
22 views
What is the alternative to glGetDoublev in openGL 4?
Is there a way to output matrix to a float (or double) array just like glGetDoublev used to do?
I'm using opengl 4 and glm library though I can't seem to find anything, which might help.
-1
votes
2answers
29 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
14 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
38 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 - ...
6
votes
0answers
62 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
34 views
Separating rendering and logic thread in GLFW?
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
102 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
39 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
62 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
61 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
92 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
83 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
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 ...
-2
votes
2answers
61 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
106 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
67 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
73 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
131 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
41 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
61 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
109 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
61 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
92 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
87 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
289 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
39 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
260 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
90 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
59 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
169 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
218 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
46 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
113 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
88 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
223 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
85 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
21 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
82 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
91 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
51 views
Setting up Assimp Library for C++/OpenGl [closed]
I am trying to load 3d objects in C++/OpenGl using ASSIMP library. I am trying to figure out how to install ASSIMP. I tried to follow the instructions on ...
1
vote
0answers
65 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
votes
0answers
43 views
Texture / shader template program [closed]
I would like to use OpenGL to downsize images, using shaders. I would be very grateful, if somebody can give me a sample program in C++, which loads bitmap texture, draws it to the entire screen and ...
