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

Ray casting: need to find start and end vectors

So I have a 3D object and I'm trying to implement Maximum Intensity Projection on it. I already started of using a default vector to show per pixel, namely: pixelCoord[0] = uVec[0] * (i - ...
0
votes
0answers
11 views

Is it possible to store diffuse and normal maps in the same texture area and preserve SRGB/linear space?

Usually, one would want to upload texture data to OpenGL with GL_SRGB* for the internalformat of a texture, and GL_RGB* (or some other linear format) for normal data or specular highlight maps. We can ...
0
votes
0answers
15 views

Deforming meshes in OpenGL

I'm learning about OpenGL, specifically OpenGL-ES 2.0 on Android. The question I've posed to myself this evening is: how can I deform a mesh? I think I have some answers. So my questions for SE ...
1
vote
1answer
37 views

render with const depth value

This is a question that may have an answer that differs for vanilla desktop GL and GL ES 2.0 (and wishful thinking is that ES 3.0 would have the same answer as vanilla GL). What I'm doing is ...
0
votes
0answers
21 views

Trying to implement Camera

what am trying to do is implementing Camera calss so I can walk and look on the world as follow: #ifndef _CAMERA_H_ #define _CAMERA_H_ #include <glm\glm.hpp> class Camera { public: ...
0
votes
0answers
21 views

Drawing particle groups in box2d (java)

Does anyone have any sample Java code for drawing ParticleGroups using JBox2d? I've managed to define a particle group area, but I'm unsure how to draw the individual particles using OpenGL .. ...
0
votes
0answers
41 views

Why Reducing fragments by increasing geometry vertices turn out to be slow?

I am developing a ray-casting program by OpenGL. At first I made a large bounding box including the whole volume and render this box, which triggers the ray-casting. I'm trying to optimize this ...
0
votes
0answers
35 views

OpenGL geodesic hemisphere [closed]

Good afternoon, I draw a geodesic hemisphere using opengl for Delphi released this code const X = 0.525731112119133606; Z = 0.850650808352039932; vdata : array [0..11] of array [0..2] of ...
8
votes
1answer
222 views

Creating a glitch effect similar to Watch Dogs

I'm currently working on a LibGDX game. When a user does something wrong, I would like all the graphics on the screen to jitter very similar to the glitch/distort effect seen in the game Watch Dogs ...
-1
votes
0answers
23 views

SOIL integration - ntdll.dll [closed]

I'm sorry, but this problem is driving me nuts. I can't find a solution ANYWHERE. I loaded up SOIL using #pragma comment(lib, "SOIL/SOIL.lib") #include "SOIL\SOIL.h" I built this version of the ...
0
votes
0answers
37 views

Stuck with which approach to take (architecture) [closed]

I am currently in the process of building a 3d game engine in c++ however I have kind of slowed down development because I am unsure of the architecture that I want to use, more specifically the ...
0
votes
0answers
16 views

NullPointer calling scrollpane draw from a libgdx application [closed]

Solved: Using Stage to display rather than calling the ScrollPane draw method. I get this error when opening the GameScreen and calling the render method. Exception in thread "LWJGL Application" ...
-2
votes
1answer
77 views

Flat Terrain Generation OpenGL (so close) [closed]

I am very close to rendering a flat terrain using LWJGL/OpenGL and filling up vertex/index buffers. The only issue I am having seems to be from the very first square rendered. I tried hard coding a ...
0
votes
0answers
15 views

How to draw image with other small icon on it using opengl? [closed]

I'm new here ... and also new on the opengl world. I don't find any example of drawing image ( bitmap / jpg ) on the screen. What i need is to draw simple image and on this image draw some icon on ...
5
votes
2answers
457 views

2D games and modern OpenGL

Preconcepts Ok, so what I've gathered so far is this: don't use fixed pipeline (deprecated or going to be deprecated) vbos store "object models" (n vertex data, mostly) vaos describe how data is ...
0
votes
0answers
23 views

Display black on loading texture [closed]

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 ...
1
vote
1answer
90 views

How can I load raw Bayer images using OpenGL?

I want to load a raw Bayer format image and convert it to RGB using OpenGL. So far I have played around with glTexImage2D() and loaded a Bayer image as a monochrome texture. My question is: how can I ...
0
votes
1answer
75 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 ...
1
vote
1answer
89 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
43 views

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

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
52 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
1answer
107 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
47 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 ...
4
votes
2answers
362 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
72 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
68 views

How can I draw a ray from the camera in world space?

How can I construct a ray from the camera position to where it looks at, in world space. My previous method is draw a line by using two points. The first point is the camera position, and the other is ...
3
votes
2answers
64 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
99 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
68 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 ...
4
votes
1answer
72 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
49 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
262 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
35 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
90 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
20 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
265 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
45 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
64 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
63 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
24 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
608 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
112 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
57 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
114 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
38 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
29 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 ...