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

How to compute matrix transform local/world on OpenGL

I'm developing an OpenGL program where each object / entity contains m_WorldPosition, m_WorldOrientation, m_WorldScale and m_WorldTransform (Vector3, Quaternion, Vector3 and Matrix4f). The problem is ...
2
votes
2answers
86 views

Opengl Quad Tessellation Control Shader

I have the generic tessellation evaluation shader for triangles but I need to make it work for quads. Is there any chance someone could explain what is happening here and point me in the right ...
0
votes
1answer
70 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
0answers
13 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
35 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 ...
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
1answer
181 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
0
votes
1answer
35 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
1answer
74 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
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
89 views

Trying to implement Camera

I'm trying to implement a Camera class in order to walk and look on the world as follow: #ifndef _CAMERA_H_ #define _CAMERA_H_ #include <glm\glm.hpp> class Camera { public: Camera(); ...
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
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
0answers
13 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
44 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 ...
4
votes
2answers
2k views

Where and how to smooth a voxel-based terrain surface?

I want to smooth the blocky terrain in a Minecraft-like world. The smoothing affects visual appearance and physics but not the logic of placing and picking blocks. I have my mathematical formula to ...
2
votes
1answer
1k views

smooth shading vs flat shading, what's the difference in the models?

I'm loading the exact same model with Assimp, except one is exported from Blender, shaded smoothly, and the other was exported from Blender, shaded flatly. Here is my results from loading both into my ...
2
votes
1answer
89 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 ...
0
votes
3answers
766 views

OpenGL - How to draw a transition of two textures on one quad?

I know when drawing a rectangle, if we select red and draw two vertices, and then select yellow and draw the other two vertices, the entire rectangle will show a nice transition of color between those ...
0
votes
2answers
370 views

OpenGL - How can I make the edges of this textured circle smoother?

I'm building a game and I've applied a certain texture (RAW file) to a circle (GL_POLYGON) in OpenGL. It loads correctly, with the right size and all, but the edges seem a bit jagged and I would ...
2
votes
2answers
92 views

How to smooth mask texture edges correctly regardless it's size

I have a texture intended as a mask. The texture type is GL_R32F (32 bit float) and the data inside is a signed distance field (= value of each texel is distance to nearest mask edge). For test ...
0
votes
2answers
69 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 ...
0
votes
2answers
36 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?
-1
votes
0answers
25 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, ...
1
vote
2answers
114 views

Problems with rendering a SkyBox

At the moment I'm writing an Android OpenGL ES 2.0 game but now I get stuck on rendering a SkyBox. Here is my (a bit simplified) code for the SkyBox: float vertices [] = ...
0
votes
1answer
50 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 ...
-1
votes
1answer
138 views

Slick2D ingoring aplha channel?

When I use the draw method inside a image, it completely ingores the alpha channel and fills it in with white. Is there a way I can draw it where the alpha is see through like it's suppost to be? I ...
3
votes
1answer
210 views

Using textureGrad for anisotropic integration approximation

I'm trying to develop a real time rendering method using real time acquired envmap (cubemap) for lightning. This implies that my envmap can change as often as every frame and I therefore cannot use ...
0
votes
0answers
20 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
162 views

Application of classes with critical non-static fields in LWJGL

I'm going to be as specific about this question as I can. Ultimately, how is it that I apply a class that uses non-static fields in LWJGL? More specifically, I know that OpenGL is quite nearly more a ...
6
votes
2answers
3k views

In OpenGL, how can I discover the depth range of a depth buffer?

I am doing a GL multi-pass rendering app for iOS. The first pass renders to a depth buffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. ...
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
44 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 ...
1
vote
1answer
62 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
0answers
67 views

*.3ds format support [closed]

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 ...
2
votes
1answer
221 views

How do I use unpackHalf2x16?

I'm trying to use (un)packHalf2x16, without success so far. I'm drawing with: glVertexAttribIPointer(0, 2, GL_UNSIGNED_INT, 0, 0); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, vbo); ...
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. ...
0
votes
2answers
218 views

Calculating Projectile Movement

I'm having some trouble putting together a method that will constantly move a "bullet" in the same direction accurately. Here is what I have so far public Vector3f moveFromPosition(Vector3f location, ...
1
vote
1answer
185 views

Why does my depth test fail on Nvidia cards?

I sent a test version of my in-development game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia cards. I'm using LWJGL. I use my own matrices and send them ...
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 ...
1
vote
1answer
85 views

Problems with texture orientation in space

I am currently drawing texture in 3D space and have some problems with it's orientation. I'd like me textures always to be oriented with front face to user. My desirable result looks like ...
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
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
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 ...
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 ...
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 ...
0
votes
1answer
183 views

OpenGL Transform Feedback output size

I'm working on a particle system using transform feedback, and I would like to know if it is possible to render to anything other than floats, like halfs, using Transform Feedback (OpenGL 3.3)? It ...