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
1answer
36 views

Is Frustum culling still needed today?

I'm reading about efficient Frustum culling algorithms. I found an article about a smart method that first use the Frustum AABB (Axis Aligned Bounding Box) to eliminate most of the scene before check ...
0
votes
1answer
36 views

Binding and unbinding, what would you do?

Let's assume the following example creation: glBindVertexArray(vao) glBindBuffer(GL_ARRAY_BUFFER, vbo) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices) // Filling up buffers ...
0
votes
0answers
21 views

GLFW - Selecting an OpenGL Context before showing the window

I want to know how i can select an opengl context before displaying the window I have two different machines. One is opengl 3.1 and the other is opengl 3.3. I want to be able to select the context ...
0
votes
1answer
31 views

Shadertoy getting help moving to glsl

I spent some time writing a shader on shadertoy but now, when I try to translate my code to opengl I don't know how to calculate the uv that they describe as like this: vec2 uv = fragCoord.xy / ...
0
votes
0answers
60 views

C++/OpenGl/SDL/Cmake Beginner curiosity [on hold]

and this is my first time in this forum. I just want to ask for an advise in here, I just dont know where to start. hopefully you can understand and help me. I want to start with a small game project ...
4
votes
1answer
59 views

Dual paraboloid shadows on GLSL

I'm trying to port an XNA example to OpenTK + OpenGL, I found it here http://graphicsrunner.blogspot.com.es/2008/07/dual-paraboloid-shadow-maps.html But I'm having a really hard time, I think my maps ...
1
vote
0answers
24 views

Create texture atlas from loaded textures - OpenGL LWJGL Java [duplicate]

In my program I have objects with different textures, that are in the same vbo. I cant have an array of samplers in my shaderprogram, so i have to use a texture atlas. I have seen some ways to make a ...
3
votes
2answers
96 views

Which consoles may I target with OpenGL?

I'm thinking on technical design for a game/game engine using OpenGL, and I wonder if there is any recent consoles (Xbox360, PS3, Wii U, Xbox one and PS4) that I could work with if I do so. I found ...
2
votes
1answer
43 views

Underwater Shader Animation Help

I found an underwater (distort) effect and I got it to work but somehow I cannot make it animate given the offset here: Fragment Shader code: uniform sampler2D fbo_texture; uniform float offset; ...
0
votes
0answers
54 views

Octree Frustrum Culling

times came when i had to implement some culling into my engine. I started by reading some stuff and so far so good. I managed to create an octree which can effectivly divide my geometry's vertices ...
1
vote
0answers
24 views

Vbo 3d triangle opengl w/ LWJGL

So i am using lwjgl, took me about 4 hours of hard work to achieve triangle rendering and vbos, now i want to render a triangle in 3d space. I know you have to use projection matrices. But when i have ...
0
votes
1answer
17 views

Using glm to rotate the modelview matrix based on the cursor position

I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
0
votes
0answers
22 views

OpenGL Black rectangle in rendering texture

I create textures (for example, I just fill the texture color), and render their. But, for some reason, to the upper edge added black rectangle. Screenshot: var Textures: array of GLuint; ...
2
votes
0answers
28 views

OpenGL Depth Cubemap with Geometry Shader Not Rendering Correctly

I was having some trouble with cubemaps in OpenGL, and was hoping to get some help. I've been following a tutorial about point light shadow mapping using cubemaps, where a geometry shader is used to ...
6
votes
1answer
426 views

Multithreaded Game Loop

I'm trying to implement a multithreaded game loop. I already did that but had to use a few locks for that, which ruined the performance. After researching a bit I came up with this idea: Instead of ...
0
votes
0answers
19 views

Trouble texturing isometric tiles with tilesheet: OpenGL

I don't know if I am just... not seeing something here. I have been working on this for quite some time trying to get it functioning. I have used sprite sheets and texture coordinates before - so I am ...
0
votes
1answer
43 views

Beginning on animations

I am clueless with regards to animations. I have a simple rendering engine that renders models, sprites, skyboxes and whatnot; but everything is simply static with no animations whatsoever. With my ...
1
vote
1answer
58 views

Greedy Mesh generation for a voxel-based game

