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
21 views

Display black on loading texture

While developing a game with LWJGL I hit a sudden stop with the following issue: Anytime I load a texture using Slick Util, the display stays black until i restart the application. Even when i load ...
-5
votes
0answers
46 views

What is it Game Engine of Game like Simpsons Tapped out,Family Guy: The Quest for Stuff,…? [on hold]

i have a question what is it Simpsons Tapped out , Family Guy: The Quest for Stuff , SpongeBob Moves In , Clash of Clans , Boom beach , ... game engine? i believe someone say they have own engine but ...
1
vote
1answer
59 views

How to Load Raw Bayer Images using OpenGL?

I know how to load a Raw RGB888 Buffer as a Texture using opengl. But i want to Load a Raw Bayer (Lets say BG) format Image & Interpolate it to RGB using openGL! . So far i have played around with ...
0
votes
0answers
40 views

Fragment Shader output type error

StackExchange! I've been working with opengl for a bit and I'm trying to finally load the shaders instead of having them inline. I'm having a ton of issues, though. As soon as I solve one, another ...
0
votes
1answer
28 views

invoking callback events only in the main loop

The problem is that the mouse and keyboard events can be triggered before the main loop(in which the program starts to render and update content) takes place. In the program if the moues button is ...
0
votes
0answers
26 views

Is there some general tips on optimizing openGL applications? [on hold]

I'm working on my very first OpenGL game, and since it's mostly ment as an educational exercise for myself I have until now not spent much time worrying abouyt performance. However, I've reached a ...
1
vote
1answer
81 views

It possible to render a true quad (without triangles) using OpenGL?

Is it possible to render a "true" quad in OpenGL? By that I mean a square which is not made out of two triangles.
-1
votes
1answer
42 views

How would I go about merging two models together in-game to create a new model? [on hold]

Let's say I have two models: model 1 is hilt and model 2 is blade. How would I merge these to models together to create a sword?
0
votes
2answers
50 views

How to draw a textured 2D square using OpenGL

I am attempting to get started using OpenGL, and have learned how to open a window and draw basic shapes. However, I do not know how to texture them and have been unable to find any tutorials on how ...
2
votes
0answers
51 views

OpenGL light appears to move with camera and changes with object rotation

I have a working open gl es 2.0 3d engine (my own) that I've used in several iOS apps. I recently noticed that on a mutli-symmetrical object the lighting didn't look the same at each rotation. For ...
1
vote
1answer
46 views

model view projection multiplication order

I'm debugging a lighting problem where the camera position is effecting the diffused lighting component on my 3d model. In researching my problem I went back and am reading over all the how to ...
0
votes
0answers
26 views

Any OpenGL tutorials? [closed]

I am pretty interested in coding (I am still a beginner) and I was wondering if any of you guys know a website where I can learn OpenGL? I would prefer websites that are kind of like CodeCademy where ...
4
votes
2answers
354 views

Is there an alternative to VBOs or deprecated functions to draw many small quads?

I was thinking about how to program a user interface in a 3D game. The problem is, immediate mode (glBegin and glEnd) is deprecated for a long time but I don't think vertex buffer objects (or arrays) ...
1
vote
1answer
68 views

Why would OpenGL ignore GL_DEPTH_TEST setting?

I cannot figure out why some of my objects are being rendered on top of each other. I have Depth testing on. glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); Do I need to draw by order of what is ...
0
votes
1answer
54 views

can I project a ray in world space?

It's not clear what the question is so I rewrote the question. sorry. My question is how to construct a ray from the camera position to where it looks at in world space. My previous method is draw a ...
-1
votes
0answers
34 views

A program in OpenGl [closed]

I wrote a program in C++ OpenGl which to insert a special character to the display window display for entering characters ... for example by enter 'A' character the open windows shows A . but i don't ...
0
votes
0answers
14 views

Disappearing model - vertices not rendered [closed]

