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
12 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
26 views

LWJGL - First time trying to implement shadow mapping

It's my first time when I implementing shadow mapping. My problem is shadows don't work in any way. First I just render all of the object to a FBO with simple shader. shadowMapGenerator.vs: #version ...
-1
votes
1answer
36 views

How can I set up a pixel-perfect camera using OpenGL and orthographic projection?

I am creating a 2D game using OpenGL and orthographic projection. For sprites, I use textured quads (actually two triangles). I want the pixel art textures for the sprites to be displayed in a ...
0
votes
1answer
27 views

GL_INVALID_OPERATION on glBindVertexArray Despite glGenVertexArrays()

so I've been trying to create a simpler way to draw polygons and and have come across the following issue: When I call glBindVertexArray(m_VAO); it throws a GL_INVALID_OPERATION even though I have ...
-1
votes
0answers
32 views

Is it recommended to use GLFW for long term projects? [on hold]

The thing is I'm wondering if it is viable to use GLFW in a long project. Since it's a long term project, I don't want to run into a wall when it's already to late to redo important code.
0
votes
1answer
44 views

How to display three dimensional Objects in a 2D Game using OpenGL and orthographic Projection?

I am creating a 2D (2.5D) game using OpenGL and orthographic projection. It is simple to have relatively flat objects, e.g. characters. I simply use a quad with a texture of the character and move ...
4
votes
0answers
53 views

How do I check for collision between transparent textures?

I am creating a 2D game using OpenGL. For sprites, I use textured quads (actually two triangles). The texures contain transparent pixels, since objects are not always perfectly rectangular. How do I ...
1
vote
0answers
34 views

Picking isometric map with slopes

I'm looking for a way to convert mouse/screen coordinates to isometric map coordinates, with the addition that the world has slopes and cliffs, and I have to be able to tell which quadrant of the tile ...
1
vote
1answer
44 views

OpenGL poor performace with instanced drawing

I'm just started learning OpenGL and this is my first project besides tutorials. I'm trying to load a huge enginering model: The data is structured in a way that I thought I could use instancing ...
0
votes
1answer
27 views

OpenGL Shaders Ignored

I have been following this tutorial to try and start learning OpenGL. However, upon compiling my code, my triangle turns out to be black. At first I thought that there was something wrong with the ...
-5
votes
0answers
39 views

What to choose Game Engine or Make my own? [on hold]

I want to go into game programing, I know basic stuffs in Unity, C++ / OpenGL, and I don't know what is better to make a Game Engine (I'm don't gone write a programing language for it, I will make ...
0
votes
0answers
34 views

OpenGL - Make two images blend together