EDIT: I have already found my problem and fixed it (but I cant accept my own answer for another 2 days) I'm currently making a 3D voxel-based game and now that I have started optimising some aspects ...
1
vote
0answers
39 views

Set Render Target usage

I am using Unity and I have some difficulties about understanding the way Set Render Target works and how it can behave with the shaders. Is it possible to render a shader pass in multiple render ...
0
votes
1answer
57 views

How to wrap textures inside shader GLSL

I'm trying out GLSL and one of the problems I'm facing is wrapping a random texture sampler in the shader. Searching for answers on the web first, this leads me to using these commands: ...
1
vote
1answer
30 views

How to correctly specify the offset in a call to glVertexAttribPointer()?

I'm trying to draw a simple triangle using the following vertices: std::vector<VertexFormat> vertices; vertices.push_back(VertexFormat(glm::vec3(0.25, -0.25, 0.0), glm::vec4(1, 0, 0, 1))); ...
0
votes
0answers
10 views

Using AWT with LWJGL on OS X

The VM argument -XstartOnFirstThread is required for LWJGL to work on OS X. Anything in the java.awt package freezes the JVM when used with the VM argument -XstartOnFirstThread. E.g. ...
0
votes
0answers
83 views

How do I extract the right information from my projection matrix for frustum culling?

I've tried several different tutorials for Frustum culling, however I cannot understand them. Here's my function that sets up my projection matrix (someone else helped me with this, but I don't know ...
1
vote
0answers
13 views

OpenGL (lwjgl) Frame Buffer Object GL_COLOR_ATTACHMENT Not Being Written To

I am currently developing a deferred renderer for my game engine and I have to output multiple textures from my shader to my GBuffer. I have been struggling with getting multiple outputs from the ...
1
vote
3answers
50 views

OpenGL, GLSL, Modify Background Fill via Fragment Shader

I have noticed that fragments rendered by the glClearColor() method do not pass through shaders. However, I'd like to modify these fragments using my fragment shader. Is there any way of forcing them ...
2
votes
0answers
44 views

equirectangular panorama rendering?

I want to render my scenes as equirectangular panorama frames. I can get the angular fisheye which is what I actually need by applying the rendered frame as a texture to a correctly UV mapped circle. ...
0
votes
1answer
16 views

Using gl3w and Win32 api, without glut

I'm still a beginner, the example on skaslev's site require us to use glut as an interface to create a window. For some reason, I'm required to create a window purely with Win32 api, but I am not ...
0
votes
0answers
52 views

OpenGL strange lighting/model problem

I've made a .obj reader in c++ and I've tried rendering some models. I've got the whole concept from here: ...
0
votes
1answer
36 views

Can't draw lines in 2D space with GLFW and OpenGL

I'm trying to draw a grid in 2D space using GLFW and OpenGL but for some reason I only get this on the screen: Here's my code: #include <GLFW/glfw3.h> #include <stdlib.h> #include ...
0
votes
1answer
56 views

Raypicking / raytracing in OpenGL

Alright, so before you down vote saying that OpenGL doesn't support rays for rendering, please read: So I want to detect a quad in opengl 1.1( I don't want to use opengl 3.0). I wanted to detect it ...
1
vote
1answer
58 views

Rendering Performance: num Draw Calls == num Texture Bindings

I'm making a game with Libgdx 1.6.4 and experience some lag issues on iPhone 4 and then discovered: // in the constructor GLProfiler.enable(); ... // in the render method Gdx.app.debug("draw ...
4
votes
5answers
311 views

How can I render “two-sided” clouds like in Minecraft?

The clouds in Minecraft are semi-transparent and are rendered on both sides. If you fly into the cloud you can see inside of the cloud. If I render clouds the inside faces would be visible on the ...
1
vote
2answers
42 views

Problem passing variables in fragment shader

I'm trying to pass a point light from an array to a CalcLight function in a fragment shader. It works when I hard code in the value, but not when I use a loop. Here's the code: #define TOTAL_LIGHTS ...
2
votes
1answer
32 views

Stencil buffer VS conditional discard in fragment shader

