GLAbstraction.jl icon indicating copy to clipboard operation
GLAbstraction.jl copied to clipboard

Failure to add package in Julia 1.0.1

Open kiranshila opened this issue 6 years ago • 11 comments

  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package GLAbstraction [ca6e7d0a]:
 GLAbstraction [ca6e7d0a] log:
 ├─possible versions are: [0.0.2-0.0.14, 0.1.0, 0.2.0-0.2.1, 0.3.0-0.3.2, 0.5.0-0.5.1, 0.6.0-0.6.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.2-0.0.14, 0.1.0, 0.2.0-0.2.1, 0.3.0-0.3.2, 0.5.0-0.5.1, 0.6.0-0.6.2]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

kiranshila avatar Oct 08 '18 03:10 kiranshila

Sorry, I haven't updated GLAbstraction for 1.0 yet - do you need GLAbstraction directly, or does E.g. Makie work for you? Makie includes a copy of GLAbstraction with 1.0 compat!

SimonDanisch avatar Oct 08 '18 07:10 SimonDanisch

I looked at Makie, I'm just getting lost in where a lot of the GL low level stuff is. All I need to do is create a GL context and a few easy shaders. My project requires me to render a ton of cubes and it seems as though the way Makie sends data through is as a 1D texture. For example, if I try this in Makie

lottaCubes = [(HyperRectangle(Vec3f0(rand(1:100),rand(1:100),rand(1:100)),Vec3f0(1)),
                RGBAf0(rand(Float32),rand(Float32),rand(Float32),1)) for i = 1:16385]

meshes = map(GLNormalMesh, lottaCubes)
mesh(merge(meshes))

I get a glTexImage 1D width error as the maximum size for a 1D texture is 16384.

It would seem then that I need to write some basic shaders and add some occlusion culling or something to be able to render more.

kiranshila avatar Oct 08 '18 15:10 kiranshila

This works for me:

using Makie
N = 16385
positions = [rand(Vec3f0) .* 100 .+ 1 for i = 1:16385]
colors = [RGBAf0(rand(Float32), rand(Float32), rand(Float32), 1) for i = 1:16385]
meshscatter(positions, color = colors, marker = FRect3D(Vec3f0(0), Vec3f0(2)), show_axis = false)

image

SimonDanisch avatar Oct 08 '18 15:10 SimonDanisch

Interesting, I will investigate further. I am still very new to Julia, I am coming from doing GL work in Common Lisp. Thank you for your help.

kiranshila avatar Oct 08 '18 15:10 kiranshila

Hi, this is a tough issue for me as well. Except, I use the vertex and fragment shader macros which aren't accommodated in Makie as far as I know...

JMurph2015 avatar Feb 13 '19 08:02 JMurph2015

They are ;) GLMakie contains a full copy of GLAbstraction: https://github.com/JuliaPlots/GLMakie.jl/blob/master/src/GLAbstraction/GLShader.jl#L2

SimonDanisch avatar Feb 13 '19 08:02 SimonDanisch

Since GLMakie contains a functional 1.0 version of GLAbstraction, are there plans to update GLAbstraction or has all development moved over to GLMakie?

nfehrenbach avatar Aug 11 '19 06:08 nfehrenbach

I kind of gave GLAbstraction to @louisponet who updated things... I'm currently work on ShaderAbstractions.jl, which might become the new GLAbstraction from my perspective ;)

SimonDanisch avatar Aug 11 '19 11:08 SimonDanisch

I have been using the master version of this repo in projects of mine, that should work perfectly on Julia 1.x. Could you try ] add GLAbstraction#master? I guess I should make a release.

On the development side of things, I work on OpenGL projects off and on, and I use this for all lowish-level OpenGL functionality. I add/update things as I use them since to me it doesn't make a lot of sense to create/develop an API type package without actually using it. Therefore, I'm fully open to any help, issues and suggestions on where to take this package.

louisponet avatar Aug 12 '19 16:08 louisponet

I'm away from my machine today, but I'll try this evening and reply with my results.

nfehrenbach avatar Aug 12 '19 17:08 nfehrenbach

@louisponet , your solution to add the master branch did the trick! Thanks!

nfehrenbach avatar Aug 13 '19 01:08 nfehrenbach