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

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
0answers
18 views

Ping Poing and blending

I have to render a scene, once per light, and blend the result of the various passes. I heard and read that one way to increase performances and Render Targets to use would be Ping Poing. Since I am ...
0
votes
1answer
48 views

Planet terrain not connecting properly

I'm trying to generate some simple planets in OpenGL using libnoise (including noiseutils), but the terrain is not correctly connecting where the sphere "completes itself" and I was wondering if ...
1
vote
1answer
82 views

What types of matrices are needed for game and graphics programming?

I am writing a 3D math library for general game development and want to know what type of Matrix classes I should include. Is just a 4x4 matrix enough, or must I provide 3x4 and dedicated rotational ...
2
votes
1answer
44 views

Indexed Drawing in OpenGL not working

I am trying to render 2 types of primitives- - points ( a Point Cloud ) - triangles ( a Mesh ) I am rendering points simply without any index arrays and they are getting rendered fine. To render ...
-4
votes
0answers
61 views

i want to be a game developres please help [on hold]

bare with my English ok so we have done this semester C language but i didn't like much of C so i just prepared as much as a needed for my exam and i learned C++ coz its much better and advance than ...
4
votes
1answer
83 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
0
votes
1answer
37 views

Can I directly pass a Boost ptr_vector list to glBufferData?

I have a data structure like this: typedef struct vertex_ { float x; float y; float z; float s; float t; }vertex; Then I add to a list called: boost::ptr_vector<vector> vertices; Is there a ...
0
votes
1answer
67 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 ...
0
votes
1answer
48 views

Sources to learn OpenGL [on hold]

I really wish to learn OpenGL, but all I have is a very old laptop. It supports OpenGL 1.2 version only. I tried learning through books but trying out the programs are next to impossible, since none ...
2
votes
2answers
82 views

Render with multiple lights (one pass per light)

Hi I'm new here so sorry if I make some mistakes writing this question. I have already a system that at the moment handle multiple lights just passing an array of light struct and loop through it. I ...
0
votes
1answer
40 views

Taking fixed direction on hemisphere and project to normal (openGL)

I am trying to perform sampling using hemisphere around a surface normal. I want to experiment with fixed directions (and maybe jitter slightly between frames). So I have those directions: vec3 ...
0
votes
0answers
15 views

Qt OpenGL shader errors [closed]

