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 ...
0
votes
1answer
35 views
How to optimize a cubes made world game?
I'm making a cube-world-game like Minecraft. And to render it I've splitted it in 16x16x16 blocks regions (also known as chunks in mc) and then, on rendering, I take all the chunks in the rendering ...
0
votes
0answers
8 views
Android ROTATION_VECTOR yaw doesn't work properly
I wanted to do get the rotation on the x, y and z axis, and I managed to get x and z working (pitch and roll), but not the y axis (yaw). It only goes around 180 degrees, then it almost immedialitely ...
-4
votes
0answers
44 views
Negating directional light's direction
Why we negate the direction vector of directional light when we calculating the light direction?
I am using this link to learn opengl: https://learnopengl.com/#!Lighting/Light-casters
But in ...
1
vote
0answers
40 views
1D vs 2D vs 3D texture performance
I'm working on a 3D game with large blocky untextured, but individually colored, voxels (similar to CubeWorld). For rendering, right now I naively convert online all visible faces ahead of time to ...
0
votes
0answers
38 views
What is the difference between OpenGL and Vulkan API's? [duplicate]
I was looking to benchmarks and I can't see a difference. OpenGL 4.5 is same with Vulkan. I am new at 3d graphics development but here is the question:
Are all graphics API's the same? Is the only ...
3
votes
1answer
41 views
Issues with OpenGL rotation matricies and shaders
I am having an issue with my rotations in my opengl shaders. My program works fine before I add in my rotation matrices. Here is an example, at YouTube. After I add rotations to my shaders, there are ...
1
vote
0answers
65 views
GLSL - skewed parallax occlusion mapping
I'm currently trying to implement Parallax Occlusion Mapping, based off a post on sunandblackcat.com
With my current implementation, I have the following:
i.stack.imgur.com/H0c2s.png
Notice how the ...
0
votes
1answer
23 views
OpenGL camera movement with mouse buttons
I am using modern OpenGL with glfw. I made a FPS camera with mouse and it works very well. But I want to move my mouse like Blender's model view mode. When I press the middle mouse button and move the ...
0
votes
0answers
50 views
Vulkan or Opengl for beginners? [closed]
I am new (beginner) at graphics development (I am very good at AI ) i want to make a game engine like unity. But should I start to learn from vulkan or start from opengl
thanks.
sorry for bad english
0
votes
1answer
78 views
Why is fog in games exponential and has a start distance?
In most tutorials I see on how to achieve fog with shaders the fog is exponential and has a minimum / start distance from the camera. Why? Both seem counterintuitive, especially the minimum distance. ...
1
vote
1answer
36 views
What is the best way of storing transformations for an object and then applying them with OpenGL?
First some background info...
I have been working on a platformer game, which I draw with OpenGL. The platforms are cubes and the player is a cube.
The platforms and the player (both cubes) are ...
0
votes
1answer
39 views
Two reflective surfaces facing each other in openGL
How do I render 2 reflective surfaces, Example a mirror, face each other? To render a single surface I would use a cube map by rendering from the object on six directions.
But to render 2 surfaces ...
0
votes
1answer
25 views
Can't understand why transformation doesn't work
To make a simple transformation like a rotation I want to use linear algebra -multiplying the vec4 vertex_position by a mat4 transformation
If alpha is the angle of rotation, then the mat4 is ...
1
vote
1answer
34 views
Map Engine Rendering Broken
So I've been making my own tile map engine in LibGDX as the one currently implemented doesn't support collision detection with scaling. So I've come up with my own Layer and Map class and a drawing ...
1
vote
1answer
30 views
Texture filtering of look-up table in post process shader
I am doing post processing by drawing to an FBO and then applying a certain fragment shader when drawing the FBO's texture to the screen. I want to use a look-up table texture to apply color grading. ...
1
vote
1answer
19 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
42 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
31 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
32 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
161 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
80 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
42 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
106 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
67 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
57 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
42 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
54 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
40 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
86 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
25 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
24 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
46 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
36 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
35 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
111 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
28 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
44 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
50 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
34 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
33 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
49 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
66 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
64 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
55 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
83 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
44 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 ...