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

Instanced rendering with ARB_vertex_attrib_binding

I'm trying to separate the vertex format specification from the vertex data. I was able to do that for the mesh vertices successfully. For instanced rendering I wanted to further separate the instance ...
0
votes
1answer
348 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
1answer
34 views

glGenBuffers is NULL

I'm using GLEW 1.13.0, (GLUT), SDL2 and OpenGL 3.3 core. #include <GL/glew.h> #include <GL/glut.h> int main(int argc, char* args[]){ Engine::init(); // Initializes SDL_GL_* attributes ...
1
vote
2answers
229 views

Fragment shader compiling in webGL but not in OpenGL

I am programming in Haxe (language compiling to multiple platforms) and I have written some shaders. My fragment shader runs fine in html5, but when I try to compile for native (OS X and/or Neko, a ...
4
votes
1answer
157 views

OpenGL(Libgdx) - How to texture a 2D terrain surface?

I want to texture the surface of my terrain. I have created the ground mesh and surface mesh separately and everything is okay for ground mesh. But I couldn't texture the surface mesh correctly. As ...
1
vote
1answer
90 views

OpenGL App not setting cursor position appropriately

I have written a small application using OpenGL, and have implemented some rudimentary camera controls. Unfortunately, I cannot get the application to set my cursor position correctly. The cursor is ...
3
votes
1answer
67 views

When should i use GL_TRUE or GL_FALSE values?

When using GLboolean, should i just use true and false or should i use GL_TRUE and GL_FALSE, when should i prefer using GL_TRUE and GL_FALSE? or maybe i shouldn't care at all (Because both works)? ...
0
votes
0answers
17 views

What ways can I draw a single pixel or single fragment with Modern OpenGL? [duplicate]

I've been researching around the internet looking for ways to plot a single fragment or single pixel which ever is more usable for the case I will present now: I want to plot a pixel every click of ...
1
vote
0answers
58 views
+50

Android OpenGL Sprite Component Pattern

Ok so I have a 2D OpenGL project that was originally a class assignment, and now I am using it to experiment with and to broaden my knowledge. Originally, I had been using the Normalized Devices ...
5
votes
1answer
431 views

OpenGL Fast-Object Instancing Error

I have some code that loops through a set of objects and renders instances of those objects. The list of objects that needs to be rendered is stored as a std::map>, where an object of class ...
1
vote
1answer
42 views

Rendering issues in Monogame when using shaders

I am currently fiddling with Monogame, trying to work with Shaders and I have encountered a really weird issue. If the first ever draw in the application's lifetime is with a custom shader all further ...
3
votes
1answer
58 views

Just how expensive is it to bind textures in OpenGL? (LibGDX)

I'm using LibGDX on top of OpenGL and currently my game engine does something along the lines of the following per frame Bind a terrain texture sprite atlas and a set of transparency masks in ...
3
votes
2answers
117 views

How to hide a post-processed mesh outline when/where the mesh is hidden

I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
1
vote
1answer
32 views

How do I make my indices anti-clockwise, so I can cull triangles in OpenGL? (immediate mode)

At the moment, I'm attempting a basic game engine in OpenGL using immediate mode. I'm trying to render a cube. Cube is a class with the vertices, normals, and indices. Here is part of the Cube class: ...
1
vote
0answers
54 views

Transparent textures being handled oddly [closed]

In OpenGL why is it that when rendering transparent textures it changes the color values of all the pixels? Ex. when this transparent texture is rendered it comes out as this. Also if I change the ...
0
votes
1answer
49 views

Getting the Right Vector from the Forward Vector

I'm currently working on a small Camera (ArcBall) and I finally am starting to understand how it will work. I will first create a basic View Matrix using a LookAt function. Then, I will send the ...
2
votes
1answer
2k views

Opengl-es picking object

I saw a lot of picking code opengl-es, but nothing worked. Can someone give me what am I missing? My code is (from tutorials/forums) Vec3 far = Camera.getPosition(); Vec3 near = ...
4
votes
2answers
156 views

Poor performance wth custom particle system in LibGDX

I'm using a custom particle system for my LibGDX / Java based game project (because I used Slick2D earlier on, need more parameters so I made my own and then ported). The system is fairly standard as ...
0
votes
1answer
43 views

Creating lots of sprites with dynamic/procedural textures at runtime

Consider a 2D game in which enemies each have unique, procedurally generated art. The art is generated at runtime. There is no hard-coded limit to the number of enemies that can be spawned at one ...
0
votes
1answer
124 views

OpenGL: How to map point inside frustrum to normal device coordinates (NDC)?

I read this article http://www.songho.ca/opengl/gl_projectionmatrix.html. It's explain how calculate projection matrix coefficients. But I completely can't understand how author perform mapping from ...
1
vote
1answer
77 views

Strange artifacts when using gl_FragCoord to access texels

I ran into a problem with using gl_FragCoord variable to access texels. The problem can be illustrated by following example: First I render a textured quad into texture of size (W, H) where W and H ...
0
votes
0answers
197 views

Artifacts rendering high-poly procedural meshes with OpenGL

I am having some issues when rendering some procedural generated meshes. There are some really wierd artifacts when rendering high-poly count meshes (not that much actualy). I have been able to ...
8
votes
2answers
523 views

stencil shadows - doom 3 engine - precision errors - shadow cracks - why?

I am testing the limits of the Doom 3 engine - in regards to maximum map size. I noticed some stencil shadow precision errors that become more pronounced when objects get further and further away ...
1
vote
1answer
507 views

OpenGL render to texture causing edge artifacts

This is my first post here so any help would be massively appreciated :) I'm using C++ with SDL and OpenGL 3.3 When rendering directly to screen I get the following result And when I render to ...
1
vote
2answers
538 views

