GithubHelp home page GithubHelp logo

Comments (11)

SoylentGraham avatar SoylentGraham commented on August 22, 2024

Out of curiosity, which platforms is glGetError slow on?

from remotery.

bkaradzic avatar bkaradzic commented on August 22, 2024

For example, extreme case is Native Client, where glGetError serializes GL client and server.

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

This sounds good but I'm in the middle of Mexico right now and can't pull until we have a more stable internet connection. I'll get this through next week.

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

OK, this isn't too much of an issue right now:

  • On Windows, glGetError is linked if you can already call wglGetProcAddress.
  • Native Client isn't hooked up to use OpenGL as its rmtGetProcAddress impl is empty.
  • It's a much bigger problem. On Windows you still need to static link for wglGetProcAddress. There's also glXGetProcAddressARB and NSGLGetProcAddress which I have no idea about.

The whole thing does need a bit of a cleanup. How do you get around the wglGetProcAddress issue?

I'll open another issue for calls being slow as their complexities are very different.

from remotery.

bkaradzic avatar bkaradzic commented on August 22, 2024

glGetError can be loaded with GetProcAddress.

See how I do dynamic loading of GL in bgfx:
https://github.com/bkaradzic/bgfx/blob/master/src/glcontext_wgl.cpp#L15

https://github.com/bkaradzic/bgfx/blob/master/src/glcontext_wgl.cpp#L109

This loads GL 1.0 symbols:
https://github.com/bkaradzic/bgfx/blob/master/src/glcontext_wgl.cpp#L367

from remotery.

bkaradzic avatar bkaradzic commented on August 22, 2024

Btw, forgot to mention, the reason why I see this issue is because bgfx doesn't link with opengl32.lib (nor d3d9/11/etc.) at all. Everything is dynamically loaded.

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

Yep, I get that. My game uses multiple DLLs and I want to be able to issue GPU samples outside of the graphics DLLs without linking to the graphics libraries.

Thanks for your help.

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

Preliminary work on this 1f2c461

from remotery.

bkaradzic avatar bkaradzic commented on August 22, 2024

What's wrong with GL in one change list. :)

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

Only Linux left to fix now. Should be able to dlopen libgl.so by the looks of things: https://github.com/ApoorvaJ/Papaya/blob/3808e39b0f45d4ca4972621c847586e4060c042a/src/libs/gl_lite.h#L132

from remotery.

dwilliamson avatar dwilliamson commented on August 22, 2024

Fixed in c66d2e8

from remotery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.