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
8 views

OpenGL - Cubemap “Rotating” Proportional To Camera Movement

I'm doing a simple planet rendering project and am running into an issue with accessing cubemap textures correctly. The planet terrain is generated using the diamond square algorithm done 6 times and ...
0
votes
0answers
18 views

I have a questions about c++ and SDL2, openGl [on hold]

i started to learn programing. I really want to make a game in c++11 and SDL2 , openGL i know is very hard to make something that why i'm asking this you know couple of good tutorials or books i can ...
1
vote
1answer
20 views

Modern OpenGL Texture Displaying Incorrectly

I've been working with this code and have simplified it to the most basic form possible, and even then I cannot get a texture to display properly at all. Here is the code: ...
0
votes
0answers
19 views

How to make TMXTiledMap responsive?

I've been struggling with Cocos2d-x (C++) and finally I got to the point I feel more or less comfortable with that. My game is a 2D car-based one, with a straight infinite map where I've finally been ...
1
vote
0answers
34 views

Transformed Vertices have wrong Z Axis

For quite some time I've been working on my open 3D game engine, to learn how this stuff works. You can see the full codebase relating to my problem here on github / xythobuz / OpenRaider in the ...
0
votes
0answers
50 views

OpenGL Diffuse Lighting Issue

I seem to have a problem in my OpenGL scene where if I (the camera) am looking at an plane it's brightness changes depending on what angle I am to the plane. It seems as though the camera is a source ...
0
votes
0answers
19 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
1
vote
1answer
35 views

Shader - Convert vector into scalar

I am trying to convert a half3 as a simple half but I am facing an issue. As for an example half3(1, 0, 0) give me white but half3(0, 1, 0) gives me black. How can I convert properly a half3 to a ...
0
votes
3answers
48 views

Problems Animating Texture in OpenGL

I'm trying to animate a texture to scroll a static screen for a television, however I'm having some issues. Just translating within the texture matrix animates all textures in the scene which is ...
0
votes
1answer
49 views

Depth Stencil Buffer

In OpenGL, what is the difference between GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL? I have looked around and have been unable to find a clear explanation. Information on their usage with GLSL would ...
0
votes
0answers
21 views

Is it reasonable to generate mipmaps on the color attachment of my framebuffer in realtime?

I'm looking into hdr tonemapping and so far all the equations I've found result in really, dulled results. One i haven't tried uses an average luminance of the image. The pdf I've been reading ...
2
votes
0answers
42 views

Proper normal vector transformations in normal mapping

Hello! This question is about transforming normal vectors from normal maps properly. I have tried methods from over five sources, still can't get it to work, and I'm really desperate. Included are ...
-2
votes
0answers
66 views

How to draw a curve in opengl [on hold]

I've just started learning OpenGL. With OpenGL I am trying to draw a car model with programming language C++. In this model I can not draw the curve in the car body where the tires will placed. I've ...
0
votes
1answer
38 views

OpenGL ES 2.0 2D-Image displaying

I have followed the official OpenGL ES tutorial to create a working OpenGL-environment. I have been able to do anything I wanted to except for displaying 2D-images. To do so I worked through this ...
0
votes
1answer
77 views

DirectX11 Equivalent of OpenGL code

I am currently porting parts of my engine over to D3D11 from OpenGL and was trying to figure out how I would accomplish the following blending functions in D3D11. glEnable(GL_BLEND); ...
0
votes
1answer
52 views

Texture rotation inside a quad

How can I rotate a texture inside a quad without rotating the quad? Here's the code but I'm rotating the whole quad here. glBindTexture(GL_TEXTURE_2D, texName5); glMatrixMode(GL_TEXTURE); ...
0
votes
0answers
25 views

Opengl games Open Source [on hold]

I want to start making a game using Opengl with C++ , the game is simple, a plane flying or just a train and some Graphics around , it's simple game to make but i don't know where should I start ? ...
0
votes
0answers
48 views

OpenGL model transforms wrong on AMD GPU

I've been writing a program that uses OpenGL to display some simple 3D models (rays, cuboids, spheres and simple meshes). I am targeting the programmable pipeline in OpenGL 3.2. So far I have been ...
1
vote
2answers
66 views