I have a continuous height-mapped mesh to represent landscape. I also have 1 to let's say 10 wells on this landscape represented by additional models. What I want to achieve is to create an illusion ...
1
vote
3answers
93 views

GLSL shaders work when hardcoded, not when loaded from file

I am trying to learn OpenGL. I have a main.cpp where I create the vertex and fragment shaders as strings, compile and link and it works fine. When I try to load the identical shaders from text files, ...
0
votes
0answers
28 views

Having trouble running OpenGL on MSVC

I'm using the OpenGL Programming Guide, 8th Edition with MSVC 2013 but I can't get the triangles.cpp file to run. These are the errors popping up: http://puu.sh/jAokn/c07420cf46.png
3
votes
1answer
52 views

Multiple semi-dynamic objects in one VBO

I am working on a game that uses opengl 3. The huge geometry is spread over a grid of about 270,000 cells. The geometry in each cell, though not very frequently, can change independently from other ...
1
vote
2answers
73 views

OpenGL what is VBO and when to use it?

So I am currently creating a game based on static voxels, there is no manipulation of voxels, which allows me to optimize it more. Now, my friend was kind enough to teach me modern OpenGL. Currently ...
1
vote
1answer
97 views

Setting up an efficient OpenGL rendering loop

This is the code that I use to setup my shader char* vertexShaderSource = getResource("vert.shad"); char* fragmentShaderSource = getResource("frag.shad"); vshad = readFile(vertexShaderSource); fshad ...
0
votes
0answers
51 views

Bringing over OpenGL code to unreal engine?

So I've been developing games and apps in C++/OpenGL for a while, and am thinking of starting to use Unreal Engine for many things. I've built up quite the huge libarry for UI / rendering related ...
0
votes
1answer
56 views

Setting up a Visual Studio project for OpenGL and OpenGL ES

I want to make a small game with OpenGL and glew for desktop, android and web. So far I know how to set up a project for opengl and a project for opengl es but I would like to have the game source ...
0
votes
2answers
41 views

Array of 3d points, construct point cloud or surface (OpenGL)

I have an array of 3 dimensional point objects, I can manipulate the input into this array into any configuration I want, for example, it could be a vector of floating point numbers, a vector of ints, ...
1
vote
1answer
33 views

Cubemaps turn black OpenGL GLSL Java LWJGL

Recently I tried to add cubemaps to my 3D-rendering engine. The objects with a cubemap now turn completely black. This is how I load my cubemap: public static int loadCubeMap(String filename) { ...
2
votes
3answers
86 views

Developing a game using opengl [closed]

Hello Everyone, I want to create a game using OPEN GL to learn basics of the game development. I know C++ and OOPS and can manage the coding. I have tried using the free engines on the ...
0
votes
1answer
74 views

Render Queue Sorting, HOW?

Recently I'm trying to implement a render queue sorting system, i.e., ordering my renderable objects in an array in such a way that the overhead of OpenGL state changes are minumum. After some ...
0
votes
0answers
27 views

Resolution of textures in OpenGL [duplicate]

I load texture from PNG file and render their using OpenGL. But I found the manual, what texture resolution must be divisible by a power of two. If I use a texture with a resolution of 800x600 pixels, ...
1
vote
1answer
50 views

What kind of issues should I watch out for or avoid when using JOGL(OpenGL Java bindings)? [closed]

I am completely new to OpenGL, but have a very good basic foundation in Java. I've set up Eclipse with the most recent version of JOGL recently, having found it to be, of what I as a beginner ...
0
votes
1answer
26 views

Processing through multiple shaders (LWJGL/Java/OpenGL)

Very simple question: Is it possible to process a vbo through different shaders? If so, how? What I want is sth like this: reflectionShader.bind(); //starts shader reflectionShader.load(some_values); ...
0
votes
0answers
39 views

LWJGL 3 - Random Sprites Don't Blend

Some of my sprites don't "Blend" in with tiles behind them Z-wise. glEnable(GL_DEPTH_TEST); Depth testing is enabled and works. glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, ...
1
vote
0answers
51 views

How do you fix wobbling shadow edges?

I've implemented an omni-directional shadow map and I've noticed a rather unwanted behaviour on the shadows. It seems like when the angle between the occluded points and the light source is really ...