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

Z-Value of clip-space position is always 1.0

I render a lot of quads on the screen into z direction (20 x 2000). I want to get the depth value in a final render target. But it looks like z is always 1.0f. I checked the result with the OpenGL ...
0
votes
0answers
19 views

Transformation order for augmented reality game using OpenCV and OpenGL

I'm trying to create a simple AR application where I'm augmenting the camera image of a Kinect with virtual objects that are tracked using an optical tracking system. The following picture ...
0
votes
2answers
40 views

How animate objets seperately?

I've set up a simple scene with some triangle and quads. With glPushMatrix() and glPopMatrix() i achieved to move an object to a new position, relative to another object in my render scene, but what ...
0
votes
1answer
32 views

Getting the real fragment depth in GLSL

I am trying to write a simple GLSL shader that just renders the real (not normalized) depth of a fragment as a floating point value. So far, I've figured out how to get the depth of a vertex, and ...
0
votes
1answer
38 views

Distortion problem with perspective projection

For various reasons – partly educational, partly technical – I'm writing a 3D game engine from scratch, using OpenGL 3.0; aiming for Core Profile, eventually, so of course I'm using a custom matrix ...
0
votes
0answers
14 views

Perspective Projection Far Plane Not Clipping?

I've just discovered that far away objects in my world don't seem to clip like they should with a perspective projection matrix. When I fly far away from my main landscape, so that I am much more ...
0
votes
0answers
28 views

How to create custom cubemap images?

I managed to use cube maps in OpenGL to get reflection and refraction effects. So far I used images from this site, however, I want to create my own set of images to use in a cubemap, the idea is just ...
0
votes
1answer
78 views

OpenGL 4.3 in C++ : Drawing static Triangle (“Hello Triangle”). Color does not appear (Triangle is just completely white)

I am going through an OpenGL book trying to get the examples to work. I am using Glew, Glfw, and that's it beyond Opengl 4.3, which my I know my graphics card supports completely via the OpenGL ...
0
votes
0answers
45 views

OpenGL shaders with OOP languages and game engines [on hold]

Is it okay to encapsulate all the dirty shaders codes inside a class object, and then let the user call easy methods such as Render()? I've done this with a simple Skybox object and I wonder if this ...
0
votes
1answer
72 views

Java LWJGL - Monster follow script not working properly

