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

Editing the pixels of a rendered image

I want to render an OpenGL scene, and then edit the individual pixels of the rendered image, such as superimposing a small image on the screen, on top of the rendered image. Please could somebody ...
0
votes
0answers
27 views

Java vs C++ - How much worse is Java than C++ performance wise [on hold]

I want to create my first game. I'm quite good at Java, but I know it have poor performance. But how poor? Sometimes I see people who call it terrible compared to C++. Is that true? A little case: ...
0
votes
0answers
19 views

3D Model Render Method [on hold]

which is a good method to render 3D model? VA or VBO? Currently my method is like using glBegin and glEnd. Any example? Last time I tried to convert my current code to both the model wasn't displayed. ...
0
votes
0answers
15 views

ThreadAffinity being changed by OpenGL / ChoosePixelFormat

If I change thread affinity and then create the window used in my OpenGL game it changes the thread affinity to something else. I tracked down the exact API call (ChoosePixelFormat) which changes it ...
3
votes
2answers
97 views

What state is stored in an OpenGL Vertex Array Object (VAO) and how do I use the VAO correctly?

I was wondering what state is stored in an OpenGL VAO. I've understood that a VAO contains state related to the vertex specifications of buffered vertices (what attributes are in the buffers, and what ...
0
votes
0answers
23 views

Creating a Lighting Source (Bulb) using OpenGL [closed]

I am trying to create a lighting source possibly the bulb as shown at the top wall in the figure below : But when I am writing the following code I could not see any change in my previous output. I ...
0
votes
0answers
25 views

translating simple mathematica code into an app [closed]

I have written a functioning interactive game in Mathematica. The input is mouse clicks and drags, the output a display in 3D with 30000 triangles/frame. I am a quite experienced Mathematica ...
0
votes
0answers
28 views

Coordinates estimation

Hi im using artoolkit to extract the coordinates of the marker im detecting with the camera. I need to know the values returned when arGetTransMat is the coordinates (x,y,z) which is returned ...
0
votes
0answers
28 views

How to calculate multiple collision of sphere and triangles?

I have a sphere and a mesh(triangles). When the sphere intersects the triangle, I reflects the vector of speed and everything works fine. But I can't write a good implementation for multiple ...
-4
votes
0answers
50 views

OpenGL Designer Wall [duplicate]

I created a 3D room using a cube. Now I want to have something like this (only the wall, ignore the frame and bulbs) Right now I am getting something like this :
0
votes
0answers
42 views

Creating Lighting effect in openGL [duplicate]

I am trying to make my wall have the same color and shade as the walls shown in the picture (Please ignore the frame and the bulbs). I can create a a cube and view it from inside but how can we give ...
0
votes
1answer
32 views

Small text is very light / faint with FreeType and OpenGL

I'm able to render large text with FreeType just fine: But when I want to render small text (and the only parameter that changes is the font size), the quality is much poorer: As you can see, ...
0
votes
0answers
66 views

Creating 3D Room OpenGl [closed]

I have started programming in openGl and learnt 3D concepts. I can make cube, rotate them etc. In many projects I saw this wall and i wonder how this is created (just the walls, not the lightning or ...
0
votes
1answer
81 views

Shader - Color blending

I would like to know how to blend colors in a specific way. Let's imagine that I have a color (A) and an other color (B). I would like to blend them in such a way that if I choose white for the (B) ...
0
votes
0answers
16 views

LWJGL Using .setIntialBackground and Drawing Textures?

I have been trying to create a game with LWJGL, however I have recently discovered that changing the background color using Display.setInitialBackground() with glClear and trying to draw a texture at ...
0
votes
1answer
33 views

How to Load a Level for use with the Bullet Physics Library

I am trying to use a level in .obj format loaded with Assimp to generate a btBvhTriangleMeshShape to use with the Bullet physics library. I can successfully load btConvexHullShapes as well ...
2
votes
3answers
197 views

What's the best way to organize small textures in OpenGL?

What's the best way to organize small textures in OpenGL—having them all in a big texture and selecting them with texture coordinates, or using individual OpenGL textures? Until recently, I used to ...
0
votes
1answer
47 views

OpenGL Blending Format

In OpenGL, is there a format for a texture in glTexImage2D that prevents blending, or do you have to disable it using glDisable(GL_BLEND). Reason for use is that I would like to store additional data ...
-3
votes
0answers
45 views

3D Fractal terrain generation

I have a problem with my terrain, each time I get a strange terrain. I don't know where is exactely the problem. Here is my MidPoint dispacement function: bool terrain::MPD(int x1,int y1,int x2,int ...
0
votes
0answers
40 views

OpenGL MD5 Model Animation. Performance issues

A time has come when i had to implement an Animation to my Engine. I started with standart MD5 mesh/anim format since i find it easy to understand. I managed to implement a simple MD5 loader and i can ...
0
votes
0answers
23 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 ...
1
vote
1answer
36 views

Modern OpenGL Texture Displaying Incorrectly [closed]

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
1answer
46 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
61 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. I'm using an OpenGL 3.3 Core ...
0
votes
0answers
56 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
1answer
46 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
48 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
51 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
53 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
24 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
1answer
52 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 ...
0
votes
1answer
52 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
86 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
53 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
55 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
70 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
1answer
45 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
67 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
45 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 ...
4
votes
1answer
123 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 ...
0
votes
1answer
73 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
51 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
77 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
44 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
58 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
108 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
149 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
43 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
87 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 ...