Comments (15)
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.
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.
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.
Laptop is physically elsewhere at the moment, but should be able to get back to you in 2 or 3 days.
Thanks!
from pixel.
@faiface FYI, looks like you haven't pushed up the gl2.1 branch code yet.
from pixel.
Correct, pushed now. Thanks.
from pixel.
Working without issues now!
If there's any specific examples/ behaviour you want me to test, let me know.
from pixel.
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.
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.
@faiface Pinging you on this one so it's not forgotten :)
from pixel.
@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.
Yeah no worries. Thanks for your work on this, love the simplicity of this library :)
from pixel.
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.
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.
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)
- Bitmap rendering could be sped up HOT 2
- No examples folder? HOT 1
- Move Geometry into its own package HOT 2
- Wonky Coordinate grid HOT 6
- Having problems running the example HOT 2
- Travis build is failing HOT 5
- Can pixel run on browsers? HOT 1
- Improve typing example HOT 1
- Cannot build on Arch Linux HOT 1
- Alllow shader / uniforms to be updated during the game loop
- Apple Silicon (M1+) Macs Require GLFW for OpenGL ES Implementation HOT 2
- Passthrough Shader in example breaks IMDraw HOT 1
- SetMatrix(matrix) + Draw(target) vs Draw(target, matrix)
- is there a way to run pixel on android
- Scale coordinates? HOT 1
- animation from tutorial lags sometimes
- How to set text kerning?
- Multiple windows bug: sprite on one window deletes shapes on other window HOT 1
- Faiface *** IMPORTANT ** -- PLEASE READ HOT 2
- 100x100 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixel.