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
1answer
60 views

Modern OpenGL c++ obj loader

So i made a obj loader in c++.I used blender to export my files. I tried to draw 2 squares(one perpendicular to the other) and when im looking at them from above some weird black triangles apear, ...
-1
votes
1answer
16 views

Using VBO in Opengl. powered with c# TAOFramwork

I'm doing a 3D display for a big object. I've managed to display it with opengl primitives, so it's (very) slow Now i want to use the VBO optimization. But when i lost the focus on the opengl window ...
0
votes
1answer
53 views

Obj file loader in c++ from blender

So i want to export files from blender which have: triangles,normals,texcoords and materials.and use modern opengl and c++ to create a obj file loader.I also use sfml. I have a shader loader class ...
4
votes
0answers
40 views

Depth Peeling implementation problem: How to render the next layer? (OpenGL)

I try to implement order-independet transparency sticking to the pseudo code in the linked paper (page 4). I can't figure out how they are able to do this in OpenGL. I am rendering the scene two ...
0
votes
1answer
42 views

C++ OpenGL More textured objects equals less FPS

So I'm creating a game engine with many features, last time I focused on textures. When I finished implementing some new code (Made by myself) I created new Entity with texture, and it was working ...
0
votes
0answers
60 views

Modern OpenGL and SpriteBatching

I tried to find tutorials regarding SpriteBatch done in Modern OpenGL 3.0+, but failed to find any good resources so far. So can anybody please provide me a good resource/tutorial to achieve ...
-3
votes
0answers
24 views

Java opengl error with getting JFrame and Display to work together [closed]

I tried adding Display to JFrame but get an error any help would be nice. code: public class window{ Loader loader = new Loader(); StaticShader shader = new StaticShader(); Renderer renderer = new ...
-2
votes
2answers
125 views

How do you define and draw rectangles in OpenGL?

I am very new to OpenGL and I am not sure one the basis of how to create and draw objects. So how would I draw simple rectangles in a window using OpenGL? My understanding is that I need to define an ...
0
votes
0answers
22 views

Disable OpenGL NVidia Driver Optimization During Development

I've noticed while looking at gDebugger that sometimes what I dispatch as draw calls never actually show up in the logger. I assume that there is some driver level optimization going on here; so is ...
0
votes
2answers
28 views

LWJGL shader loading problem [closed]

I tried to load shaders in lwjgl but it never works. it shows me a weird error which i can not discover please help. here goes the code:- ShaderProgram.java package Shaders; import ...
0
votes
0answers
28 views

Assimp setup in C++ CodeBlocks MingW compilator g++ [on hold]

Im trying to learn game development.In the past i used old c++,opengl,and blender to create an obj file loader for my projects.Now i saw that this library Assimp is much better.But i have no idea how ...
0
votes
1answer
74 views

Modern OpenGL project in c++ .obj loader

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
-1
votes
0answers
48 views

Modern OpenGL class in c++ for loading model [duplicate]

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
0
votes
0answers
34 views

A 2D card game using OpenGL

I am creating a 2d card game. I have written the low-level functions, game logic, game algorithms in C++. I now have to create a graphics layer that the player can interact with. This just has to be ...
-1
votes
0answers
22 views

How to rotate Vector3 in OpenTK?

I'm completely new in OpenGL and OpenTK world so I want to ask the noob question. I'm working on a 3D application in visual basic and I want to rotate the camera around the "0,0,0" position without ...
0
votes
0answers
28 views

Issue with Use SSBO OpenGL

Students that use OpenGL. Do not speak English well. So please understand. There is currently a problem C++ Code Setup() : glGenBuffers(1, &ssboHandle); GLuint ssbo_binding_point_index = 0; ...
5
votes
2answers
215 views

How to render water reflections on multiple heights

I'm making a voxel game on OpenGL, and are trying to find a way to render semi-realistic water (At least partially good looking, it doesn't need to be strictly scientific accurate). All sources ...
1
vote
0answers
35 views

Cell height with heightmap for collision detection