How to reduce/remove graphical artifacts?

Question I'm working on a side-scrolling game that has a 2D grid for rendering to the screen. I'm using OpenGL, and I've optimized my game so that nothing invisible is attempted to be drawn. As of ...
2
votes
1answer
52 views

Input before or after update/draw?

This is how I understood the game loop, and I wanted to know if I'm correct or not: 1) Draw/render -> input CPU | GPU ------------------ Update | Draw | Input | Rendering 2) Input -> ...
2
votes
2answers
230 views

Deferred rendering: camera inside point light's sphere of effect

I'm trying out deferred rendering and I'm using the tutorials at http://ogldev.atspace.co.uk. I've got the basics working and I'm currently trying to implement the final step from tutorial 37 ...
20
votes
7answers
5k views

What advantage do OpenGL, SFML and SDL have over software rendering?

I started watching the Handmade Hero stream, where Casey Muratori creates a game engine without using frameworks or such. Yesterday I got to the part where he showed how an image is drawn onto the ...
1
vote
0answers
133 views

OpenGL ArcBall Camera

I'm currently working on a OpenGl Project and I have alot of difficulty understanding how arcball camera work. From what I have read online, all I have to do is to rotate a camera around a target and ...
0
votes
1answer
185 views

How to calculate spherical harmonic coefficients for indirect diffuse?

After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
0
votes
0answers
41 views

Renderering problem with flat terrain

i was testing out my game engine last night, but stumbled across this unexpected result. Here is a picture: As it appears, it is renderering 1 triangle and not renderering the other triangles. I ...
2
votes
1answer
115 views

How can I draw multiple lines connected via “nodes” in libgdx Scene2D?

I have two Vectors which indicate the ending points of each line. I am trying to draw similar lines to football formation lines like these. My main problem using ShapeRenderer is: ShapeRenderer ...
1
vote
3answers
72 views

Array Texture 2D with different sizes for the textures?

I'm making a 2D game engine, and I need a way to batch all textures into one so I only make one glBindTexture call throughout a scene. I am trying to use 2D texture arrays, but they only support ...
0
votes
1answer
147 views

Jittery Rotational Movement with Arcball implementation