I have 2 images that are .png and they mix together, The problem is that one overwrite the other. I know that the draw order matters, but In that case I should redraw the icons 2 times ( there is a ...
1
vote
0answers
43 views

Blinn-Phong lighting on Voxel models

I'm creating a game that is going to use voxel models. However I got stuck when I coded my shader using Blinn-Phong algoritm. Here is how it look (Only care about the red model): As you can see ...
0
votes
0answers
16 views

Nvidia Nsight 4.6 VS Edition. The Graphics debugger can't find glew32.dll

I'm trying to debug some textures and FBO's with Nvidia Nsight 4.6 VS Edition. But when I select either "Start CUDA debugging" or "Start graphics debugging" I get an error. "The program can't start ...
-4
votes
0answers
34 views

Need ideas for a space game [on hold]

I am Tyler and I am 17 years old. I have been learning C++ over the last few months and I am also working on creating a game that i hope will rival already established space MMOs one day such as ...
0
votes
1answer
88 views

What is the correct approach to implement multiplayer in a game? [duplicate]

I'm developing a game and it is intended to be a multiplayer game. I have experience in writing servers and clients in Java, but the game is written in C++. The server will be written in Java for ...
1
vote
1answer
32 views

Environment mapping - cube mapping using OpenGL

I'm trying to do cube mapping. Problem is that I'm getting this: This is what I get when I rotate it: But it should look like this Here is code for vertex shader varying vec2 tex_coord; void ...
2
votes
1answer
64 views

GLSL 330 Core Bug? - Uniform variable will not set to value if it is named a certain way

In the code below I have a uniform variable named "vw_matrix" used in the calculation for gl_Position. When I run my program, a rectangle gets printed to the screen. #version 330 core layout ...
0
votes
0answers
28 views

How to calculate per vertex normals? (OpenGL) [duplicate]

I am really confused and quite much thinking about how to do that? Cross product and then, normalizing is not working for me. Or perhaps, I take them all wrong. Well, please explain me that while ...
1
vote
1answer
33 views

LWJGL: loading textures of various types

I googled around a bit and nobody seems to have asked this question. I have images in multiple color formats (all of them are PNGs). Most of them are ARGB but my bitmap fonts are gray scale, and I ...
1
vote
1answer
36 views

Certain random content rendering differently

On the main menu of my game there is (obviously) several buttons. 2 of which, in different positions on different screens, render a different colour to the rest. As you can see below, "New game" ...
0
votes
3answers
107 views

Loading models with opengl

I'm developing a video game using OpenGL as graphic API and C++ programming language, and I'm creating all models with blender. One question I have is how you deal with models (vertices), I mean, ...
1
vote
1answer
48 views

How to debug a GLSL shader? [duplicate]

I cannot find any tutorial in Google and Youtube. I have a C++ program that uses OpenGL ES 2.0 API to render something on the screen. How can I debug my shaders? Any step-by-step guide? What is the ...
1
vote
1answer
31 views

3D Studio MAX dxf model to OpenGL and DirectX

Main Question I saw this Loading and Animating MD5 Models with OpenGL an old post explaining .md5mesh .md5anim files. Is there any similar alternate mechanisms? Additional Questions 1.) Is there an ...
0
votes
1answer
28 views

Performance overhead on Non-POT Texture in POT Atlas

Using atlas, we can reduce memory and draw call. And the atlas is usally POT(Power of Two) Texture. And I know non-POT texture have a lot of GPU and memory performance overhead. (link) I have many ...
0
votes
0answers
18 views

What is the convention for column-major order matrix transformations?

According to this cheat sheet for CG, if I want to use column-major order for my matrix/vector math I have to multiply from the left applying transformations from right to left, i.e. v' = P * V * v I ...
0
votes
1answer
12 views

Open GL: 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 ...
0
votes
1answer
53 views

How to put the “camera” inside a cube in OpenGL

I'm really new to OpenGL and can't seem to figure out how to put the "camera" inside the cube I've created so that I can move in an FPS-like style. I tried to use gluLookAt and gluPerspective but I'm ...
1
vote
0answers
9 views

CanDraw in large hierarchical scene with rotation

I've been assigned to write small simulation visualization, that contains thousands of cubes (I know you heard that before). Now I'm working on optimization of stuff that takes place there, but ...
0
votes
0answers
14 views

glColorPointer not working

I have this problem. The collection of triangle STL is rendered with some default color but the color that is stored in m_pDisplayedColors is not set. I would be thankful if someone points out the ...
2
votes
0answers
144 views

Texturing Objects in OpenGL

Using OpenGL tutorials found here, I constructed an .obj file loader as well as a texture file loader using SOIL. I have an issue with drawing a textured object. (Shown here) Assuming I created the ...
1
vote
1answer
41 views

How can I rotate a quad around it's center?

My code is: GL11.glPushMatrix(); // rotate around center GL11.glTranslatef(-200/2, -200/2, 0); GL11.glRotatef(30, 0.0f, 0.0f, 1); GL11.glTranslatef(200/2, 200/2, 0); // draw quad ...
0
votes
1answer
66 views

How can I blend up to 3 textures on a polygon without blend maps?

For my voxel game I need to blend up to 3 textures in the same polygon. It would be preferable if I could specify a texture id for each vertex, but other solutions are accepted as well. Here's an ...
0
votes
2answers
93 views