Hello everyone I'm programming a game with c++ and openGL. My world is generated from a heightmap (100x100 matrix with values 0-255) and now I need a function that returns the actual height based on ...
0
votes
0answers
45 views

Wrong Normal When Models is Close to Each Other

I have a problem regarding my Normal FrameBuffer that creates gaps between models. The image below contains 10x2x10 block (Minecraft style) and one character. The image is outputed through: ...
1
vote
1answer
64 views

How to combine depth and stencil tests?

I have a continuous height-mapped mesh to represent landscape. I use the stencil test to create holes in the mesh. I draw holes to the stencil buffer and then use it to discard mesh fragments. ...
4
votes
1answer
84 views

SSAO issue - surfaces darken based on camera angle

I have a strange issue in my engine where my SSAO effect will extremely darken or lighten based on my camera angle: In that example, I'm just outputting the ssao texture to the screen. The texture ...
0
votes
1answer
79 views

How could we use trigonometry for moving around a 3D World?

Well I have a question about geometry and 3-Dimensional player movement in general. I'm using Java, OpenGL and LWJGL. This is basically what I got: currentFrontSpeed: Is a float that contains the ...
1
vote
1answer
91 views

Implementing Shadow Mapping in Python and OpenGL 2.1

I am trying to create a little shadow mapping demo. My code is currently divided into three rendering passes: Pass 1 - Create the depth texture that will be used for shadow mapping on an offscreen ...
3
votes
0answers
59 views

How do I align the cube in which shadows are computed with the view frustrum? (“View Space aligned frustum”)

Short and concise: Given 8 world space positions that form a cube of arbitrary size, position and orientation and given an arbitrary light direction. How do I compute the View and Projection matrix ...
0
votes
0answers
19 views

Failed to understand how to use glm::unProject (OpenGL 4.3)

Situation: I use OpenGL 4.3, FreeGLUT 3.0, and GLM library. Let say i have a simple 2D object (a ball) and it moves accordingly to the simple equations: x = x_0 + v_0 * t * cosf(alpha); y = y_0 + ...
0
votes
1answer
64 views

Image rendering with additional space around it

When I try to display an image that is 400 pixels wide and 800 pixels high, it is not displayed this way. Instead it is diplayed like this: Instead it is displayed like this You can see at the bottom ...
0
votes
0answers
37 views

How to dynamically draw a filled polygon with a given array of vertices?

Say I have a simple array of vertices (or floats with every odd index being the X of a vertex and every even being the Y), how could I paint all the area between the vertices? As in, I have maybe ...
1
vote
1answer
39 views

OpenGL App not setting cursor position appropriately

I have written a small application using OpenGL, and have implemented some rudimentary camera controls. Unfortunately, I cannot get the application to set my cursor position correctly. The cursor is ...
0
votes
1answer
43 views

Fragment shader, tint color problem

I am new to shaders, and I am trying to tint a texture to mark status of a enemy. I am implementing shaders on OpenGL ES 2.0 (Mobile) The problem is that with this shaders, I see the enemy without ...
0
votes
1answer
61 views

Aspect ratio of drawn quad messed up after rotating

When I draw a quad that is rotating the aspect ratio of the quad gets messed up and the size changes. Gif of what is happening I am confident it has something to do with the way I calculate the size ...
-1
votes
0answers
17 views

Rendering text using STL in LWJGL 3

I'm working on one project and I want to render text in the window. I'm using LWJGL 3 and I found that rendering text should be done using bindings to STL. However I found these examples: ...
-1
votes
1answer
23 views

OpenGL/GLSL matrix in uniform block confusion

I'm a bit confused about the proper way to send a matrix from my code (C++) into a GLSL shader. My matrix object is stored in row major format in memory. If I use the following shader code it works ...
0
votes
0answers
25 views

Drawing Ray from ray picking is not working correctly

I have been implementing ray picking to select squares in my opengl program. I tried to follow this post I found http://gamedev.stackexchange.com/questions/109579/algorithm-for-triangle-picking after ...
-2
votes
2answers
105 views

C++ Multi-Platform (Windows, Linux, Android) OpenGL(ES) Solutions or Tutorials? [closed]