I get the following error after compiling a Qt-OpenGL project: bool QGLShaderPrivate::create(): Could not create shader of type 1. Vertex shader for simpleShaderProg (MainVertexShader & ...
0
votes
2answers
90 views

c++ OpenGL framerate question

I am writing a simple 3D pacman using c++ and OpenGL. I'm new in OpenGL development, I wanted to make a small project before learning next concepts. For now I can't have more than 55fps when ...
0
votes
3answers
86 views

Is OpenGl still supported in C?

I'm reading the OpenGl superbible 3th edition (well I plan to) and it's all in C. Since this book was written in 2004 and all the other later versions are written in C++, i was wondering whether or ...
1
vote
1answer
80 views

GLSL to Cg: why is the effect different?

With reference to this question, where I was trying to make the shader compile, I am now trying to make an effect appear. The effect can be shown here, through a GLSL shader: But when I use the ...
0
votes
0answers
30 views

how decal projection works in opengl?

I want to draw a quad that fit on another mesh,how to setup projection matrix of this quad?I need an orthoprojection matrix right? At first I thought I only need to do some ray test of each vertex of ...
0
votes
0answers
20 views

Good books on Android OpenGL game development [closed]

I don't know if opinion based questions will get down voted here. But anyways , I wanted to know some good books on Android game development with OpenGL. I have some intermediate knowledge on Java ...
1
vote
2answers
47 views

Palette reduction to pre-defined palette

I'm writing a bunch of GLSL effects for fun, but I can't wrap my head around this. Basically, I want to reduce a texture's palette into a pre-defined set of colors. For example, a post-processing ...
-1
votes
0answers
28 views

How to get 3D objects using Visual C++ | OpenGL | SDL | Blender [closed]

How to get 3D objects using Visual C++ | OpenGL | SDL | Blender Hi, I have been searching for a tutorial(s) witch corresponds or my specific desire but I had no luck, any suggestions? Thanks.
0
votes
0answers
22 views

changing camera's reference point position by a keyboard event

I would like to change the camera's reference point position using gluLookAt. I would like that it changes when I press for exemle 'a'. I tried with: void VueOpenGL::Paint(wxPaintEvent&){ ...
0
votes
0answers
33 views

lodepng “undefined reference” (MinGW)? [on hold]

I'm trying to use the library lodepng (lodev.org) in a C++ project. The actual library is a header and a C++ source file so the error I'm getting is confusing me. When I try reference a function or ...
0
votes
2answers
62 views

Passing variables down the pipeline glsl

I am sorry to post a question that may be easily tested, but I don't have an OGL4+ hardware at the moment and I have to make some design decision beforehand so I wanted a clear scenario. Looking at ...
1
vote
1answer
104 views

Assimp skeletal animation matrices

I startded to make an assimp only opengl skeletal animation demo. For that I used this: http://sourceforge.net/p/assimp/discussion/817654/thread/5462cbf5 And something is not correct in bone matrices. ...
0
votes
1answer
31 views

When and how to apply affine translations to vertices of a mesh with LWJGL

So, I have a rigid body class, containing a list of vertices and a 4x4 transformation matrix. At the moment, I'm applying the transformation matrix to each vertex individually, and am unable to revert ...
4
votes
3answers
565 views

How portable are OpenGL versions, really?

If I write a game engine that uses OpenGL 1.5 (not assuming what else I do), is it portable now and is it still portable five years from now or are/will support for OpenGL by hardware and drivers (be) ...
0
votes
0answers
25 views

Get light positions from an environment map

As the title says, I was wondering if there's a way, in a preprocessing step, to infer the position of a some light sources starting from an environment map. I think I saw lights inferred from an ...
-1
votes
3answers
65 views

Most efficient way to do 2d tiles (VBO vs Instancing)

Ok so I am looking at building a game that uses 16*16 tiles, and renders anywhere from 400,000 to 1,000,000 tiles onto the screen at any given time. The tiles will be destroyable . What is the most ...
0
votes
1answer
38 views

GLSL to Cg fragment shader

I have found very useful resource on the Swiftless website on OpenGL. Unfortunately, I cannot manage to adapt a GLSL fragment shader to my project, which uses Cg. Here it is: uniform sampler2D ...
1
vote
1answer
48 views

OpenGL - Buffer Usage

I am currently working on a little OpenGL project. At the moment I am trying to find a good solution for rendering multiple objects. I have set up a terrain with its own buffers, which works just ...
0
votes
1answer
61 views

Skybox: OpenGL texCUBE vs a textured cube

In OpenGL, the typical way that I've seen to set up a skybox using cubemapping is to create a cube in camera space, prepare a cubemap sampler with the appropriate six-sided texture, and then in the ...
0
votes
1answer
71 views

How to efficiently change VBO size?

I have created a menu class and now I'm working on getting it to render using OpenGL's VBO's. The menu is fairly simple, it has a number of buttons, the user can press up and down to highlight the ...
0
votes
0answers
31 views

OpenGL - using gluSphere

I have an OpenGL code that currently draws several spheres at different locations. I generate the vertex buffer data (and normal data) myself. However, to simplify the code and increase efficiency, I ...
3
votes
2answers
98 views

GLM/OpenGL: How Can I Prevent Vector Magnitude From Increasing While Rotating Bones in Skeletal Rig?

ANSWER AT THE BOTTOM OF THIS QUESTION I have been reading tutorials, articles, questions on StackExchange and books all with the subject of skeletal rigging. I have boiled my program down to just the ...
1
vote
0answers
55 views

How to implement translation, scale, rotation gizmos for manipulating 3D object's transforms?

I am in the process of developing a basic 3D editor. It uses OpenGL for rendering a 3D world. Right now my scene is just a few boxes of different sizes and I am at the stage where I want to be able to ...
1
vote
1answer
49 views

LibGDX Box2DLights shadow offset problem on bodies

Hello I just started to use LibGDX, and it's awesome. I looked at the Box2DLights library, and started to learn how the lighting work here. I got something up: As you can see, it works, but the ...
0
votes
0answers
109 views

Problem when using two different shaders

I have created a simple shader for drawing my scene in OpenGL. When another shader was introduced, a problem appeared. I use the first shader and draw few objects in the scene. Then I use the second ...
0
votes
0answers
18 views

Slick2D changing image's color with drawFlash and using alpha

I have an image, where I have a round soft white feathered ball in the center of it. I plan to use it for my lighting in my 2D game. I could not find any proper way to drawing lighting with many ...
0
votes
1answer
104 views

How do you create a 2d world then view it in 3d?

I have been learning OpenGL for a while now and have a pretty good understanding so far. What I would like to know is if I create a 2D game in Orthographic Projection, is it possible to switch to a ...
0
votes
0answers
27 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
0
votes
1answer
39 views

OpenGL +SFML + GLFW3

I'am maybe asking a stupid question, but can we mix OpenGl + SMFL and add to it some GLFW in the same SFML window ?
3
votes
1answer
83 views

what happens with missing vertices in geometry shader

I am relatively new to GLSL shader programming, and the documentation I found is unfortunately often inscrutable. I am having trouble understanding a few things with how geometry shaders fit into the ...
3
votes
1answer
155 views

What happen if I try to run OpenGL 4.4 code on an unsupported graphic card?

I'm learning OpenGL because I'd like to build my own engine. I'd like to know what happens if I try to run OpenGL 4.4 code (the latest version at the moment of writing) on an unsupported graphic card ...
1
vote
1answer
72 views

Shadow Map field-of-view

I'm implementing a shadow map algorithm with a spotlight (a spotlight that always "looks" at a given object). My issue is that for some configuration, part of the object the light is "looking at" is ...
1
vote
0answers
61 views

OpenGL/GLM Camera

I want to make a camera that can freely look and walk on X/Z plane and rotate 360 degrees. I'm using OpenGL and the lookAt function from the GLM library to create the view matrix. I've looked through ...
1
vote
2answers
152 views

How are red dot/reflex/holographic sights implemented?

In first-person-shooters like Call of Duty, the hologram only appears when it is behind the glass portion of the sight. In OpenGL, would it be implemented by rendering the glass to the stencil buffer ...
1
vote
1answer
34 views

glDeleteBuffers causing other objects not to draw

I have few objects in scene and they exist until I turn off the application. Their calls for glDeleteBuffers are in destructor. Since I don't delete anything in the middle of the game everything is ...
1
vote
1answer
78 views

Reflection and shadows in OpenGL

I'd like to implement shadows and reflective surfaces in my OpenGL app. I already have ideas which I will provide below. But I would like to ask someone more experienced than me before I put too much ...
0
votes
1answer
43 views

Geometry design and buffers

I'm making some tests with rendering stuff and I'm wondering how to design my Geometry class. For the moment, here is how I do: Init: Stock array with positions, array with colors, array with ...
2
votes
0answers
25 views

SDL_AddTimer + SDL_GL_MakeCurrent not working on Windows

I'm messing around with C++, OpenGL and SDL doing a game that should be able to run in Windows and Mac OS X. I have a problem that only happens on Windows. Let me describe the scenario. First I ...