OpenGL Vertex Array Object(VAO)

I have drawn a triangle and a square using open gl and everything was fine. I have then tried to draw the same triangle and square, while implementing VAO's and now I only get a white triangle - ...
0
votes
0answers
29 views

Ideas for a seminar in computer graphics [closed]

I'm about to enroll in an "Advanced seminar in computer graphics" as part of my MSc degree in computer science. I'm relatively new to computer graphics, I'm currently in the middle of taking a basic ...
0
votes
1answer
44 views

Incorrect Normal Matrix

In my game engine I'm passing a normal matrix to my shaders like so: Matrix3f normalMatrix = modelMatrix.invert().transpose(); However this is causing lighting to rotate with my object, producing a ...
1
vote
2answers
62 views

Drawing a pixel to RenderTexture

I would like to know how you would go about drawing a single pixel to a RenderTexture in Unity. In XNA, it was just a matter of setting the graphic device's active renderTarget, and drawing to it. ...
0
votes
2answers
44 views

How to use TextureArray's Pre-OpenGL 4.2?

I've been using TextureArray's in my current Project; However, I have come to the problem of OpenGL 4.2 functions not being on the present Mac software when ported over. Due to only version 4.1 of ...
-1
votes
0answers
24 views

Stochastic process simulations in OpenGL [closed]

I'm planning on taking on a pet project in OpenGL in which I want to simulate particle movement in 3D, 3D Random Walk, Brownian Motion, state transitions (Gambler's Ruin, Inventory) etc. etc. I also ...
-2
votes
0answers
35 views

CEGUI 0.8.4 and SDL2. Crash the app after startup [on hold]

Do not run the compiled lesson. Link to the lesson. https://bitbucket.org/lucebac/cegui/src/ea8f8c814a4d5dbaa56344218659eb68ce173961/application_templates/SDL2.cpp?at=application-templates-devel Link ...
4
votes
1answer
117 views

Image edges are distorted inside game

I dont know how to explain this, so I will use images to describe my problem. The image I made using InkScape: What it looks like in-game (ignore the runner): As you can see the edges are not ...
-1
votes
0answers
25 views

Why are my GLUT/GLEW models only visible for one frame in the framebuffer? [on hold]

I'm having this problem with an OpenGL program where the models in the scene are only visible for one (the first) frame when rendering them to a texture, and then to the screen. If I render them ...
0
votes
1answer
69 views

Platformer collision advice

I've been trying to implement collision for a platformer but I can't find a good way to get the collision of certain sides without it get glitchy. So i try to get the collision of the top rectangle ...
1
vote
1answer
84 views

How to approach animations and OpenGL

There are tons of tools and instructions for making 3d models and animations in various software products. My question is: in video-game engines, when would you use a pre-rendered animation, and when ...
1
vote
1answer
47 views

How to orthogonalize the “up” vector in a camera based on “eye”, “look” and “up” vectors?

Given a camera position defined as (eye, look, up), where "up" not quite at right angles to eye->look, how would I re-orthogonalize "up"? I've had a hunt around, but did not find anything, yet if I ...
-1
votes
1answer
76 views

Cannot find bug in frustum culling code

I've written some code for frustum culling, but for some reason, it is not working, and i can't find the bug in it... Maybe a bug in the math, somewhere? So, i'm asking you if anyone could check these ...
0
votes
1answer
39 views

PBR Metalness Implementation: specColor at Value 1?

I am doing a BRDF supporting the metalness/roughness workflow. I know that in cases of Metalness = 1.0 the reflectance value is taken from the albedo map - so is the specular color to tint the ...
0
votes
3answers
51 views

Why should i set glClearColor and setProjectionMatrix in render method many time in LibGDX?

