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

Transparency in GLSurfaceView

I am new in game development .I have a class which extends GLSurfaceview and we add this class in xml file and that xml file pass in main activity i want to make transparent that class. we already use ...
1
vote
1answer
65 views

How to only render fragments with Z from 0 to 1 in OpenGL?

I have been using OpenGL for a year now, but I just recently found out that OpenGL only clips vertices when the absolute value of the x,y or z coordinate is less than the absolute value of w ...
0
votes
1answer
68 views

wrongly scaled on cocos2dx 3.2 when render to multiple fbo (more > 1 deep)?

i have bug that only happen when retina flag disabled. i try draw multiple render texture to achive some multi post effect: so i have 3 render texture, fbo 1 for final pos effect fbo 2 for back ...
1
vote
1answer
118 views

Rotating a swinging sword in LWJGL gives wierd results

I'm making a 2d top down game in Java using LWJGL(OpenGL, essentially). I recently tried adding a swinging sword mechanism. My coordinate system is set to the bottom left FOR ALL objects. The rotation ...
0
votes
0answers
37 views

In OpenGL on Android, how do I give quads a border color?

I am new to game development and I'm working on a Rubiks cube game in Android using OpenGL. I want to create a cube with black borders, but I can only manage to set the fill color: GLColor[] colors ...
0
votes
1answer
65 views

How to draw 2d above 3d scene?

I have an OpenGL(3.3)+GLEW application. I want to draw a black vertical rectangle at the left side of the window for writing some information on it, like fps (I use GLEW function for drawing text). ...
0
votes
0answers
49 views

Shader - Simple SSS lighting issue

I am trying to create a simple subsurface scattering effect using a shader but I am facing a small issue. Look at those screenshots. The three images represents three lighting states (above surface, ...
0
votes
1answer
82 views

loading a texture in Opengl

I am working on a graphics project I want to make a city using opengl with c++ anyway in the last few days I have been trying to load a texture but it didn't work with me in any way I have tried many ...
1
vote
2answers
42 views

glutPostRedisplay() is not redrawing after updating model view matrix

I am trying to change the rotation of my object with keyboards, when I move the object in the direction of x, y or z it is okay, it is responding correctly. But when I try to change rotation, it does ...
0
votes
3answers
120 views

Editing the pixels of a rendered image

I want to render a simple OpenGL scene as usual, but then I want to superimpose a small image of my own (such as from a bitmap file) on top of the render, such that this image always shows. For ...
1
vote
0answers
24 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
470 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
35 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
46 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 ...
0
votes
0answers
44 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
87 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
1answer
109 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
32 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
106 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
231 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
54 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 ...
0
votes
0answers
75 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
52 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
46 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
84 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
72 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
62 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
88 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
78 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
61 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
65 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
40 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
96 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
89 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
179 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
72 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
60 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
131 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
82 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
300 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
78 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
147 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
88 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
107 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
74 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
94 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
2answers
128 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
136 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
149 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
197 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 ...