• 11
• 9
• 10
• 9
• 10
• ### Similar Content

• By lxjk
Hi guys,
There are many ways to do light culling in tile-based shading. I've been playing with this idea for a while, and just want to throw it out there.
Because tile frustums are general small compared to light radius, I tried using cone test to reduce false positives introduced by commonly used sphere-frustum test.
On top of that, I use distance to camera rather than depth for near/far test (aka. sliced by spheres).
This method can be naturally extended to clustered light culling as well.
The following image shows the general ideas

Performance-wise I get around 15% improvement over sphere-frustum test. You can also see how a single light performs as the following: from left to right (1) standard rendering of a point light; then tiles passed the test of (2) sphere-frustum test; (3) cone test; (4) spherical-sliced cone test

I put the details in my blog post (https://lxjk.github.io/2018/03/25/Improve-Tile-based-Light-Culling-with-Spherical-sliced-Cone.html), GLSL source code included!

Eric

• Good evening everyone!

I was wondering if there is something equivalent of  GL_NV_blend_equation_advanced for AMD?
Basically I'm trying to find more compatible version of it.

Thank you!

• Hello guys,

How do I know? Why does wavefront not show for me?
I already checked I have non errors yet.

And my download (mega.nz) should it is original but I tried no success...
- Add blend source and png file here I have tried tried,.....

PS: Why is our community not active? I wait very longer. Stop to lie me!
Thanks !

• I wasn't sure if this would be the right place for a topic like this so sorry if it isn't.
I'm currently working on a project for Uni using FreeGLUT to make a simple solar system simulation. I've got to the point where I've implemented all the planets and have used a Scene Graph to link them all together. The issue I'm having with now though is basically the planets and moons orbit correctly at their own orbit speeds.
I'm not really experienced with using matrices for stuff like this so It's likely why I can't figure out how exactly to get it working. This is where I'm applying the transformation matrices, as well as pushing and popping them. This is within the Render function that every planet including the sun and moons will have and run.
if (tag != "Sun") { glRotatef(orbitAngle, orbitRotation.X, orbitRotation.Y, orbitRotation.Z); } glPushMatrix(); glTranslatef(position.X, position.Y, position.Z); glRotatef(rotationAngle, rotation.X, rotation.Y, rotation.Z); glScalef(scale.X, scale.Y, scale.Z); glDrawElements(GL_TRIANGLES, mesh->indiceCount, GL_UNSIGNED_SHORT, mesh->indices); if (tag != "Sun") { glPopMatrix(); } The "If(tag != "Sun")" parts are my attempts are getting the planets to orbit correctly though it likely isn't the way I'm meant to be doing it. So I was wondering if someone would be able to help me? As I really don't have an idea on what I would do to get it working. Using the if statement is truthfully the closest I've got to it working but there are still weird effects like the planets orbiting faster then they should depending on the number of planets actually be updated/rendered.

• Hello everyone,
I have problem with texture

# OpenGL SFML errors when compiling if OpenGL.hpp is included

This topic is 587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello! I've been having this error for a couple days and I can't find a way to fix it. If I include SFML/OpenGL.hpp during the build it says this:

c:\mingw\include\sfml\opengl.hpp:46:23: fatal error: GL/gl.h: No such file or directory

I'm using MinGW on windows, my IDE is CLion and CLion uses CMake.

Here's the full error log:

Scanning dependencies of target LearningOpenGL
[ 50%] Building CXX object CMakeFiles/LearningOpenGL.dir/src/main.cpp.obj
In file included from C:\My\folder\path\src\main.cpp:4:0:
c:\mingw\include\sfml\opengl.hpp:46:23: fatal error: GL/gl.h: No such file or directory
compilation terminated.
mingw32-make.exe[3]: *** [CMakeFiles/LearningOpenGL.dir/src/main.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/LearningOpenGL.dir/all] Error 2
CMakeFiles\LearningOpenGL.dir\build.make:62: recipe for target 'CMakeFiles/LearningOpenGL.dir/src/main.cpp.obj' failed
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/LearningOpenGL.dir/all' failed
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/LearningOpenGL.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/LearningOpenGL.dir/rule] Error 2
mingw32-make.exe: *** [LearningOpenGL] Error 2
Makefile:117: recipe for target 'LearningOpenGL' failed

And here's my code:

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>

int main()
{
sf::Window window(sf::VideoMode(800, 600), "OpenGL", sf::Style::Default, sf::ContextSettings(32));

while (window.isOpen())
{
sf::Event event;

while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
}

return 0;
}


P.S. It works fine when SFML/OpenGL.hpp isn't included.

Edited by Jaay_

##### Share on other sites

I'm not really familiar with SFML but, it appear that "SFML/OpenGL.hpp" is trying to include "gl/gl.h" and you don't have that file.

Have you checked if you have a "gl" folder in your include directory with the "gl.h" file in it?

The reason your app compiles without the including OpenGL.hpp may be because you don't make any calls to OpenGL in your application. But, I fear that when you do, it will stop compiling.

Again, not sure if that's the case, but it's worth a shot.

Hope it helps.

##### Share on other sites

P.S. It works fine when SFML/OpenGL.hpp isn't included.

Do you plan to do OpenGL with SFML ?

I think this is the main question. If you plan to do so, then this page will certainly be helpful.