Code Monkey home page Code Monkey logo

Comments (15)

faiface avatar faiface commented on May 18, 2024 1

Ok, so I was experimenting again and figured out, that even though OpenGL 2.1 lack several important features itself (such as vertex arrays), it supports numerous standard extensions that make it forward-compatible.

I've added the branch gl2.1 to Pixel and GLHF. Would you please switch to both of them (Pixel uses GLHF) and test whether it works on Intel HD 3000? In case it does, I'll consider including these changes.

from pixel.

faiface avatar faiface commented on May 18, 2024

Hi!

So I've experimented a bit and tried using OpenGL 3.1 in glhf, which Pixel uses for OpenGL. The trouble is, that go-gl only supports gles2 in version 3.1, which lacks several important OpenGL functions which I use (such as glGetBufferSubData or glGetTexImage).

So, I'm sorry, but right now, I won't be able to use a lower version of OpenGL.

However, your graphics card is perfectly capable of doing OpenGL 3.3, it's just that Intel was lazy enough not to make proper drivers. But in Linux, everything should work from what I googled.

I'd also like to note, that except for Intel HD 2000 and Intel HD 3000 on Windows, pretty much all GPUs manufactured <10 years ago support OpenGL 3.3, so I don't think it's a very big deal or a non-starter.

And one more note, Engo actually uses OpenGL 2.1, which is even older and worse.

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

I guess ultimately my concern would be for users running old hardware not being able to play my game.

In what ways is OpenGL 2.1 older/worse? ie. what features / potential performance gains are lost?

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

Laptop is physically elsewhere at the moment, but should be able to get back to you in 2 or 3 days.
Thanks!

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

@faiface FYI, looks like you haven't pushed up the gl2.1 branch code yet.

from pixel.

faiface avatar faiface commented on May 18, 2024

Correct, pushed now. Thanks.

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

image
image
image

Working without issues now!
If there's any specific examples/ behaviour you want me to test, let me know.

from pixel.

faiface avatar faiface commented on May 18, 2024

Ok, cool. I would like you to also try switching the glhf branch to master, but leaving Pixel at gl2.1. This will cause OpenGL imports to be 3.3 and thus not allowing to use non-modern OpenGL. Will you test this please?

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

Fails to run.

Platformer Example:

$ ./platformer.exe
panic: glGetBufferParameteri64v

goroutine 1 [running, locked to thread]:
github.com/faiface/glhf.Init()
        C:/GoProjects/src/github.com/faiface/glhf/orphan.go:14 +0x79
github.com/faiface/pixel/pixelgl.(*Window).begin(0xc042092a80)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:340 +0x50
github.com/faiface/pixel/pixelgl.NewWindow.func1(0xc042039e60, 0x439c85)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:116 +0x1f3
github.com/faiface/mainthread.CallErr.func1()
        C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:74 +0x2d
github.com/faiface/mainthread.Run(0x593038)
        C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:46 +0x166
github.com/faiface/pixel/pixelgl.Run(0x593038)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/run.go:32 +0x65
main.main()
        C:/GoProjects/src/github.com/faiface/pixel/examples/platformer/main.go:393 +0x34

Batch Example:

$ ./05_drawing_efficiently_with_batch.exe
panic: glGetBufferParameteri64v

goroutine 1 [running, locked to thread]:
github.com/faiface/glhf.Init()
        C:/GoProjects/src/github.com/faiface/glhf/orphan.go:14 +0x79
github.com/faiface/pixel/pixelgl.(*Window).begin(0xc04208e000)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:340 +0x50
github.com/faiface/pixel/pixelgl.NewWindow.func1(0xc042039e60, 0x439c85)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:116 +0x1f3
github.com/faiface/mainthread.CallErr.func1()
        C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:74 +0x2d
github.com/faiface/mainthread.Run(0x5851b8)
        C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:46 +0x166
github.com/faiface/pixel/pixelgl.Run(0x5851b8)
        C:/GoProjects/src/github.com/faiface/pixel/pixelgl/run.go:32 +0x65
main.main()
        C:/GoProjects/src/github.com/faiface/pixel/examples/guide/05_drawing_efficiently_with_batch/main.go:109 +0x34

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

@faiface Pinging you on this one so it's not forgotten :)

from pixel.

faiface avatar faiface commented on May 18, 2024

@silbinarywolf Since the OpenGL 2.1 support proven to be non-problematic, I will merge it to the master when I have time. I've been quite busy recently, I expect to do it in 2 or 3 days. But thanks for reminding anyway :)

from pixel.

silbinarywolf avatar silbinarywolf commented on May 18, 2024

Yeah no worries. Thanks for your work on this, love the simplicity of this library :)

from pixel.

faiface avatar faiface commented on May 18, 2024

Ok, I just switched Pixel and GLHF to OpenGL 2.1. Sorry for the delay, I was really busy. Does it work for you?

from pixel.

faiface avatar faiface commented on May 18, 2024

But now it introduced an issue here #37, which seems to be related to this. I might need to revert this change, since it seems to be causing severe problems on OS X. I guess there are more OS X users than users of 10 years old GPUs.

from pixel.

faiface avatar faiface commented on May 18, 2024

Unfortunately, I had to switch back to OpenGL 3.3, because this doesn't seem to be able to work on OS X (sort of mixing new and old OpenGL). If I figure this out later, I'll let you know.

from pixel.

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.