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

3
votes
1answer
71 views

unable to render to multiple textures

I'm trying to make an example of deferred rendering. I'm trying to render to three separate textures the position, the normal and the color. Here is the setup : void setup() { //generate and bind ...
0
votes
1answer
48 views

Modern OpenGL c++ obj loader

So i made a obj loader in c++.I used blender to export my files. I tried to draw 2 squares(one perpendicular to the other) and when im looking at them from above some weird black triangles apear, ...
0
votes
1answer
51 views

Obj file loader in c++ from blender

So i want to export files from blender which have: triangles,normals,texcoords and materials.and use modern opengl and c++ to create a obj file loader.I also use sfml. I have a shader loader class ...
-1
votes
1answer
14 views

Using VBO in Opengl. powered with c# TAOFramwork

I'm doing a 3D display for a big object. I've managed to display it with opengl primitives, so it's (very) slow Now i want to use the VBO optimization. But when i lost the focus on the opengl window ...
3
votes
1answer
152 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 ...
4
votes
0answers
40 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 ...
-2
votes
2answers
125 views

How do you define and draw rectangles in OpenGL?

I am very new to OpenGL and I am not sure one the basis of how to create and draw objects. So how would I draw simple rectangles in a window using OpenGL? My understanding is that I need to define an ...
0
votes
1answer
42 views

C++ OpenGL More textured objects equals less FPS

So I'm creating a game engine with many features, last time I focused on textures. When I finished implementing some new code (Made by myself) I created new Entity with texture, and it was working ...
0
votes
2answers
129 views

How to wrap textures inside shader GLSL

I'm trying out GLSL and one of the problems I'm facing is wrapping a random texture sampler in the shader. Searching for answers on the web first, this leads me to using these commands: ...
0
votes
0answers
59 views

Modern OpenGL and SpriteBatching

I tried to find tutorials regarding SpriteBatch done in Modern OpenGL 3.0+, but failed to find any good resources so far. So can anybody please provide me a good resource/tutorial to achieve ...
-3
votes
0answers
24 views

Java opengl error with getting JFrame and Display to work together [on hold]

I tried adding Display to JFrame but get an error any help would be nice. code: public class window{ Loader loader = new Loader(); StaticShader shader = new StaticShader(); Renderer renderer = new ...
2
votes
1answer
71 views

Transparency sorting in 3D world with different render types

I am rendering a world, object, and models from an older game format. The world is presented in a BSP tree so I can quickly iterate through. The opaque surfaces are rendered front to back. Then ...
0
votes
0answers
22 views

Disable OpenGL NVidia Driver Optimization During Development

I've noticed while looking at gDebugger that sometimes what I dispatch as draw calls never actually show up in the logger. I assume that there is some driver level optimization going on here; so is ...
0
votes
2answers
27 views

LWJGL shader loading problem [closed]

I tried to load shaders in lwjgl but it never works. it shows me a weird error which i can not discover please help. here goes the code:- ShaderProgram.java package Shaders; import ...
0
votes
0answers
28 views

Assimp setup in C++ CodeBlocks MingW compilator g++ [on hold]

Im trying to learn game development.In the past i used old c++,opengl,and blender to create an obj file loader for my projects.Now i saw that this library Assimp is much better.But i have no idea how ...
-1
votes
0answers
48 views

Modern OpenGL class in c++ for loading model [duplicate]

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
5
votes
2answers
215 views

How to render water reflections on multiple heights

I'm making a voxel game on OpenGL, and are trying to find a way to render semi-realistic water (At least partially good looking, it doesn't need to be strictly scientific accurate). All sources ...
0
votes
1answer
74 views

Modern OpenGL project in c++ .obj loader

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
9
votes
3answers
3k views

Order independent transparency in particle system

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because: Each particle is a point sprite in a single mesh and I can't use ...
3
votes
1answer
305 views

Pyglet: text.Label().draw to FBO?

I just started OpenGL (PyopenGl) & Pyglet 3 weeks ago, and decided to read the Red Book. So sorry if my question shows my lack of comprehension... My question is: Is it possible to display/write ...
0
votes
0answers
34 views

A 2D card game using OpenGL

I am creating a 2d card game. I have written the low-level functions, game logic, game algorithms in C++. I now have to create a graphics layer that the player can interact with. This just has to be ...
-1
votes
0answers
22 views

How to rotate Vector3 in OpenTK?

I'm completely new in OpenGL and OpenTK world so I want to ask the noob question. I'm working on a 3D application in visual basic and I want to rotate the camera around the "0,0,0" position without ...
5
votes
2answers
974 views

“Normal” Blend Mode with OpenGL Trouble

I've been having a lot of trouble trying to get a OpenGL blend function to work as I'd expect it to with like what I'd expect (or from any sensible image editing program). As an example, I'll use ...
0
votes
1answer
68 views

Using gl3w and Win32 api, without glut [closed]

I'm still a beginner, the example on skaslev's site require us to use glut as an interface to create a window. For some reason, I'm required to create a window purely with Win32 api, but I am not ...
0
votes
1answer
182 views

Invalid coordinates returned by glutMouseFunc()

I am using GLUT's glutMouseFunc() function to retrieve the coordinates of mouse clicks. I want to move the object on that coordinate to another coordinate. But when I click on the object the ...
0
votes
0answers
28 views

Issue with Use SSBO OpenGL

Students that use OpenGL. Do not speak English well. So please understand. There is currently a problem C++ Code Setup() : glGenBuffers(1, &ssboHandle); GLuint ssbo_binding_point_index = 0; ...
3
votes
1answer
338 views

Drawing fonts with LWJGL3 with OpenGL

I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here. My goal is to somehow render some text on the ...
0
votes
1answer
34 views

Wrong texture position on camera move

When in my game i move my character, the camera follows it. I have no problem drawing this char when it is moving or moving another char when the camera is still. Now, when i move both of them, the ...
1
vote
1answer
148 views

Cannot find bug in frustum culling code

I've written some code for frustum culling, but for some reason, it is not working, and i can't find the bug in it... Maybe a bug in the math, somewhere? So, i'm asking you if anyone could check these ...
2
votes
1answer
142 views

equirectangular panorama rendering?

I want to render my scenes as equirectangular panorama frames. I can get the angular fisheye which is what I actually need by applying the rendered frame as a texture to a correctly UV mapped circle. ...
1
vote
0answers
34 views

Cell height with heightmap for collision detection

Hello everyone I'm programming a game with c++ and openGL. My world is generated from a heightmap (100x100 matrix with values 0-255) and now I need a function that returns the actual height based on ...
2
votes
1answer
45 views

Cannot connecting texture to heightmap using mapped uniform location

In my shader program, I have my attributes and uniforms added to a map for each. What I have displayed is a heightmap, but cant seem to connect the graphic texture to display. mUniformList ...
1
vote
1answer
64 views

How to combine depth and stencil tests?

I have a continuous height-mapped mesh to represent landscape. I use the stencil test to create holes in the mesh. I draw holes to the stencil buffer and then use it to discard mesh fragments. ...
0
votes
0answers
44 views

Wrong Normal When Models is Close to Each Other

I have a problem regarding my Normal FrameBuffer that creates gaps between models. The image below contains 10x2x10 block (Minecraft style) and one character. The image is outputed through: ...
0
votes
1answer
177 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
1
vote
1answer
91 views

Implementing Shadow Mapping in Python and OpenGL 2.1

I am trying to create a little shadow mapping demo. My code is currently divided into three rendering passes: Pass 1 - Create the depth texture that will be used for shadow mapping on an offscreen ...
1
vote
1answer
146 views

Minecraft Modding - How do I use OpenGL stencil functions alongside the game's GlStateManager?

Note: I am using Minecraft Coder Pack 9.10 for game version 1.8.0 (official release). I am trying to make a multiline text field similar to the game's original net.minecraft.client.gui.GuiTextField. ...
0
votes
2answers
143 views

Render specific part of a texture in OpenGL (2D Sprite Sheet)

I've looked at this answer to find out how to render just a part of a texture: http://stackoverflow.com/questions/6884285/c-opengl-render-part-of-an-image I tried that, but the problem is, this is how ...
1
vote
1answer
252 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(); ...
0
votes
1answer
162 views

Java OpenGL Perspective matrix not working

I'm trying to render a simple triangle with OpenGL in Java using LWJGL3. Everything is working great, but the projection matrix (perspective) is not working. In C++ I just used to apply the ...
1
vote
1answer
548 views

OpenGL Tessellation makes point

A little problem with my tessellation shader. I try to implement a simple tessellation shader but it only makes points. Here's my vertex shader : out vec4 ecPosition; out vec3 ecNormal; void ...
1
vote
1answer
93 views

How can I make terrain texturing look detailed both close-up and far away?

I attempting to make my game have very detailed textures, and in general look pretty. However, I'm having some issues with that. Let's take a look at a rock texture close up: Picture. As you can ...
4
votes
1answer
84 views

SSAO issue - surfaces darken based on camera angle

I have a strange issue in my engine where my SSAO effect will extremely darken or lighten based on my camera angle: In that example, I'm just outputting the ssao texture to the screen. The texture ...
4
votes
1answer
422 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
1answer
79 views

How could we use trigonometry for moving around a 3D World?

Well I have a question about geometry and 3-Dimensional player movement in general. I'm using Java, OpenGL and LWJGL. This is basically what I got: currentFrontSpeed: Is a float that contains the ...
1
vote
1answer
90 views

Using glm to rotate the modelview matrix based on the cursor position

I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
0
votes
2answers
182 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 ...
3
votes
0answers
59 views

How do I align the cube in which shadows are computed with the view frustrum? (“View Space aligned frustum”)

Short and concise: Given 8 world space positions that form a cube of arbitrary size, position and orientation and given an arbitrary light direction. How do I compute the View and Projection matrix ...
2
votes
1answer
120 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 ...
1
vote
1answer
39 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 ...