I have a quad that has been drawn with OpenGL 3.2+ (using VAO's etc) but when I applied the matrices in the shader it only becomes visible between some Z values (between -0.8 and -1.25). The fact that ...
3
votes
2answers
62 views

How can I draw curves above a mesh surface?

I am making an animation of a deformed sphere that represents some aspects of the wave function in a hydrogen atom. I am starting with an octahedron that i push through a tessellation shader. The ...
0
votes
1answer
57 views

Rotate OpenGL quad around its center

Sorry, I searched it but couldn't figure how to apply it to my code reading the other answers to similar questions. I what to rotate a quad, my code is the following: glEnable(GL_TEXTURE_2D); ...
0
votes
1answer
71 views

Transformations and basis vectors

I've been reading this very nice tutorial on OpenGL, and I encountered a statement which I can't wrap my head around. In Chapter 6, it states: Transformation from one space to another ultimately ...
2
votes
1answer
33 views

Failing to move exponential depth term to depth shader in exponential shadow mapping

I'm playing around in my little toy project to see if I can understand how exponential shadow mapping works. To begin, I have the following two fragment shaders: Light depth texture shader ...
2
votes
2answers
95 views

Render-to-texture doesn't work on nvidia cards. OpenGL 3.3

I've implemented some postprocessing effects (DOF, HDR, Bloom) into my engine. I've tested it on AMD card which supports OpenGL 4.2. Yesterday I've made a test on NVidia card which supports only ...
1
vote
1answer
62 views

Setting up OpenGL on Mac OS 10.10 while keeping it cross-platform

I have experience with game programming mainly in allegro or drawing everything on native windows (No graphic libraries). Now I am interested in learning OpenGL for game development. I have found ...
0
votes
0answers
39 views

Program not proprerly switching shaders [on hold]

currently I'm experiencing a strange problem. I'm not really experienced with opengl, but I will walk through my program and what I want to do with it. The idea is to draw a height map with a 3D ...
4
votes
1answer
59 views

How to compute point in view space from depth?

I am trying to implement do some screen space rendering but after looking over the web I still don't find answers to some doubts. First, I need to compute the point in view space from a value in the ...
1
vote
1answer
47 views

Do I have to use vertexArray in opengl

GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); As you can see from the above code, some tutorials use this before using opengl. But a tutorial that ...
4
votes
1answer
257 views

C++ OpenGL ShadowMap Issue/Artifacts

I am currently implementing basic shadow mapping in my C++ Custom Engine using GLSL 4.10. It is currently working with basic PCF anti-aliasing and very minimal reduction for unwanted artifacts. Here ...
0
votes
1answer
32 views

Is this equivalent to D3DXVec3TransformNormal?

I was porting some code from DirectX to OpenGL. I have the following code: glm::mat4 rotation(1.0f); rotation = glm::rotate(rotation, degrees, m_up); m_look *= rotation; where rotation is a mat4 ...
2
votes
0answers
43 views

Tangents face the same direction on opposite sides of mesh

I have noticed that the tangent vectors that I am calculating are not always facing the correct direction. The tangents on the left and right of the mesh both face the same direction. Here is a ...
4
votes
1answer
88 views

OpenGL: Volume Heat Distortion

I'm working on adding volume effects to an existent, open-source game engine. At the moment, the engine only supports two dimensional "thruster" bitmaps with a planar heat distortion drawn over the ...
0
votes
0answers
19 views

I just can't get glg2D to work, what is wrong?

