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

5
votes
0answers
122 views

How to pass depth buffer from OGRE to CUDA?

I am using OGRE for rendering some objects. At every frame, I would like to pass the resulting depth buffer to CUDA for running some kernels on it and computing a result. How can I achieve this? How ...
4
votes
0answers
110 views

How can I implement real-time mutual object reflection?

So, given a scene like this (cubemap skybox with "real" spheres) Everything looks great, except for the fact that the spheres don't reflect each other. What's a good way to go about this? The ...
3
votes
0answers
85 views

OpenGL Shadow Mapping from directional light

I have read this tutorial: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/ I wonder, is this the current best technique for generating shadows in an arbitrary 3D ...
3
votes
0answers
73 views

Pyglet: text.Label().draw to FBO?

I just started OpenGL (PyopenGl) & Pyglet 3 weeks ago, and decided to read the Red Book. So sorry if my question shows my lack of comprehension... My question is: Is it possible to display/write ...
3
votes
0answers
294 views

deferred rendering and gaussian blur - artifacts

I compute Gaussian blur in two passes (horizontally and vertically). Shaders look like this: Horizontal blur - fragment shader: #version 420 layout (location = 0) out vec4 outColor; in vec2 ...
3
votes
0answers
601 views

exporting bind and keyframe bone poses from blender to use in OpenGL

EDIT: I decided to reformulate the question in much simpler terms to see if someone can give me a hand with this. Basically, I'm exporting meshes, skeletons and actions from blender into an engine ...
2
votes
0answers
128 views

Blank texture in Frame Buffer Object in Deferred Rendering

I'm running the tutorial 35 from olgdev.atspace.co.uk, and it's so strange that the result is a blank screen. This tutorial is performing the first step of Deferred Shading, which means decoupling of ...
2
votes
0answers
419 views

Arcball 3D camera

I have checked multiple threads before posting, but i havent been able to figure this one out. Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
2
votes
0answers
77 views

How do I calculate the points of a brush from a Source engine VMF?

I'm trying to render the brushes from a Source engine .vmf file in C++, using OpenGL. The .vmf stores solid brushes as a series of planes which I would like to use to calculate the points for each ...
2
votes
0answers
64 views

uniform z slices in clip-space

1) Context I'm using a regular OpenGL perspective projection matrix created with GLM (glm::perspective) and taking the inverse (glm::inverse) to transform clip-space back into view space (and world ...
2
votes
0answers
220 views

glFramebufferTexture2D gives corruption with cube map textures

I am using glFramebufferTexture2D with cube map textures but it gives corruption in texture. draw_cube() function works perfectly when i draw that on default framebuffer. GLenum ...
2
votes
0answers
372 views

AlphaToCoverage + Alpha Blending = Artifacts

I'm experiencing a strange problem using OpenGL SampleAlphaToCoverage mode. There are rendering artifacts when using alpha-blending on pixels that have been rendered using alpha-to-coverage - and I ...
1
vote
0answers
45 views

Alternative to z-fail

This question is less technical but maybe someone had similar thoughts. I am wondering if the following algorithm still harms the stencil shadow patent? It is concerned with the invention of a "new ...
1
vote
0answers
271 views

Cascaded shadowmapping problem with split distances

I'm doing cascaded shadow mapping and I have problem. From the cameras position, the splits are [camPos, 6], [camPos+6, 12], [camPos+12, 18] and [camPos+18, 100]. The "mSplitDistance" variable is the ...
1
vote
0answers
56 views

3D Camera Y-Axis wrong angle

I am trying to build a camera class, though I am running into a problem. When I move the camera above/below, and try to move towards the ground, I am moved off in what seems to be about 45 degrees in ...
1
vote
0answers
112 views

opengl volumetric billboard implementation: general idea + geometry shader

A while ago I decided to implement the volumetric billboards technique in my university project (C++ & OpenGL 4.3). I passed the subject but failed to implement the mentioned technique. I'd like ...
1
vote
0answers
63 views

Normal mapping does not work correctly using GLSL and OpenGL

Hello I wrote a simple OpenGl program using GLSL to render a simple uv mapped plane using the normal mapping technics. Here's the display with a simple phong shading (without normal mapping) : Now ...
1
vote
0answers
103 views

Shadow maps, reducing “shimmering”

I'm doing shadow maps, and my shadows move around, "shimmer", when I move around the camera. It is difficult to spot on still images but very much noticable in motion. I read an MSDN article ...
1
vote
0answers
94 views

Shadow mapping implementation not working?

I am trying to implement Shadow Mapping in my program using Java/LWJGL/OpenGL/GLSL, but I cannot get it to work properly. Let's start off with a screenshot first, then the relevant code and lastly ...
1
vote
0answers
56 views

FreeGLUT keyboard IO timing and synchronization

Using FreeGLut's keyboard callbacks, glutKeyboardFunc(); glutKeyboardUpFunc(); glutSpecialFunc(); glutSpecialUpFunc(); When in the glutMainLoop pipeline do these functions get called? In other ...
1
vote
0answers
36 views

Sampler object not changing texture filter

I am currently binding a sampler object to a texture (GL_TEXTURE12 to be specific) with glBindSampler(12, sampler); and the initial settings are very visible compared to the textures own settings. ...
1
vote
0answers
73 views

Texture not visible on particles

This is the first time I am working with particles (GL_POINTS) I am using kinematic equations and controlling their movement in vertex shader. I am following an example given in OpenGL 4.0 Cookbook ...
1
vote
0answers
37 views

after calculating normals texture is full of black triangles

After I added normal calculation to my project - the surface of landscape became full of black triangles and even have a deformity on one side. Here I calculate normals int x, y; int Index = 0; ...
1
vote
0answers
118 views