I'm sorry if this has been asked recently and I'm not Googling it right, but I've been digging all week for something. I've got a game prototype I made in Unity, and I have some decent experience ...
4
votes
1answer
75 views

Should texture regions sizes be power of two?

Is it advisable for my individual texture regions inside this texture to be power of two, or that won't make any difference? I've read on several places that it's recommended to use power of two ...
1
vote
1answer
47 views

How can I fade in 3D foliage smoothly?

Take a look at this picture: This is a picture of me diving down from a high height. As you can see, the world is a simple world with grass, snow, trees, etc. The problem here is the 3D foliage. If ...
1
vote
1answer
50 views

Heightmap terrain picking

I've implemented an OpenGL based terrain unsing a tesselation-shader for dividing each 'terrain-cell' into the desired tiles. The heightmap is uploaded to the GPU and applied on the shader. When it ...
1
vote
1answer
41 views

C++ Opengl transforming a glm::vec4 with a glm::mat4

Its easy enough doing it on the gpu via GLSL, but how would I do this in c++? When I try it gives me an error telling me I cant cast a glm::mat4 to float, Which makes sense, but how should I do it? ...
0
votes
0answers
41 views

What is the best way to group lots of squares into one VBO?

I'm making my first game in OpenGL, using procedural generation, and it is a similar concept to Terraria. At the moment, I have one, very small VBO for a square ('block') and an EBO for its vertices. ...
-1
votes
1answer
112 views

Will Vulkan Kill the use of GLSL? [closed]

After reading this link I am still unclear as to the shading language support in Vulkan. Is GLSL being phased out? If someone were just starting and wanting to master shading languages and computer ...
0
votes
1answer
21 views

OpenGL color overlay

I want to create a pause menu where everything in the background gets darker. I've looked up a bunch of possible solutions (even the second page on google) but it doesn't seem to work. I do already ...
2
votes
0answers
51 views

Would this 2D Lighting and Shadows implementation work? [closed]

I'm writing a top-down 2D tile-based game and I'm trying to decide on how to implement lighting and shadows. The game will have a large number of light sources, some static and some moving around the ...
2
votes
0answers
69 views

Jagged light bleeding where surface is roughly parallel to shadow mapping light direction

I am using Unity but this question might not be proper to this engine. I have projected the shadow map onto this sphere but there are grazing shadows. Is it possible to avoid it or to correct it as I ...
0
votes
0answers
17 views

Rotate object from an origin using a transformation matrix

I'm making a project in lib GDX and I want to rotate an object by changing the transform matrix of the sprite batch to one that rotates an object rendered on screen a given number of degrees from a ...
0
votes
0answers
16 views

How to implement UIBezierPath on IOS OpenGL

I have started the OPenGL IOS application development with GLImageProcessing OpenGL ES2.0 application. I could successfully load large jpg image and changed brightness using fragment shaders. Then I ...
-4
votes
1answer
30 views

m_Entries is undefined [closed]

I am following this tutorial and this guy puts in his code m_Entries and doesn't explain it at all at least I think. So any one who has done skeletal animation show me what he is talking about by ...
1
vote
1answer
49 views

Effect of vertex winding on normals and shading

I have implemented a Phong and Gourand shader for a triangle mesh that is being imported from an STL file. It appears to be working fairly allright but some triangles seem to be what I can only ...
0
votes
0answers
22 views

How can I gain depth buffer as a array in Unity or OpenGL

When I have an object (obj) and a material (mtl) file, I can load the 3D model in OpenGL or in Unity. After this, I want to get an array of 3D model's depth buffer from the Scene. By using the array, ...
1
vote
1answer
32 views

OpenGL ES 2.0 facet lighting

I am trying to figure out if there is a way to achieve facet lighting in OpenGL ES 2.0 without extensions. I know it is possible if I don't used indexed vertices but I don't really want to do that ...
4
votes
1answer
338 views

Calculated normals for mesh not working

I am trying to implement a 3D mesh viewer with C++ and OpenGL ES 2. I am currently struggling with the calculation of the normals for the vertices, or at least I think that is where the problem ...