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

OpenGL weird pixels

I'm creating a simple OpenGL application. I've created a tilemap where I put tiles to be rendered (just a simple grid). If I only render the walls, it's ok. If I only render the ground it's ok too. ...
1
vote
0answers
33 views

Interpolating Skinning Weights

I am subdividing the triangles of mesh, and as you can guess, I need weight values for these new vertices. Currently I am using linear interpolation (Vnew.weight[i] = (V1.weight[i] + V2.weight[i]) * ...
0
votes
0answers
18 views

OpenGL- Render to texture- a specific area of screen

I implemented FBO on my OpenGL Game. and Im rendering what is rendered to screen to a texture, the problem is that rendering to texture starts from lower left corner. look: what is rendered to ...
0
votes
1answer
34 views

opengl matrix multiplication

Can someone provide some type of example of multiplying a 4x4 matrix without using loops? typedef struct matrix4 { data[16]; } m4; can someone provide a sample of how you you'd multiply two of ...
0
votes
1answer
16 views

glm Z coordinates are flipped

I am trying to render a 3D model using OpenGL. And for the projection and transformation matrices, I am using glm. I've got my model on the screen and it works just like I intended it to; except one ...
1
vote
2answers
49 views

How to find the “up” direction of the view matrix, with GLM

Using OpenGL and the GLM matrix library, I want to translate my camera relative to the world coordinate system. This requires me to compute the necessary view matrix. To initialise the view matrix, I ...
0
votes
0answers
30 views

OpenGL c++ terrain generation [on hold]

Im trying to use a grid of vertices ,a blendMap and a heightMap to generate a terain.And i got an error which i simply dont understand. Model.h struct coordinate{ float x,y,z; }; struct face{ ...
0
votes
1answer
17 views

Rotating the view around the origin of the world coordinate system

In OpenGL (using shaders), I want to implement a system that will take the user's mouse as input, and then rotate the view about the origin of the rendered scene. So, I need to compute the view matrix ...
0
votes
0answers
16 views

Opengl Create FBO- fatal signal 11 error

in my android game, i want to render My scene in the FBO and a texture attached to it, and use that texture later, But When i use glGenFramebuffers i get this error: 07-30 06:17:27.839: A/libc(1338): ...
1
vote
1answer
27 views

What are the units when reading depth using glReadPixels()?

Suppose I use glReadPixels() to read the depth of a pixel from the depth buffer. What are the units of this? Is it the distance from the camera? Or the distance from the near clip plane? And is the ...
0
votes
0answers
26 views

Fixing memory leak in Opengl texture class [on hold]

I recently run my 3D game engine under Valgrin and discovered that everything's almost fine, except that I leak 7,862 bytes in my opengl texture class... I think that I'm not calling a specific opengl ...
0
votes
0answers
15 views

Perspective divide: Why use the w component? [duplicate]

In OpenGL, I have read that a vertex should be represented by (x,y,z,w), where w = z. This is to enable perspective divide, whereby (x,y,z) are divided by w in order to determine their screen position ...
0
votes
1answer
9 views

Passing data into a vertex shader for perspective divide

In OpenGL and GLSL, I am just learning about perspective projection and the vertex shader. However, I am a little confused about what data actually needs to be passed to the vertex shader, and what ...
0
votes
0answers
15 views

GLFW - Event Polling System

I need some help on design. I'm making an event polling system, where a window is notified of events as they happen. I handle events at a system level in my GLFW backend, by using callbacks. ...
0
votes
1answer
27 views

OpenGL Core profile - Array of arrays in glBufferData for VBOs

I want to send each face as VBO, and I structured the data as this facevbo[0] = x x x x x x //x,y,z,r,g,b,s,t facevbo[1] = x x x x x facevbo[2] = x x x x x x x facevbo[3] = x x x x . . . ...
0
votes
2answers
26 views

Render specific part of a texture in OpenGL (2D Sprite Sheet)

I've looked at this answer to find out how to render just a part of a texture: http://stackoverflow.com/questions/6884285/c-opengl-render-part-of-an-image I tried that, but the problem is, this is how ...
-1
votes
0answers
33 views

Raytracing in OpenGL

I've been looking through some raytracing information recently and I have a question. I think the only way to do raytracing in OpenGL is to use the compute shader, right ? But does it have the luck of ...
0
votes
0answers
30 views

Image speeds up while moving and or rotating instead of constant speed

I'm having a problem with rotating/moving an image. I've set one of my images to rotate on it's z-axis buy updating the angle, but when I run my game, the image starts slowly starts to rotate from a ...
0
votes
0answers
13 views

OpenGL, glDrawElementsInstanced behaving differently on NVIDIA GPU than AMD

I have an AMD GPU on my desktop, AMD HD 5770. I am working on a project on my desktop for over a year. In the scene, I have instanced grass and instanced trees. Everything is working fine on desktop, ...
0
votes
1answer
26 views

glGenArrays - This functionality is not available

Whenever I call glGenVertexArrays(), I get the following exception: Exception in thread "main" java.lang.IllegalStateException: This functionality is not available. at ...
0
votes
0answers
31 views

Open GL 3.3 quad not drawing

Right Now I'm just trying to draw a quad(Latter will draw a texture on it) but for some reason its not showing up. My clear color is working so openGL is working. I don't want to focus on any shaders ...
0
votes
0answers
29 views

Modern OpenGL Sprite Drawing - Not Rendering

I'm trying to render sprites based of this tutorial, in LWJGL. Here's what I have so far, with descriptions of what class I use: Transformable2D is a class that holds transform matrices meant for ...
0
votes
0answers
15 views

OpenGL 3.3 is not clearing color

When I open the window its show nothing with a white background. I tried earlier to draw a triangle and nothing shoed up. I belive for some reason OpenGL is just not displaying. Maybe I need to ...
0
votes
0answers
20 views

OpenGL, Multithreaded loading/streaming of data

I've thought about how i could implement loading of data in a second thread for two reasons, first, so i can show a nice loading-screen with progressbar and second, for openworld streaming. I came up ...
2
votes
1answer
32 views

OpenGL ES God Ray Precision error

I have encountered the following (i think) precision error. (missing link need 10 rep) My source of inspiration was: (missing link need 10 rep) On the PC everything works fine, but on android it ...
2
votes
0answers
51 views

OpenGL picking performance: ray casting vs. color picking

I am curious of how the performance of color picking compares to ray casting. I am looking at the scenario when the mouse is clicked which means only then the scene is rendered in a backbuffer for ...
0
votes
1answer
64 views

What's better - drawing every interval that the window updates, or drawing when necessary and updating when drawing?

So what's better? In case the title is a bit confusing I mean: 1) Drawing every window update interval. For example, for a 60FPS window, every 17 milliseconds. For example: ...
1
vote
2answers
78 views

Smallest, most memory-efficient way to have tiles? (C++/OpenGL)

I need to have tiles in my game, just 16x16 images, there would be hundreds (or even thousands) that make up a level. Of course it's not viable to have thousands of memory-hog normal entities, but ...
0
votes
0answers
41 views

Object Rotation with mouse around his axis using Quaternions

I faced a couple of days ago a gimball lock problem , trying to rotate an object on openGL 2.1. I have done some researches and found out that Quaternions could help me. So I implemented the class ...
0
votes
1answer
42 views

How to use traditional pixel coordinates system in OpenGL? (with C++/SDL2)

I find the normalized, centralized coordinate system used in OpenGL weird and annoying, is there anything I can do at all to make it work like normal pixel coordinates on everything ever except ...
1
vote
4answers
52 views

OpenGL calls from a different thread?

I understand OpenGL is not thread-safe, but at the same time, Google seems to be giving me mixed responses. I have a LibGDX game that functions normally, UI/rendering/logic on the same thread, ...
1
vote
1answer
31 views

OpenGL 4.5 Primitive Restart vs. Base Index

From how I understand the two techniques (Primitive Restart and Base Index) explained on https://www.opengl.org/wiki/Vertex_Rendering , they both do the very same thing. Simply spoken, they allow me ...
2
votes
0answers
81 views

OpenGL 2.1 rotation , Gimball lock

I'm working on a little app for a school project , which should be manipulating 3D objects. And i'm stuck with the rotation , as i'm facing what i think is called the gimball lock ? here's a video I ...
-1
votes
0answers
27 views

Help with Zoom in Functionality in Mandelbrot set

I was able to create Mandelbrot set. Now, I want to zoom in and out and can use left right key to navigate. Here is my code. #include <windows.h> #include <iostream> #include ...
0
votes
2answers
61 views

How do I start and stop a GLSL shader?

Is there a way to start and stop a shader?. I want to use this shader to sweep once over my texture and then stop. Does anybody know how to do that? void mainImage( out vec4 fragColor, in vec2 ...
0
votes
1answer
21 views

sfml/opengl, two objects of same class are sharing variables

whenever I use the none-default constructor, it only adds to the coordinates of the previous class(in an array) wall_1x1 wall[2] = { wall_1x1(0, -2, 0), //first argument is x, second z, and ...
1
vote
1answer
45 views

Instanced rendering with ARB_vertex_attrib_binding

I'm trying to separate the vertex format specification from the vertex data. I was able to do that for the mesh vertices successfully. For instanced rendering I wanted to further separate the instance ...
0
votes
1answer
34 views

Opengl, VAO creation within a class

Creating the VAO for a simple cube within a function in the main file results in the cube being rendered properly: GLuint createCube() { GLuint VBO; GLuint VAO; GLuint EAO; GLfloat ...
1
vote
1answer
39 views

Android OpenGL EGL context lost

I'm developing simple Android game in OpenGL ES 2.0 and the development stage is getting closer to publishing game on play store, but I'm still unsure about EGL context behaviour on different devices. ...
1
vote
0answers
72 views

Creating lightning effect with glow effect

I am trying to recreate Drilian's lightning bolt in unity and I have faced a problem in the "Adding Some Glow" part. I am missing glow effect (and/ or "rounded beams"). Here is what I am doing: I ...
0
votes
0answers
11 views

OpenGL HUD is flickering when rotating the camera

I draw game HUD after drawing 3D scene. When I move the camera quickly, HUD starts flickering. I noticed that it happens only if the distance between the camera and an object its looking at changes ...
0
votes
1answer
22 views

How to move the generated polygon horizontally in openGL?

I am trying to develop a small ball game in OpenGL where rectangular bars of random height is generated and moved towards left and there is a ball which should be moved up and down(like jump action) ...
0
votes
1answer
43 views

Wrapping things up in opengl based library [closed]

I am currently building a render library, based on opengl : problem is that I'm starting to get a lot of different ccomponents (Shaders, Materials, Textures, Meshes, ...), and I'm trying to wrap ...
4
votes
2answers
137 views

How do I separate physics from framerate?

Skyrim (Creation Engine / Gamebryo) is a prime example of a game that has its physics tied to the framerate for which it has been heavily criticized, because if you disable vsync / have a > 60 HZ ...
0
votes
0answers
16 views

When use LookAt or Inverted world matrix to compute View Matrix?

I am reading this article http://www.3dgep.com/understanding-the-view-matrix/ and it says that View Matrix is the inverted matrix of World (or Model) Matrix but in the first approach the article ...
0
votes
0answers
33 views

Tessellation won't render

I am starting to work with tessellation and have some problems right in the beginning. I try to render a quad made of two triangles with tessellation, but nothing appears on the screen. But as soon as ...
0
votes
1answer
39 views

Rendering a texture with OpenGL

I have an image (100x200 px) painted with Paint.NET and saved as a .png with 32-bits color depth. How can i render this image using OpenGL 1.1 (with the LWJGL binding) or higher inside the display? I ...
0
votes
0answers
33 views

Model / Mesh Constructing OBB

Recently I started to implement simple bounding volumes in my Engine. So far I have implemented a Sphere and AABB, also I implemented simple ray-intersection methods for those two volumes. But I am ...
-2
votes
1answer
61 views

Porting SDL OpenGL Game to Android and IOS

I am currently learning OpenGL (3.0+) with C++. I am using SDL for input handling, window creation, etc., GLEW to use OpenGL and call OpenGL Functions, and GLM for OpenGL Math stuff. If I fully ...
0
votes
0answers
28 views

ETC1 texture opacity

I'm using the cocos2d-x engine and want to support etc1 on android devices for my game. For ETC1 i'm using the mali compression tool, and GLSL. Everything is working, but I can't change the opacity ...