I would like to use the glg2d library for my project (I'm using eclipse) but I always get an error. First I included jogl and gluegen, and gave it the native folder, and it seemed fine, no errors. I ...
4
votes
2answers
263 views

How does a general Renderer::drawRect(0, 0, 100, 100) handle VBO's?

Lots of game engines and GUI systems have a general Renderer class with functions like: renderer.drawRect(0, 0, 100, 100); renderer.drawText(204, 452, "Hello, world!"); I understand how this could ...
0
votes
0answers
41 views

OpenGL Occlusion Culling - flickering problems

I have implemented occlusion culling in my app and I think why the problem is happening but I am not sure how to solve it. My scene is divided in different chunks (voxels) and I am rendering each ...
0
votes
1answer
60 views

Reconstruct shader vertices in OpenGL

I'm not sure if 'reconstruct' is the correct term for this but essentially what I am trying to do is calculate vertex positions (that are already calculated via shader) on the CPU for the purpose of ...
0
votes
1answer
59 views

Calculate polygon points from image

I'm new to OpenGL, so please excuse my brevity and/or lack of technical knowledge of the subject. I need some help with rendering a polygon on an OpenGL canvas (using C# w/ Tao). I understand that I ...
0
votes
0answers
19 views

LWJGL 3 crashing on nglDrawArrays

I have 2 classes I'm trying to use to render a triangle, and it's crashing on nglDrawArrays, the error is in the native code, and the only information I'm getting from the JVM is a native error ...
9
votes
1answer
606 views

Why is it Important to have render targets with the same bit size?

I am currently thinking of what type of GBuffer I'll need for deferred shading, hence I tried also to document myself online about the most common ones and their format. Most of the GBuffer that ...
0
votes
0answers
111 views

Slick2D shader crashes, but only after a while

I'm using Slick2D's ShaderProgram for shader-based drawing in my game. Some players report that after 3-10 minutes, the game inevitably crashes hard during what appears to be a setUniform4f operation ...
0
votes
1answer
55 views

How to compute matrix transform local/world on OpenGL

I'm developing an OpenGL program where each object / entity contains m_WorldPosition, m_WorldOrientation, m_WorldScale and m_WorldTransform (Vector3, Quaternion, Vector3 and Matrix4f). The problem is ...
1
vote
1answer
107 views

2D graphic over 3D perspective projection

To draw a 2D HUD (just a simple trianlge, for now) over 3D graphics in OpenGL I : draw all 3D objects, then call glDisable(GL_DEPTH_TEST) before drawing 2D HUD draw 2D triangle call ...
0
votes
1answer
36 views

Directional lights (not) rotating with camera (opposite problem)

I am trying to implement a shader for directional lights correctly, but I am bit confused as to why it works when it shouldn't and vice versa. People usually encounter problem with lights changing ...
1
vote
0answers
28 views

Smooth seams and banding of overlapping lights in deferred rendering

I have finally managed to get on screen multiple lights with a deferred renderer, but the result is somehow disappointing. In particular I have severe banding problem Other than having clear ...
1
vote
0answers
55 views

Why is my diffuse lighting changing with camera position?

I am trying to do lighting in view space, but I am afraid I have an issue. I calculate the normals as: N = norm_mat * vec4(vert_norm,0.0) where norm_mat is the transpose(inverse(model_view_mat)). ...
0
votes
1answer
67 views

Problem setting up OpenGL dev environment in Ubuntu 14.04

Currently I'm using this tutorial to get started with opengl.So when I try to compile the example program : #include <GLFW/glfw3.h> #include <thread> int main() { glfwInit(); ...
1
vote
0answers
52 views

How do I fill a shape with a texture in Libgdx?

I am making a 2D racing game. I want to fill the area of the ground object with a texture. I have the shapes of the ground (a Box2D shape). If I make images of the ground with textures, it uses a lot ...
5
votes
1answer
162 views

physically based shading, how to combine specular & diffuse parts?

After writing 'standard' phong & blinn shaders for a while, I recently started to dabble in physically based shading. A resource that helped me a lot are these course notes, especially this paper ...
-1
votes
0answers
74 views

How can I generate passive 3D using a consumer level graphics card?

I would like to how to generate packed frames and sent them by HDMI to a 3DTV for passive stereo visualization, using any consumer-grade graphics card. I am working on Linux, and programming in C++. ...
0
votes
0answers
35 views

LibGdx Exception

Here is the exception: Exception in thread "LWJGL Application" java.lang.NullPointerException at com.mygdx.test.excav.game.WorldRender.renderTest(WorldRender.java:34) at ...
-1
votes
2answers
63 views

OpenGL Depth Test Errors [closed]

I've been working on this problem for a while now. My problem is that the sphere in the top image, is under-lapping the plane which should have a lower Z value. Although, when depth testing is ...
0
votes
1answer
49 views

Can diffuse and specular component of Phong model shine thru object?

I have been implementing simple 3D engine in OpenGL, mostly based on tutorials by Tom Dalling. I have implemented the Phong lightening model as described in his tutorial, but I see light artifacts on ...