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

1
vote
1answer
10 views

texlod() is not supported on ps_4_0_level_9_3 , how can I do a similar operation in this case?

Ihave an interesting problem for you guys I am trying to compile a pixel shader that I ported from GLSL and I am having trouble with a texCUBElod() function that the compiler say's is not supported ...
1
vote
1answer
16 views

Projection Texture Mapping

I have been trying to understand how projective texture works; and, even I have been able to achieve the result by following the steps in tutorial, I fail to understand how it works in my mind. To my ...
0
votes
1answer
27 views

Artifacts when trying to implement Cook-Torrance BRDF

I am trying to implement the Cook-Torrance BRDF within OpenGL, but I keep running into issues. The most obvious one are black patches and a bright spot at (0, 0). I checked my shader multiple times, ...
0
votes
1answer
24 views

Creating a 3rd Person Flying Camera for 3D asteroids game

In order to learn PyOpenGL and test out an engine I am developing, I am trying to write a 3D asteroids flying space shooter game. Currently, I am implementing the camera using a "look at" function ...
4
votes
1answer
129 views

How could I render a star like those in Elite Dangerous - coronas and some sort of 3D “plasma” effect on the surface?

Lets assume I wish to render a large, 3D, star object in a game engine using OpenGL. I can use a few different meshing methods: this includes mapping a cube to a sphere (with better subdivision to ...
0
votes
1answer
64 views

Reason for white lines in tile-based game

My game is tile-based. I am getting this lines between two tiles. They don't look nice. How can i resolve this issue?
0
votes
1answer
37 views

Storing rendering data for voxel game 1 VAO and VBO or 1 for every chunk

I have a minecraft style voxel game with placing and digging blocks. it runs at 400+ fps on my computer but when I added semi-transparent water it started running at ~40 fps. so a time per frame ...
3
votes
2answers
83 views

ECS rendering system issue

I'm in developing of isometric RPG with 3D characters on 2D level. I was trying to develop this using standard OOP paradigm, but face with a lot of issues. Recently i learned about ECS and found this ...
0
votes
1answer
61 views

OpenGL: Better Approach to Repeating Sprites (e.g. terrain)?

Preface: Linux (Ubuntu 16.04 Gnome), C++11, SDL2, GLEW 2.0, OpenGL 4.5 Hello ladies/gents, My conundrum is this: How do I handle draw a repeated texture (sprite) as a single object, at various ...
0
votes
0answers
51 views

Minimizing draw calls and rendering system design questions

I'm currently in developing of 2D/3D indie game (isometric game with 3d character models and 2d level) on my own engine and now I'm thinking about minimizing draw calls. For level design we're using ...
1
vote
0answers
41 views

why collision not detection not happened in Two Sphere

I start practice 3d collision detection of sphere in OpenGl containing two sphere one sphere hit using cannon gun but collision not detect when it hit and when i debug code collision statement triger ...
0
votes
2answers
53 views

OpenGL Does not work VAO with 2 VBO

Please, help! It is impossible to bring an array of vertices (Vector2) painted using the colors of the array (Color). Pererechital floor of the Internet, I will be grateful for any help! Init VBO: ...
0
votes
0answers
36 views

making special blocks in a voxel game

I'm making a voxel game and it looks quite good but then i thought of special blocks like minecrafts grass leaf blocks, and translucent water. I had the idea for the grass blocks to put them in a ...
3
votes
1answer
84 views

Rotating a Row of Textures

Preface: In Linux, using C++11, SDL2, GLEW, and OpenGL. Hello Ladies/Gents, I am reaching out as I'm stuck on a fairly simple problem that a decade out of school has further hindered. Specifically, ...
0
votes
0answers
24 views

Get face translation/rotation/scaling from 2d face

I have a 2d face stored in a vbo. This face is along xy axis. Then I have a cube that I have to render with using this face. The cube is defined by firstPosition and secondPosition. In some way (I ...
1
vote
1answer
20 views

Incomplete rendering using OpenTK (VBO)

Using Assimp.net I did load obj file. assimp returns back Mesh object that contains vertexes, normals, faces, colors and texture. when I don't use VBO the object will load complete. like this : But ...
0
votes
1answer
41 views

Fragment processing depends on polygon size?

I just set up some simple vertex/fragment shaders for handling lighting instead of using the openGL calls. I have a few terrain VBOs setup that are drawing a million or so triangles for testing (bunch ...
0
votes
0answers
18 views

How to add side friction to vehicle physic model?

I'm writing a very simple vehicle physic model using information from this thread, but I'm stucked with side friction calculation. My vehicle slides on surface and don't loose speed at the drift. Here ...
0
votes
1answer
34 views

input arrays in OpenGL vertex Shader

would something like this be valid as an input to a vertex shader? layout (location = 0) in float[6] faceTextureOffsets; I know you can use things like vec3s but for this situation I need an array ...
1
vote
1answer
34 views

Combining and drawing 2D lights in OpenGL

I have progressed to the lighting portion of my little framework and I managed to solve a few initial problems so now I'm left with the subtle weirdnesses. At this stage I just have 2 lights - the ...
4
votes
3answers
96 views

Cube world rendering optimizations

I'm making a Minecraft like game and I would like to apply some optimizations. Firstly I didn't and I rendered the world using a vbo in which I stored a cube model and I drow all blocks of the worlds ...
0
votes
2answers
25 views

Reliably synchronising SDL animation with VSYNC in windowed mode

I have an SDL/OpenGL program which creates a rendering context with PRESENTVSYNC enabled, then enters an animation loop which calls SDL_GL_SwapWindow each time around. On my own machine, the animation ...
0
votes
1answer
43 views

C++ Assimp - Models incorretly drawn/loaded

I've followed a tutorial about using Assimp to load models, but the loaded models are incorrectly drawn: These should be a spheres I've checked my code multiple times but I can't seem to find what I ...
0
votes
2answers
48 views

Flipping Textures in Modern OpenGL

How do I flip a texture in modern OpenGL (3.1+)? This is the unflipped render, keep in mind it is drawn with 8x8 tiles from a texture atlas, so I edited green squares below him into the image to ...
0
votes
0answers
30 views

OpenGL Vertex shader matrix multiplication causes triangle to disappear

So i have a very basic functioning application, rendering a basic triangle (using vertex and fragment shaders) When I try to multiply the in-vector in the vertex shader with a mat4 the triangle ...
0
votes
2answers
32 views

OpenGL can an Element Array Buffer points to only one VBO

I'm making a Minecraft style game and currently storing 36 vertices and texture coordinates per cube. Could I make an EBO for only the position and leave the texture coordinates as they are? OK i ...
0
votes
1answer
17 views

texture cordinate VBO not being updated OpenGL

I'm making a minecraft style game and I decided to add a VBO with the texture atkas coordinates of the vertices but it is appearing all white. However I'm following the same process as another VBO for ...
-1
votes
0answers
20 views

Minecraft type game chunk rendering optimizations [duplicate]

I'm developing a Minecraft like game. I've tried to render a 16x16x16 chunk but soon after FPS goes down drastically (from 800 to 30), obviously turning off the vsync. I added gl face culling and ...
1
vote
1answer
48 views

How can I reduce the data sent to the GPU for a voxel?

I'm making a minecraft style game where each chunk each chunk has buffers holding the position of all visible blocks and texture atlas coordinates of the 36 vertices that are needed to draw the ...
0
votes
1answer
48 views

glViewport() Win10 doesn't draw new parts

I've been steadily working through building a basic 2D tile framework in python. I'm trying to use modern openGL so I have a simple shader and some vertex buffers and it's mostly doing what I want so ...
1
vote
1answer
65 views

How to manage different shaders dynamically?

Currently I have only a really basic shader and a shader class. My question is that if I want to make different shaders (with different uniforms, inputs, etc) how should the architecture look like? ...
0
votes
0answers
62 views

OpenGL not drawing with VAO and VBO created in class constructor

I'm trying to make a game similar to minecraft and I thought I would have each chunk hold its own VAO with all of the coordinates of the visible blocks. I could it get working with one VAO in int main(...
1
vote
1answer
51 views

OpenGL Water Waves - gradually advance

I want to make a simulation of water drops producing waves, in OpenGL with C++. I calculated the height for each point of my plane grid in the 'Vertex Shader' with this formula: The problem is that ...
1
vote
1answer
77 views

OpenGL application, not working on AMD.

Recently, I moved an app I am building from a computer with Intel & Nvidia to a computer with AMD CPU & GPU. The problem is, that glDrawElements gives me bad access location and I can't ...
0
votes
1answer
42 views

Simple LWJGL program renders nothing

When I run the following basic LWJGL program, all I get is a red screen due to glClearColor(1, 0, 0, 1). Nothing renders in the screen except the red background. I'm using Ubuntu as my operating ...
1
vote
0answers
23 views

How to do Decal Clipping with OpenGL using Depth Buffer comparison?

Basically I'm already drawing decals on top of various flat surfaces and that works great. As soon as the decal approaches the edge of a surface, naturally it doesn't get clipped. Is there a way to ...
0
votes
0answers
73 views

OpenGL Slow Performance

I have started making a 2D game using some rendering code from my 3D game engine but when I try and render a few hundred squares at a time, it starts to slow down. Average FPS: 44FPS when rendering ~...
0
votes
1answer
58 views

Best way to draw a textfield in OpenGL, when performance really matters?

I'am creating my own GUI library in LWJGL (opengl for Java). I already managed in creating buttons and panels, and I've also got the hover and active states of the components implemented. This ...
0
votes
1answer
49 views

Rendering perspective independent polygons in perspective view

I am creating an editor where I have "grabhandles" that can be dragged to transform a primitive object. My problem is that I can't find the correct solution to show these grabhandles in a perspective ...
0
votes
1answer
60 views

Why is my texture wrong?

So I am creating an AR app using Vuforia, and I have found a way to read obj files and index them. But now that I finally got my model to show up, there must be something wrong with my UVs/texture ...
0
votes
1answer
28 views

OpenGL geometry shader 2d rectangle extrusion has weird angles

I have a geometry shader that extrudes lines to rectangles in 2d (by outputting triangle strips). When the lines are not parallel to the X or Y axis, I'm getting parallelograms instead. Also, when the ...
0
votes
1answer
36 views

What to do with unused vertices?

Imagine yourself a vertex array in OpenGL representing blocks in a platform game. But some vertices may be not used. The environment is dynamic, so there always some vertex may suddenly become ...
5
votes
2answers
232 views

Is this a good way of separating graphics from game logic?

Currently my architecture (game engine) looks like this (not accurate): Everything graphics related is done in the GraphicsEngine (and in its components, like Material, Mesh, etc), but my problem is ...
0
votes
0answers
15 views

OpenGL C++ - Only one object appearing in scene, Parent/Child positioning problem

I have a raytracer which I'm trying to build a SphereFlake in, but I'm having trouble with the objects in the scene. When I create a sphere it creates perfectly, but when I try to create another ...
0
votes
0answers
28 views

gl_VertexID always 0 under some hardware

I'm trying draw a color box with TBO technique for my project, but something strange happens! Please Help Me. VERTEX SHADER: #version 330 uniform mat4 matPrj; uniform mat4 matView; uniform mat4 ...
0
votes
1answer
57 views

OpenGL texture bleeding

I am rendering some sprites from a sprite sheet that I generated but as I do, I get a purple haze around the blocks (The purple is coming from the other blocks in the sprite sheet that are next to ...
0
votes
0answers
42 views

Transform class and gimbal lock

I am facing gimbal lock in my Rubik Cube program (opengl3.3+glm). I am using my own Transform class which is implemented this way: class Transform{ private: glm::vec3 position, rotation, scale; ...
0
votes
1answer
45 views

How do I represent blended tiles in a mesh/vertex array?

I recently started making a Terraria clone using the LÖVE library, which is based in OpenGL. In Terraria, for each tile, there is a large texture with all possible combinations for merging with ...
0
votes
0answers
16 views

PCSS variables question

I am trying to implement PCSS shadows. To implement this, i am following the next documentation provided by NVIDIA: developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf My problem is ...
0
votes
0answers
18 views

If SDL supports mobile platform, why do I need GLEW for my PC app?

First was I using GLFW for windowing, input and timers, but I found out it only supported PCs. So then I moved to SDL in an attempt to write once and be cross-platform compatible to mobile. But then I ...