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

2
votes
2answers
53 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
29 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
49 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
19 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
16 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
27 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 ...
5
votes
1answer
401 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
18 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
41 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
53 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
33 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
52 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
8 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
80 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
12 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
47 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
37 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
31 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
54 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
53 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
298 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
41 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
30 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
89 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
51 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
71 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
94 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
49 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
52 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
37 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
31 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
84 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
69 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
24 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
37 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
49 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 ...
2
votes
1answer
22 views

LibGdx OpenGl prevent black part of Light mask texture from overlapping

I am using this masking texture for a dynamic lighting effect in my game: It looks beautiful until two lights begin to overlap: This is obviously because the textures are overlapping when I draw ...
0
votes
0answers
22 views

OpenGL Quad Tessellation - What kind of VBO?

I'm just getting into tessellation and after drawing and tessellating a triangle, I want to try a quad. If I change the TCS to output 4 vertices, the TES to expect a quad and the patch size to 4, only ...
0
votes
0answers
27 views

OpenGL- Render to texture- a specific area of screen

I implemented FBO on my OpenGL Game. and Im rendering what is rendered to screen to a texture, the problem is that rendering to texture starts from lower left corner. look: what is rendered to ...
0
votes
1answer
44 views

opengl matrix multiplication

Can someone provide some type of example of multiplying a 4x4 matrix without using loops? typedef struct matrix4 { data[16]; } m4; can someone provide a sample of how you you'd multiply two of ...
0
votes
1answer
25 views

glm Z coordinates are flipped

I am trying to render a 3D model using OpenGL. And for the projection and transformation matrices, I am using glm. I've got my model on the screen and it works just like I intended it to; except one ...
1
vote
2answers
69 views

How to find the “up” direction of the view matrix, with GLM

Using OpenGL and the GLM matrix library, I want to translate my camera relative to the world coordinate system. This requires me to compute the necessary view matrix. To initialise the view matrix, I ...
0
votes
1answer
25 views

Rotating the view around the origin of the world coordinate system

In OpenGL (using shaders), I want to implement a system that will take the user's mouse as input, and then rotate the view about the origin of the rendered scene. So, I need to compute the view matrix ...