• 9
• 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

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

## Recommended Posts

Hi there, i have the following problem and would be glad if someone got a clue about this. I wrote a seperate dll for my project in C/C++, which implements rendering functionality with OpenGL. As one part of it the program tries to query for available extensions and stores the function pointers. At least it should... The call for loading the OpenGL32.dll dynamically works, i also get the extensions string, but the calls for receiving pointers to the related functions always return NULL. (My dll needs to link the OpenGL32.dll manually, because i use a layer function for querying symbols inside dlls (which needs the library handle, just like GetProcAddress).) I'm also a bit confused, due to the fact that i can dynamically link the OpenGL32.dll, but i can't find it on my system...
PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB;
const char* Extensions = (const char*)glGetString( GL_EXTENSIONS );
void* OpenGL32 = loadLibrary( "OpenGL32" );
assert(OpenGL32);
if( strstr( "GL_ARB_multitexture", Extensions ) )
{
// This one for example returns 0, for each function i try to query.
glMultiTexCoord1fARB = findSymbol( OpenGL32, "glMultiTexCoord1fARB" );
//...
}

Thanks for any help!

##### Share on other sites
Have you been able to get the extensions previously and just now are not able to? It seems entirely possible that you have an older system or outdated OpenGL, which would mean you in fact *don't* have the extensions you're looking for.

Other then that I'm not sure...the code you posted looks perfectly normal for the task at hand.

EDIT: Nevermind, you clearly wouldn't even get to that point in the code if you didn't have the extensions (the strstr() would fail). What does your findSymbol code look like?

##### Share on other sites
Well, i have the newest ATI Catalyst drivers. 3D demos of other engines i run on my computer use the same extensions and the extensions string i receive from OpenGL is pretty long. The only thing i forgot here in this snippet is the explicit cast to PFNGL*-pointer, but this doesn't look like the problem :)

But thanks anyway for the fast reply!

The findSymbol function is just a layer. Corresponding to the operating system it will use LoadLibrary or dlopen (for Windows/Linux). It doesn't mess around with the overloaded pointers, it just does some additional asserts and uses the arguments 1:1 for the implemented function.

void* findSymbol( void* Handle, const char* Name ){assert(Handle);assert(Name);#ifdef WINDOWSreturn LoadLibrary( Handle, Name );#else// ...#endif}

##### Share on other sites
uhm if i recall right the OpenGL32.dll only contains the default MS 1.1 implementation. by loading the dll dynamically that's all you can get, although after you create a render context i'm pretty sure you can still call wglGetProcAdress and get the extensions from whatever ATI/NVIDIA dlls the calls are routed too.
Y

##### Share on other sites
Ok...
I think i'll need to replace the findSymbol with wglGetProcAddress or even SDL_GL_GetProcAddress, although i need to link my dll with yet-another-dll like user32.lib or sdl.lib.

But thanks anyway guys, think that's it!

##### Share on other sites
I had to do something similar a while back. I used LoadLibrary to load opengl32.dll. To get core (1.1) functions I used GetProcAddress, however the entry points for extentension functions are defined in the icd, so you have to use wglGetProcAddress to get them. This function is in opengl32.dll however, so you do not need to link to a lib to get it. You can just use GetProcAddress to retrieve wglGetProcAddress.

One problem you may run into is the pixel format functions. Although versions of these exist in opengl32.dll, they do not work if called directly. You need to call them through another library (gdi32). This was not an issue for me as I was writting a replacement opengl32.dll and the app could set up the context through the other lib. I only needed to hook functions called after the context was created.

Let me know if you still have problems, some of this stuff was a little tricky.

##### Share on other sites
Ugh, why not just use GLee?

(~^_^)~ wiggle wiggle ~(^_^~)

##### Share on other sites
If I remember correctly, you have to actually create a rendering context for OpenGL before you can get the extension function pointers, so that could be a reason.

##### Share on other sites
Quote:
 Original post by MushuUgh, why not just use GLee?(~^_^)~ wiggle wiggle ~(^_^~)

Yes, that would be my perfered approach. In this case I had to link to the dll directly so I could specify the path. I was using a modified opengl32.dll that I placed in the app's directory. The app would then link to my dll instead of the real dll and I linked to the real dll directly.

Usually I would recomend using a 3rd party extension loader and letting someone else worry about it though.