GLSL, Internal error: assembly compile error for fragment shader at offset 513

My vertex and fragment shaders link correctly. When I try and link my shader program I get the error: "Internal error: assembly compile error for fragment shader at offset 513". Pastebin of fragment ...
1
vote
0answers
153 views

Unity Pro - Shadow rendering issue

I am using Unity Pro 4.2.1f4 and I always have this sort of glitch. This is due to the shadows and the bias. Even with a low bias this is happening. I've found a thread that talks about that ...
1
vote
0answers
204 views

c++ opengl unproject not working

first of all, sorry for the bad english. I need to convert my mouse coordinates to world coordinates, I'm trying to use the glm unproject method. 1280x720 is the size of the window, It's hard coded ...
1
vote
0answers
241 views

Geometry shader and triangle adjacency

I'm currently trying to change my project to use GL_TRIANGLE_ADJACENCY instead of GL_TRIANGLES. Following this question, I have managed to construct my index buffer fine, but when it comes to the ...
1
vote
0answers
58 views

Slick2d font rendering makes all other drawings vanish

I'm converting a java game to lwjgl and slick-utils. I've followed the slick2d examples for font loading/rendering but I found that the font shows as a solid box of color unless I add the following ...
1
vote
0answers
143 views

Rotate a point in 3D space with sine and cosine

I got my camera controlled by the mouse. Now I want a sphere to be always in the center of my view(just for testing). I tried that by assigning the sine of the Y rotation of the camera times 10 as the ...
1
vote
0answers
278 views

Creating a new GLFW window and re-using the old context causes crash

I am using GLFW 3.0.2 and when I want to switch the application to fullscreen, I create a new window and intend to use the OpenGL context of the old window so I don't have to reload all the meshes, ...
1
vote
0answers
146 views

GLX/X11 Changing the rendering resolution

I have made a simple application that creates a window with an OpenGL 4.2 context and takes user input. I have implemented making the window go fullscreen with XRandR and can change the display ...
1
vote
0answers
110 views

Matrix array doesn't seem to get populated

I'm trying to stream an array of matrices to a vertex shader, but it seems that only the first matrix works. What could be the problem? I suspect that I upload the matrices in a wrong way. C# ...
1
vote
0answers
74 views

Rotate view matrix based on touch coordinates

I'm working on an Android game where I need to rotate the camera around the origin based on the user dragging their finger. My view matrix has initial position of sitting on the negative z and facing ...
1
vote
0answers
221 views

OpenGL: Attempt to allocate a texture too big for the current hardware

I'm getting the following error: java.io.IOException: Attempt to allocate a texture to big for the current hardware at ...
1
vote
0answers
322 views

How to implement OpenGL triple buffering

I'm trying to implement the triple buffering described here ...
1
vote
0answers
106 views

Aiming with a crosshair with a lot of polygons/triangles

I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ...
1
vote
0answers
112 views

Posible to export f-curves in blender?

I work with some friends on a rail shooter game in openGL. For creating our world we are using Blender. Since we want our Tank to follow a path I have started to work with creating bezier curves and ...
1
vote
0answers
86 views

How to put OpenGL in a state for drawing blended, colored, nontextured polys?

Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
1
vote
0answers
305 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
1
vote
0answers
159 views

Sketchy results from ray-plane intersection code

I've set up a demo with simple first-person controls using C++ and OpenGL, and it seems to work reasonably well. My goal is this: when the player looks at a plane and clicks the left mouse button, ...
1
vote
0answers
176 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
1
vote
0answers
155 views

Strange rendering issue with monogame/WinGL with HD7670M

I'm having some strange rendering issues with latest monogame/winGL code as seen below; As you can see the xna and tomspilmans WinDX port seems just okay. I'm having this problem on my laptop ...
1
vote
0answers
120 views

Using GL_INT_2_10_10_10_REV in glVertexAttribPointer()

Can anybody tell me how exactly do we use GL_INT_2_10_10_10_REV as type parameter in glVertexAttribPointer() ? I am trying to pass color values using this type. Also what is the significance of "REV" ...
1
vote
0answers
191 views

How to make an oscillation move on opengl qt

I'm trying to make a character make an oscillation move. That is, the character will start by rotating to a certain angle, say 60 degrees, and then slowly come back to an upright position then rotate ...
1
vote
0answers
111 views

iPhone collada object

Hi I am new to game development. I see many examples and tried myself like displaying triangle, cube etc. Now I am looking to render a Collada object. So I created a Collada object using Google Sketch ...
1
vote
0answers
243 views

Per fragment lighting with OpenGL 4.x tessellated model

I'm experienced with OpenGL 3+. I'm dabbling with tessellation shaders and have now got to a point where I have a nicely tessellated teapot/plane demo (quick look here) As can be seen from the ...
1
vote
0answers
340 views

How to pick a 3D object with known mouse coordinates if the camera is rotated 60 degrees?

I am making a simple game engine for a simple RTS game and would like to be able to pick a cube and move it around with the mouse coordinates. The problem is that my camera is rotated 60 degrees just ...
1
vote
0answers
196 views

How do I convert my matrix from OpenGL to Marmalade?

I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this: We're right handed by default, and we treat y ...
1
vote
0answers
79 views

Rendering text with stb_font results in glitches

I'm trying to render text with OpenGL and an "inline"-font taken from the stb_fonts The relevant code for initializing the font & rendering: LabelFactory::LabelFactory() { static unsigned ...
1
vote
0answers
1k views

ssao implementation

I try to implement a ssao based on this tutorial: link I use a deferred rendering and world coordinates for shading calculations. When saving gbuffer a vertex shader output looks like this: ...