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
3answers
41 views

How to create a seamless cubemap noise texture?

I have, so far, been able to create the vertices and UV coords etc for a sphere that would be textured with a cube map. I have also successfully loaded a cube texture from file and applied it to my ...
0
votes
0answers
32 views

Is Phong shading supposed to be so camera-angle dependent?

I'm not sure if I have a bug in my code or not. It seems like it's a bug, or at least a major shortfall. Here's two images of the same model at slightly different angles (by moving the camera): As ...
5
votes
0answers
39 views

Tone mapping and eye adaptation - pale colors and darker image

I'm trying to implement tone mapping along with eye adaptation and HDR. Actually I implemented this already but I'm not satisfied with result and I think that I made something wrong. My final image ...
2
votes
1answer
21 views

Rectangular area light illuminance - colour banding

I'm currently working on an implementation of rectangular area lights but I am having some issues with the illuminance calculation, which gives me serious colour banding across the entire lit area. ...
0
votes
0answers
32 views

Orthographic viewport zooming

I'm a bit new in opengl so please bear with me. I have a viewport window like this I have implemented zoom in/out features using the arrow keys. The problem is it zooms in and out with the whole ...
0
votes
0answers
17 views

Simple OpenGL ES Cube [on hold]

I have been trying to render a very simple cube using OpenGL ES. The code seems to be fine, but I am not experienced with OpenGL ES. I have been trying to learn it. It would be good if anybody could ...
0
votes
1answer
34 views

Parsing Blender exported collada file in c++

