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
11 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
18 views

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

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
1answer
60 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
26 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
41 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
17 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
26 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
52 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
1answer
30 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
0answers
66 views

*.3ds format support [on hold]

Does the *.3ds format support: texture animation and light? What is the best game engine to use with the lib3ds? (I want a low level game engine) (its for lerning) Thank you a lot for answering my ...
0
votes
1answer
69 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
45 views

Textures not rendering on part of Cube [on hold]

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
51 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
51 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
29 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
56 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 ...
0
votes
1answer
59 views

Question about SDL/OpenGL [closed]

I have to develop a small 3D C++ game, so i have been looking about the right choice of libaries that can fulfill my needs. I have some basic stuff 2D experience about SDl and OpenGl, so I know that ...
2
votes
2answers
132 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
77 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
45 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
31 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
80 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
29 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
61 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
186 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
61 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
30 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
30 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
45 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
60 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
43 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
279 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
46 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
33 views

Incorrect Texcoords for Bitmap Font? [on hold]

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
28 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 ( ...
0
votes
0answers
22 views

Encoding Floats to RGBA and Blending causing artifacts

I am using float packing to encode a float value inside a RGBA texture because I don't have access to float texture unfortunately. Here are the function I am using for encoding and decoding. inline ...
3
votes
2answers
582 views

Do resolution settings have any impact or give any advantage in online FPS games?

There is this crazy theory that has always bothered me. I am not after a technically but more theoretically (although technical knowledge is required to) answer; Two friends are playing the same ...
1
vote
0answers
41 views

Uniform Buffer Binding-points

I believe Uniform Buffers/Blocks has been the hardest thing to grasp in OpenGL. Hopefully this will be my final issue regarding this. I have created a uniform buffer that contain data of Light ...
0
votes
1answer
64 views

OpenGL Viewport inside of a Viewport

I'm creating a labyrinth in opengl, and I'm trying to create a minimap. For that, I thought of creating a viewport inside of a viewport. I already tried following a tutorial from Lazy Foo, and I can ...
1
vote
0answers
60 views

How can I do ambient occlusion for simple meshes with few vertices?

I want to do ambient occlusion for some simple buildings. Since simple buildings have very few vertexes, how can I get good results? Is it possible with a per-vertex AO implementation?
8
votes
1answer
620 views

Taking advantage of multithreading between game loop and openGL

Talking in context of a game based on openGL renderer : Let's assume there are two threads : Updates the game logic and physics etc. for the in game objects Makes openGL draw calls for each game ...
1
vote
1answer
47 views

Reference keyboard keys as “justPressed”, “pressed”, and “justReleased” with SDL in C++

I'm teaching myself 3D graphics with OpenGL and SDL in C++. I'm at a point where I need to be able to query states of individual keys, like so: if (InputManager::justPressed(SDLK_UP)) {} if ...
0
votes
1answer
27 views

Encoding Float to RG/RGBA and Blending

Encoding a float value inside a RG or RGBA texture is very interesting and useful but it is also become quite useless when you use blending as the result and the values might be altered because of ...
0
votes
0answers
46 views

OpenGL Omni-Directional Shadows Debugging

I'm working out making omni-directional point-light shadows for my game engine, and I can't get any of it to work. Here's some relevant code: Here's where I create the depth map, I make a cube map ...
0
votes
0answers
34 views

Assimp - generate tangents and bitangents

I have started using Assmip 3.1.1 in my OpenGL application. Let's consider a simple example. Here is obj triangle model: mtllib triangle.mtl v -5.0 0.0 0.0 v 0.0 0.0 0.0 v 0.0 5.0 0.0 vn 0.0 0.0 ...
0
votes
0answers
30 views

Trackball Rotation using Quaternions

I am trying to figure out rotations using quaternions. I am using a trackball that tracks the mouse when I click. So when I click on the right and drag to the left, the cube rotates around the y ...
0
votes
1answer
54 views

Render model with meshes with materials and/or textures

I'm making a model class that is using Assimp in the background. I want my models' meshes to be able to have a material and an optional texture on top of that. Right now I'm doing it like this: for ...