Game engine openGL operations scheduling

I'm making a custom engine and after much research, i realized that the state changes and the vertex or texture data loadings to VRAM are the most slow operations. So I want to optimize it making a ...
0
votes
2answers
40 views

“Render” unsigned integer values to texture without clamping to [0,1]

I am trying to render to an unsigned integer texture, with a blending function enable, so that in the end, the value in each texel will be the number of objects rendered on the texel. So I assume I ...
0
votes
1answer
36 views

Geometry Struct and glDrawElements

currently I re-write my codes and change them to make they are better. I have vertex struct like this: struct SVertex { float X, Y, Z; }; struct STexCoord { float U, V; }; And I re-wrote ...
0
votes
1answer
40 views

How can I render text using the new(ish) JOGL GPU curve rendering classes?

I'm fairly new to OpenGL/JOGL, working through various tutorials and books and making steady progress. Text, however, is an area where I'm stuck. I figured out one way using BufferedImage and ...
2
votes
0answers
38 views

Opengl Skybox Texturing Error

I'm using cubemaps to render a skybox in my game. Thinking this would be a simple task I threw some stuff together using the tutorials I found online, particularly this. Taking all of this together, ...
2
votes
1answer
58 views

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

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 ...
1
vote
2answers
137 views

How to implement Index Buffer Object (IBOs) with texture coordinates in OpenGL?

I was using IBOs to render meshes (for example a cube) from wave-front files (.obj), without texture coordinates or normals, in OpenGL. Following this, I attempted to implemented texturing. The mesh ...
0
votes
0answers
19 views

AttachThreadInput and PeekMessage Threading

I have a problem with AttachThreadInput and PeekMessage from User32.dll while multithreading. PeekMessage is not returning true in any case. I am designing a Windows Form that uses OpenGL rendering ...
3
votes
1answer
75 views

Texturing in OpenGL, Should texture coordinates be assigned to vertices in the shader?

I attempting to texture 3D models (a cube for example) using ibo’s, with OpenGL in Java. Currently, my textures are distorted. I believe this is because only a single texture coordinate is being ...
0
votes
1answer
30 views

Cannot Get The Texture Showed Up Correctly glDrawElements

I still have this problem almost 1 month. Tried to search on Google but did not find any solution to this. I have loaded all the data correctly but don't know why the texture came up like this. Here ...
1
vote
1answer
59 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 ...
0
votes
0answers
32 views

Vertex Skinning OpenGex Incorrect Transformations

I'm following the formula here, I'm using LJWGL, OpenGl, OpenGex, and Blender: I implemented the code and it works but there is a few things. First, there is a gap between the two bones, or on each ...
1
vote
0answers
75 views

Implementing a Render queue [closed]

I am currently in the process of re-writing my 3d engine, and I am looking at improving the renderer. I have read that organizing objects into a "render queue" and sorting is the best method. The ...
0
votes
1answer
60 views

Error drawing two VAO, each one using different shader programs (vertex + fragment shader) in OpenGL Core 4.3 / GLSL 430 (SOLVED)

I am trying to draw over a GL_TRIANGLE_FAN one texture to render video frames, using shaderProgram1, and render above it some points (GL_POINTS) using shaderProgram2. By this way: (OpenGL Core 4.3) ...
5
votes
2answers
150 views

Low quality bilinear sampling in WebGL/OpenGL/DirectX

I'm seeing low quality bilinear texture sampling in WebGL, OpenGL and Directx, and was wondering if anyone knew how to make it higher quality? The picture below should help show what I mean. The ...
1
vote
0answers
50 views

Taking a 2D slice of a 3D volume

I have a regular 3D polygon and I'd like to display 2D slices of it. What is the best way to achieve this? (Preferrably in OpenGL, but a general algorithm/tecnique would be good as well). I've ...
0
votes
0answers
31 views

LWJGL OpenGL Spotlight half-showing

Problem: Only half of the light is showing. Lighting Inilization code: glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); glEnable(GL_NORMALIZE); ...