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

LWJGL 3, VAO and Shader not rendering

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
0answers
28 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
17 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
89 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
24 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
93 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
39 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
65 views

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

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
63 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
48 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
44 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
70 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) [on hold]

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
77 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
59 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
26 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
88 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
40 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
52 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? [on hold]

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
66 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 ...
2
votes
0answers
45 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
46 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
56 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
27 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
35 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
171 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
19 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
35 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
64 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
114 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
258 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
25 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
39 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 ...
0
votes
1answer
51 views

Should I update VAO when I update a VBO?

My VAO/VBO/IBO work fine on iPad and other devices on Android excepted two (A Samsung galaxy S4 and a Sony Xperia S). A problem is present when I start my application on this devices, every elements ...
11
votes
3answers
252 views

Rotate object around fixed axis

I am trying to let the user of my app rotate a 3D object drawn in the center of the screen by dragging their finger on screen. A horizontal movement on screen means rotation around a fixed Y axis, and ...
2
votes
0answers
39 views

Rendering text with SDL2 and OpenGL

I've been trying to have text rendering in my OpenGL scene using SDL2. The tutorial I came across is this one Rendering text I followed the same code, and I get text rendering fine. However the issue ...
1
vote
0answers
33 views

Performance issues with different types of uniform buffer

I've tested different buffer layouts, because I'm confused about some performance issues. That are my test buffer (OpenGL 4.1, GLSL 410, GT 750M, MacBook Pro): Test #1: Using fixed struct buffer with ...
-2
votes
1answer
72 views

Collision Detection in OpenGL

For a 3D Game using OpenGL i have to implement a simple collision detection. After thinking about that, i have had the idea to read out the glm::mat4 MVP values and compare them to each other. Is that ...
0
votes
1answer
55 views

How to use a buffer in GLSL to do a LUT-lookup?

I am currently on a medical application which needs different kinds (up to totally individual) lookup tables (LUT) for image display. And this done with 10bit finish. So it is most of the time ...
0
votes
0answers
48 views

Pre- or post-multiplication for rotation between coordinate frames

I have three 3D coordinate frames: O, A and B, as shown below. I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move ...
0
votes
0answers
14 views

converting HSLS gives error

I'm using the following parser: https://github.com/unknownworlds/hlslparser I also have the following code: /* * Bo Sun, Columbia University, All rights reserved * ...