I have an assignment where I need to implement arcball using Opengl (~2.0). I have it more or less implemented but I have a some problems/issues/bugs and I'm not sure whats either causing them or how ...
0
votes
1answer
64 views

How should I structure VBOs for my 2d world data?

My game is played on a fixed-size hex based arena, where each hex can be of a different type, and possibly contain some creatures/items/anything on it. When I started out, I got the advice to have a ...
0
votes
0answers
45 views

Problem with a TinyOBJLoader Renderer

I was working on implementing a renderer for SYOYO's tiny obj loader and when it came to testing time, it failed to render. Here is an image of the result: I believe that i have made the error with ...
1
vote
1answer
48 views

2D Sprite batching in OpenGL: How to send transformation data to GPU

OpenGL newbie here. So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
1
vote
0answers
50 views

How to draw 2D pixel data with OpenGL

I am fairly new to OpenGL. I have a 2D game in SDL2 that uses currently works by creating a SDL_Surface from the pixel data, copying it into a SDL_Texture, and rendering it to the screen with ...
0
votes
1answer
145 views

Java - LWJGL OBJ Loader with Materials not rendering

So I successfully loading my obj file but I obviously want to get materials on it. I added the vt(texture) to the OBJLoader and the Model.render but still rendering textureless. I have exported the ...
0
votes
1answer
43 views

Opentk hdr rendering with framebuffer white screen problem

I am trying to do hdr rendering with two shader programs: one simply draws a hdr texture on a fullscreen quad and the other one does tonemapping. I am trying either linear tonemapping colorOut = ...
0
votes
2answers
2k views

c++ opengl sdl game engine tutorial

I have a decent knowledge of sdl,opengl and fmod. i am looking for a recent tutorial or book on the basic of making a game engine. Most of the book and tutorial i found are using old dead library like ...
2
votes
4answers
3k views

searching for “university kind” free online course about OPENGL [closed]

I know there are a lot of free university courses, but I'm trying to find one about OpenGL. Do you know where can I find one, online?
6
votes
2answers
24k views

Where to start learning OpenGL with C++? [duplicate]

Possible Duplicate: What are some good learning resources for OpenGL? I have learnt C++ and made some cool text based games and such but I would love to start graphical programming. I'm a ...
-1
votes
2answers
3k views

making a game in 2D(C++). SDL or openGL? Or, why not both? [closed]

I'm trying to make a platform game in 2D and I want to know what tool should I use to make it happen. I understand that I can use SDL with openGL. However, if I want to make a solid 2D platform game, ...
82
votes
15answers
38k views

What are some good learning resources for OpenGL? [closed]

I have been using the OpenGL ES on the iPhone for a while now and basically I feel pretty lost outside to the small set of commands I've seen in examples and adopted as my own. I would love to use ...
-1
votes
1answer
481 views

Detailed Modern Opengl Tutorial? [duplicate]

I am asking for a specific modern opengl tutorial. I need a tutorial that does not skip to explain any lines of code. It should also include different independent objects moving/rotating (most ...
1
vote
1answer
533 views

How to use LWJGL Vertex Buffer Objects?

I have been learning how to make a game with LWJGL for a while now by following YouTube tutorials online but I've recently been having a problem understanding Vertex Buffer Objects. I've looked at ...
2
votes
1answer
226 views

Looking for specific “textured quad” openGL tutorial in c++ [closed]

I'm new to openGL and I've been googling around for the old and simple textured quad tutorial in openGL but I haven't been able to find one that suits my needs. OpenGL3.X compatible OpenGL|ES 2.0 ...
7
votes
1answer
162 views

Depth Peeling implementation problem: How to render the next layer? (OpenGL)

I try to implement order-independet transparency sticking to the pseudo code in the linked paper (page 4). I can't figure out how they are able to do this in OpenGL. I am rendering the scene two ...
4
votes
1answer
249 views

deferred tiled lighting

EDIT I have discovered that it does not seem to be the lighting calculation but the culling code because when i draw the lights without the culling it works perfectly. I have been attempting to ...