Since I could not find any libraries that can help me parse collada files in my c++/opengl project, I decided to write my own. (I did find assimp, but binaries for Visual Studio 2013 were't available, ...
1
vote
0answers
28 views

Confused About My Code Suggesting The Normal Matrix Is Equivalent To The ModelView Matrix

I'm learning environment mapping in OpenGL by following this page. In his vertex shader, the author calculates the vertex normal in eye space with the following code: nEye = vec3(viewMatrix * ...
0
votes
1answer
25 views

LWJGL 3, VAO and Shader not rendering [on hold]

X-post from Stack Overflow because its receiving little attention. I am using LWJGL 3 and Shaders with VAO's. My current implementation does not draw the VAO when using the shaders. However the VAO ...
2
votes
1answer
68 views

Blending vs Texture Sampling

I don't think this question has been asked before as I couldn't find any information about this on the internet. Lets say I want to blend two textures together: A texture containing the result of ...
0
votes
1answer
24 views

Java OpenGL Perspective matrix not working

I'm trying to render a simple triangle with OpenGL in Java using LWJGL3. Everything is working great, but the projection matrix (perspective) is not working. In C++ I just used to apply the ...
-3
votes
1answer
95 views

Licensing and commercial game development [on hold]

I am thinking about developing my game and have a few questions. I am going to use these softwares and libraries : OpenGL, Visual Studio Express, GLFW. I have publishing and selling my game in plans. ...
0
votes
0answers
25 views

How to convert Screen-space translation into World-space translation

private void Translate(SceneMouseMoveEventArgs args) { var camera = args.Camera; origin_screenspace = camera.UnProject(_position).Xy; cursor_screenspace = new ...
3
votes
2answers
100 views

Can I use the HD Graphics 3000's quad list primitive type via D3D?

I was studying some technical documentation on the Intel HD Graphics 3000 GPU, which I'm using as a lower-end reference for my 2D game engine. I noticed the hardware supports a nice "Quad List" ...
3
votes
1answer
42 views

OpenGL Framebuffer Object issue

I am struggling with implementing a proper Framebuffer Object . glCheckFramebufferStatus is returning me: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT (36054). What am i missing? GLuint fbo, rboColor, ...
3
votes
1answer
63 views

Why does glBindVertexArray sometimes fail (but mostly not)?

Quick outline: Test program that loads and displays big (3k x 4k) 16bit gray scale images (ca. 32MB). Using modern OpenGL (eg. 3.3 or so) with shaders VBOs VAOs etc. Running on Windows with OpenTK ...
-2
votes
0answers
71 views

wrong position triangle draw when port code from opengl v330 to v210 [closed]

im try learning modern open gl tutorial which is use open gl 3.3. then try applying VAO , VBO and EBO using texture data also. the triangle draws correctly in center. then try apply this using open ...
0
votes
1answer
65 views

OpenGL streaming from multiple windows

I am using GLUT library for my research/game. In my game I have 25 windows created using glutCreateWindow(title), and each of them have their own display callback registered using ...
0
votes
1answer
50 views

What's the correct way to move 2d sprites in opengl 2.1?

I'm getting into Opengl 2.1 and wanted to know how can I move 2d sprites. I already created my vbo and ibo, and the vertex data is already there. But, how can I move a sprite once it's already drawn? ...
0
votes
0answers
45 views

Trouble with Raycast Selection using OpenGL

I am currently having trouble with a custom model editor in which I want to implement model selection (eventually featuring face selection to have something like "click-and-drag" to extend the cubes). ...
1
vote
1answer
71 views

opengl : Running at least 25 windows with different Draw callback

I need to run at least 25 windows concurrently with each window rendering a different game state. I am storing all the 25 game states in the array of type GameState allGameStates[25]. For each of the ...
0
votes
0answers
42 views

WebGL Multiplayer Game - Direction Needed (Shaders) [closed]

I've started looking into making a multiplayer game for web browsers. I started with a book "WebGL Up and Running" and it has lead me to be more curious about more detailed aspects of OpenGL. In ...
1
vote
1answer
82 views

OpenGL VBO and VAO Confusion

I would like to present here my Question about VBOs and VAOs. Basically from what i understand you can have different VAOs each of which can contain up to several VBOs , and by binding to the VAO's ID ...
2
votes
1answer
61 views

Why does my simple OpenGL shadow map fail?

I want to render a simple shadow map for grass, where closer looks brighter and further looks darker, from the view of the light point. I can't get it to work. Here is the relevant code: //setting ...
1
vote
0answers
28 views

OpenGL enabled Java game not detected by Fraps

Recently I found out that I could enable OpenGL hardware acceleration in my java game with the line System.setProperty("sun.java2d.opengl", "True"); Initial tests showed a big boost in performance. ...
0
votes
0answers
27 views

Problem with glTranslate

I'm making a scroller learning from thebennybox tutorials. In his way of scrolling he does this each loop. public void render() { // glPushMatrix(); { // draw to center ...
1
vote
1answer
94 views

OpenGL: Draw an arrow

I'd like to know how to draw an arrow to represent a vector position, length and direction. The issue is that I can't quite find an easy way to know the location and rotation of the triangle ...
1
vote
1answer
41 views

OpenGL why point's size stay the same while zooming/unzooming

i'm currently working on a game engine for a college's project. While implementing some debug tools I came across a little problem. When i'm drawing point on the ModelView Matrix the point's thickness ...
0
votes
0answers
13 views

Stack matrix affecting shooting mechanics

I attempted to make a scroller game using parallax scrolling in LWJGL. Everything is fine but I'm having trouble with the matrix stack and the bullets. So basically when I shoot the bullet it moves ...
0
votes
1answer
53 views

How can I split up a large model into an octree codewise?

For collision detection, I am attempting to split up a large model into an octree. If we take this black thing thing to be the ship (104,000 vertices): Then I would like to split up the faces I ...
1
vote
1answer
50 views

How are CSS and WebGL coordinates related? [closed]

I'd like to build a simple framework which rendering combines web page DOM elements with WebGL, such that they're manipulable in the same coordinate space. How does the plain CSS coordinate system ...
2
votes
0answers
67 views

Does anyone know what technique was used in Minecraft to create shadows? [closed]

Specifically I want to know the technique used to render shadows under animals and players. I would like to create shadows like that for my own block game but I don't even know what to google. Any ...
3
votes
0answers
53 views

How to generate a RGB * a texture for a glow effect in GLSL?

I would like to create a glow effect in GLSL, there is a tutorial that explains how we multiply RGB * a : I have some questions : is it an operation that is in a fragment shader, where RGBa is ...
0
votes
0answers
32 views

How to build cubes with rounded edges [duplicate]

I am building cubes with a subdivision method (3 levels per face) Is there a method to round the corners of the edge? I want to warp my cube to a sphere with a animation. I know, that I can normalize ...
2
votes
0answers
50 views

OpenGL Planet Generation - Simple Matrix Issue (Planet “Spins” With Mouse)

I originally asked this question on StackOverflow & was directed here by a commenter. Im currently working on a OpenGL planet rendering. I'm using the Tessellation pipeline. So far things are ...
0
votes
0answers
59 views

Frustum Culling is incorrect

I have checked the other posts on here, but haven't found a suitable answer. I'm trying to implement frustum culling using the Gribb-Hartmann technique, but am running into a strange issue where ...
0
votes
1answer
30 views

Flipped model has wrong triangle order

I have list of models and transform matrix for each of them. Some of models are flipped along X or Y or Z axis. This meshes will be rendered wrong, back face is rendered instead of front. I tried to ...
2
votes
1answer
54 views

How to assign texture to shader?

In OpenGL, most shader uniform variables are easy, a float or a vec3 or whatever is associated with a shader program. But samplers are different, we associate a texture unit to the shader program, and ...
0
votes
0answers
37 views

Modern OpenGL, rendering multiple obj objects not working

I am currently working on a 3D Game Engine that loads a level from an OBJ file and renders it with OpenGL. My problem is related to understanding how to render each object individually when i have ...
1
vote
0answers
24 views

postprocessing shader destroying viewport on linux?

Basically I implemented gamma correction into a q3 based game to get rid of the annoying SetDeviceGammaRamp. On windows and macosx everything works fine, but on linux it draws garbage. It looks like ...
4
votes
1answer
173 views

How can I efficiently represent territories and their borders on a map like if it was a Risk board game?

I am exploring the idea of programming a territory control based RTS. These territories would be in 3D and I would like their colors to change when captured to represent the faction's color. I would ...
0
votes
0answers
20 views

Coordinate system in OGLdev tutorials

Working with OGLdev tutorials http://ogldev.atspace.co.uk/ I found that this code uses coordinate system, which doesn't look like in most other samples. Positive x-axis direction is left, and not ...
0
votes
0answers
36 views

Looking through transparent voxels doesn't show other blocks

In my voxel game, looking through the transparent water blocks can sometimes cause blocks in other chunks not to show. The water is in its own VBO, and the face facing the other chunk (in the ...
0
votes
1answer
48 views

How to use multiple custom vertex attributes in OpenGL

My code currently uses glBindAttribLocation and glVertexAttribPointer to specify two custom vertex attributes in indices 6 and 7. This seems to work fine, but I wish to add another attribute and no ...
3
votes
1answer
66 views

OpenGL Indexed VBOS?

I'm a little confused with using indexed vbos in opengl. I understand that different each vertex can only have one uv. How would it be possible to map a texture onto a 3d object if you can't "unwrap" ...
1
vote
1answer
42 views

Runtime resolution changing with GLFW3

I've been trying to figure out the correct method for changing the resolution/fullscreen state of a GLFW window for a while now, but after searching all I found were references of how to do it with ...
2
votes
1answer
117 views

Why encode floats in RGBA?

Working on some effects that require depth (Z) data in Unity, I saw that these use a method to store the depth data encoded in the RGBA channels of a regular texture. half4 frag(v2f i) : SV_Target { ...
5
votes
2answers
259 views

How does glRotate affect the axes of the global coordinate system?

I am currently playing around with 3D transformations applied on a 2D context in LWJGL, to later be implemented in my game. So I managed to set up LWJGL well enough (scaling, translating, scaling and ...
1
vote
0answers
26 views

Compiling glfw application mingw [closed]

I am trying to compile a glfw application on mingw. I am using 64 bit windows and 32bit mingw compiler And I have downloaded 32 bit binaries from http://www.glfw.org/download.html I am trying do by ...
0
votes
0answers
44 views

OpenGL Shader Storage Buffer Objects array length problem

Ok guys, I think I have a very strange problem. I have an old laptop, but its HD 6370M currently supports opengl 4.4, so i decided to learn how to use some new features of this platform, so after ...