import com.badlogic.gdx.Game; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.SpriteBatch; public class MyGame extends Game { public OrthographicCamera ...
0
votes
0answers
100 views

Problems with First Person Camera in C++ OpenGL

I'm building a first person camera for my application but I'm having a couple of problems relating to moving the camera. In general, I have 2 vectors, one for the camera's position and one for the ...
1
vote
1answer
139 views

Simulation of ball movement in a 3d landscape. The easiest way?

I have a landscape(generated via Perlin noise) and a ball. I want the ball to move along the geodesic(implementation of basic physics: gravitation, friction). I thought to do raycast around the ball ...
0
votes
0answers
37 views

Hard time implementing AABB collision into a platformer

I have AABB collision working fine. The problem is I can't get it to work with a platformer style game. The collision makes the player move a bit static when colliding and the gravity wont work with ...
2
votes
1answer
77 views

Creating polygons with separate outline/fill colors in OpenGL

Subject I am creating a terrain map with triangle strips and I would like to make the bodies of the triangles black, but have their outlines be colored. Problem The solution appears to be to draw ...
0
votes
1answer
27 views

trouble getting the lighting and material set up right

I am having some trouble getting the lighting and material set up. Below I have setup lighting and material, however, when ever I turn on spectular reflection for material the sphere that I am ...
0
votes
1answer
27 views

Opengl textures change color of everything

Whenever I render textures, all shapes get the color of the texture. I'm not sure why, but I think it's something to do with the way I render textures. Here's what I use to draw textures: public void ...
2
votes
0answers
54 views

How to handle the birth and death of particle without reading from the buffer

I've implemented a simple particle system where each particle has a position, velocity, age and lifespan stored in different SSBOs. Most of the data including all the position, velocity and age is ...
0
votes
0answers
22 views

Opengl camera handling

I normally do parallax scrolling with x and y which works, but I'd like to make a camera class instead so I can rotate as well. Right now the camera is set to the player's position but doesn't scroll. ...
2
votes
2answers
92 views

How can I set up an intuitive perspective projection/view matrix combination in OpenGL, using GLM?

Could anyone help me set up an intuitive perspective camera matrix using OpenGL and the GLM library? By "intuitive" I mean that I want the camera to be looking at the middle of the screen down the -Z ...
3
votes
1answer
271 views

Recurring stalls in SwapBuffer

I am currently doing measurements on a test scene implemented in OpenGL 4.5 with different "setups". I noticed that in case I have a very high amount of FPS (1550 in this specific case), SwapBuffer ...
0
votes
0answers
59 views

OpenGL Slow Rendering Procedures . glDrawArrays

Hello i would like to present my problem here. At the moment i have a scene with about 250 trees , 100 ferns , a player model and a custom generated terrain (from height map). For the past few days i ...
1
vote
1answer
48 views

Does glScissor affect stencil and depth buffer operations?

I know glScissor() affects glColorMask() and glDepthMask(), but does it affect the stencil and depth buffers? For example: glEnable(GL_DEPTH_TEST); glEnable(GL_SCISSOR_TEST); ...
0
votes
0answers
31 views

How to toggle fullscreen with lwjgl

I'm using glfw in lwjgl-3 to try to create a toggleFullscreen method. However it always gives me errors. I saw this question Toggle Fullscreen at Runtime but it didn't help because glfwOpenWindow() ...
0
votes
1answer
34 views

Easy method of obtaining texture coordinates for sprite sheet

In my (OpenGL ES 2.0 Android) game, I use 2 types of Sprite Sheets. In one type all sprites/frames are of equal size and in the other they are all different shapes and sizes. It is the latter one to ...
1
vote
2answers
70 views

OpenGL: Is it efficient ok to glPushMatrix, plMultMatrix, plPopMatrix for every object in my scene?

I'm very new to opengl, and I might not fully understand the openGL matrix projection stack thing. So, I have about 300 'objects' in my scene, each with their own position/rotation, and I want to ...
1
vote
1answer
80 views

Stepping through 3D noise to generate a cubemap for a sphere

This is somewhat related to a previous question I asked How to create a seamless cubemap noise texture? I have managed to successfully step through a 3D noise function to create a cubemap texture ...
0
votes
2answers
45 views

Problems with Rotation Matrices on Certain Axes

Here is what my rotation matrix looks like: public Matrix4f initRotation(float x, float y, float z) { Matrix4f rx = new Matrix4f(); Matrix4f ry = new Matrix4f(); Matrix4f rz = new ...