I have written a script to be set off whenever a player is within a distance of the monster. The script checks if the x position is greater than or less than the players x, and same for the z. (y is ...
0
votes
2answers
70 views

How does rendering with Swing compare to rendering with openGL?

[summary: Is the performance of Swing at least in the same dimension as openGL [through LWJGL]? If yes, what percentage would you give it? What possible other problems can I expect from Swing in the ...
2
votes
1answer
91 views

What are some ways of making a game engine centered around the idea of drawing vector lines and polygons only? [on hold]

I've always loved the look of games that just use simple lines and polygons for graphics. Rez is one of my favorite games, visually. I'm a programmer and designer first and foremost, and I'm horrible ...
-1
votes
0answers
26 views

GLEW doesn't work [on hold]

I included both "glew.h" and "glew.c" and compared to earlier attempts, i don't get errors when i compile and run my project, that contains code depending on GLEW. The result is not what i want, ...
36
votes
3answers
3k views

Why do tutorials use different approaches to OpenGL rendering?

http://www.sdltutorials.com/sdl-opengl-tutorial-basics http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ These two tutorials use completely different approaches to ...
0
votes
1answer
52 views

In OpenGL what's quicker, lots of smaller VAOs, or one large one updated each frame?

In my game engine, a mesh can be made of many submeshes. These submeshes may or may not share vertex data with the rest of the mesh, if they don't they have their own vertex data array. I've noticed ...
0
votes
0answers
24 views

Does Scala need to use LWJGL or something else? [closed]

I'm trying out scala because of it's really neat features and its open source. Do I need to use LWJGL or something else for OpenGL development?
1
vote
2answers
132 views

Tiled Rendering - Projection matrix

I'm trying to figure out how to perform tiled rendering of my 3d scene (OpenGL). The motivation is to cut the scene up into several textures, combining them into a single image for saving at a very ...
0
votes
0answers
34 views

OpenGL not rendering to correct target

I have a fbo, with 8 textures in it (g-buffer). What I'm trying to do, is to render all information from opaque objects to first four(color, normal, position, depth), and info from transparent objects ...
0
votes
0answers
45 views

A simple “beam tracing” simulation

I am trying to implement a simple beam tracing simulation. Basically it models the path of a beam within a pipe: In the picture, the beam starts emitting from p1, hitting the boundary at p2 and ...
0
votes
1answer
18 views

GL_SPOT_CUTOFF not working properly

I'm new to OpenGL. I'm studying OpenGL 2.1 and I'm trying to make a little program to test the GL_SPOT_CUTOFF property, but when I set a value between 0.0-90.0, the light doesn't work and everything ...
0
votes
0answers
29 views

Java LWJGL - How can I click to interact with objects?

I want to be able to click on a monster to walk to him and start attacking him. The part that doesnt make sense to me is the conversion between the mouse position, and the actual terrain position. ...
1
vote
1answer
64 views

Where can I find OpenGL state changes profiling?

Is there any benchmark that actually measure state changes cost in OpenGL 3.x/4.x and gather an average statics for all graphics cards? (I don't want to optimize only for my old AMD card, I'm not even ...
0
votes
2answers
37 views

How to render apart blocks of a cone

in OpenGL I want to render a cone in parts like on the image. My problem is to calculate the arc of each block in 3D space. has someone an idea how to handle this?
0
votes
1answer
74 views

Normal Mapping issue

The first image shows a spotlight shining correctly on the floor. The second image shows the same spotlight but rotated 180 degrees. The first is correct, the second is not. The third image ...
0
votes
1answer
47 views

Textures not rendering on part of Cube [closed]

Hello all I have been trying learning opengl and have rendered a colorful cube and decided to texture it, now when I run the program the textures render on all of the faces except for the back face ...
0
votes
1answer
53 views

OpenGL 4.4 LWJGL - How can i render text to the screen

I have been told that you need to create a texture atlas for the font, and individually assign each character to a texture and add them up to create the string you want to produce. This seems a little ...
1
vote
1answer
55 views

Problem with SLD/OpenGL

I've started to do sth. with SDL/openGL, but I haven't managed to get this tutorial running yet (http://www.sdltutorials.com/sdl-opengl-tutorial-basics). Since this tutorial, or most tutorials at ...
0
votes
0answers
31 views

Maximum tile and texture size for tiled maps

I'm currently making a game using libGDX and Tiled. Everything was running fine until I changed the tile size from 96x96 to 300x300. Most layers are still displayed correctly but the tiles of a ...
0
votes
1answer
59 views

Manipulating vertices after multiplication with MVP matrix (OpenGL)

I'm making a collage of lots 16x16 renders on a 512x512 texture, of the same scene, from various viewing positions and angles, preferably lots of times per second. I've profiled my program (which ...
2
votes
2answers
144 views

What are my options other than game engines? [closed]

I'm a programmer. I've experience in Java, python, and c++. I see that some big games are built using game engines (Crysis uses Cryengine). However, other don't (Bayonetta for example). what's their ...
4
votes
1answer
80 views

Textures “don't work” when I don't specify any texture parameters. Is this a driver bug or intended behavior?

Whenever I try to use textures, I have to at least specify the sample filtering parameters (GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER) for textures to work at all. If I don't, sampling the textures ...
0
votes
1answer
48 views

OpenGL rendering to multiple windows, having 1 main loop for each window

I have written a little OpenGL framework in the past year that i would like to extend to support multiple windows in the near future. I have an idea about what I would like to do but I am not sure if ...
8
votes
2answers
2k views

How to make natural looking voxel

I'm developing a voxel game, but I think I use the wrong technique. I currently use flat tiles, to make blocks, and I think theres a better and more efficient way. I have seen a voxel game, which ...
1
vote
1answer
32 views

Handle vertex indicies in a vbo batch drawing call

I'm new in the OpenGL 2 world and want to render a lot of cubes (> 150.000). How can I render such kind of cubes in practise? My idea is to split the cubes to a set of vbo's (Maybe 2000 cubes per ...
2
votes
1answer
84 views

Signed Distance Fields: How are different colour channels used to improve output of sharp corners?

The naive approach to implementing signed distance field font rendering suffers quality issues where sharp corners get softened (either outward- or inward-facing corners, i.e. convex or concave ...
0
votes
1answer
33 views

Compress 16 bit raw data in webgl

I have a 3D volume where every voxel is 16 bits. Is there anyway I can use some kind of compression to store the data so I can use less video ram? Webgl supported different compressiosn if you enable ...
0
votes
0answers
21 views

Does the on-screen size of object change with the direction of camera?

I'm reading the following document, and on page 3 it says: The first thing to notice is that the desired projection on the screen does not change with view direction. That is, whether the screen is ...
1
vote
2answers
62 views

Difference between Spherical Harmonics and Spherical Harmonics Lighting

What is the difference between Spherical Harmonics and Spherical Harmonics Lighting in OpenGL?
2
votes
3answers
197 views

Generating 3D-like effect

I'm making a 2D sidescroller game and want to give the blocks a 3D like effect. This way it looks like the player is walking on 3D blocks while walking on a 2D plane (thus having only x,y ...
1
vote
1answer
62 views

Shader - Realtime texture masking

The first thing that comes in mind is masking using RGBA values. With this you can obtain this kind of textures and this kind of results. But with this, you can only store up to 4 masks inside a ...
0
votes
1answer
34 views

GLSL: Incompatible Types at Initialisation (and no available implicit conversion)

I'm recieving the following error when compiling my GLSL shader: Incompatible types in initialization (and no available implicit conversion) It occurs on line 94: int shadowMap = ...
0
votes
1answer
62 views

Intersperse 2D with 3D opengl

I want to be able to draw 3D objects as well as 2D objects in an openGL environment. Normally, I would draw my 3D stuff, disable the depth buffer and depth mask, then draw my 2D stuff. However, this ...
0
votes
1answer
31 views

Edit VBO data or create a new one?

I have a question: if I have a VBO, and I have to change all the data inside it (because of resizing, ...), would it be more efficient to delete the old one and create a new one (and reallocate the ...
0
votes
2answers
53 views

Resizing a Framebuffer Object (ie: its attachments) on Screen Resize

I have been experimenting with some post-processing effects and I have been using FBOs to store stuff. The problem is, I attempt to resize them when I change resolution. I get no errors, however the ...
0
votes
0answers
69 views

OpenGL - Arcball camera rotation

I'm implementing arcball camera rotation, whereby a camera is looking at a coordinate and rotates around it in the x-axis or the y-axis such that the camera is circulating around it; the y-axis will ...
2
votes
2answers
44 views

How do find the right GLxx object for a given function in LWJGL?

I'm just starting to learn the fundamentals of OpenGL via LWJGL. Every OpenGL function is implemented as a method on a GLxx class. The xx corresponds to the version of the spec when that function was ...
1
vote
2answers
286 views

C++, OpenGL: Building a polyhedron via geometry shader

I'm stuck with geometry shaders in OpenGL - c++ programming. I want to create simple cube by repeating 6 times drawing one rotated wall. Here is my vertex shader (everyting has #version 330 core in ...
0
votes
1answer
49 views

Reasonable texture Formats for VertexTextureFetch in GL

Wich is a reasonable GL version that have support for vertex textures fetchs(VTF) in OpenGL ? (for example GL 3.0, 3.1, 3.3) What textures formats should I expect to be supported in average video ...
1
vote
0answers
36 views

Incorrect Texcoords for Bitmap Font? [closed]

I am writing some code to display text using a bitmap font. However, when I run my game to see my results, I am greeted with a blank screen. I changed the texture to pure white to see if it was even ...
0
votes
0answers
29 views

opengl fixed function pipeline rendered transparent object with black edge

As you can see from the image,it's a transparent object with a png file,then I render it before call : glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glEnable ( GL_BLEND ); glEnable ( ...