You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is the place to post "how do I..." type questions, but I wasn't able to find any kind of user forum, so please point me onwards if I'm in the wrong place.
I'm hoping I can use this package for the relatively simple task of displaying a simple 2D grid-based simulation in real time as it updates. I'd like to use OpenGL for this because then the display won't slow it down too much and I can easily zoom and pan around etc. To do this, I need to either dynamically update a texture, or create a new one each frame.
Starting with the tutorial at https://github.com/JuliaGL/GLAbstraction.jl/blob/master/tutorials/textures1.jl, I tried creating a new Texture object and calling std_renderobject again on each iteration. This works, but it seems quite slow, and makes me wonder if this is the right way to do it. However, I was unable to find any documentation suggesting whether these objects can be dynamically updated without creating new ones every time.
My apologies if this is a dumb question. I'm not at all an OpenGL expert, and would greatly appreciate a simple explanation or even just an example of the best way to dynamically update a texture (from a cpu-based Julia array), if that can be done in this package.
The text was updated successfully, but these errors were encountered:
ERROR: LoadError: Indexing only defined for integers or ranges. Found: Colon()
Stacktrace:
[1] (::GLAbstraction.##1#2)(::Colon) at /Users/ndv/.julia/v0.6/GLAbstraction/src/AbstractGPUArray.jl:52
[2] setindex!(::GLAbstraction.Texture{ColorTypes.RGBA{FixedPointNumbers.Normed{UInt8,8}},2}, ::Array{ColorTypes.RGBA{FixedPointNumbers.Normed{UInt8,8}},2}, ::Colon, ::Colon) at /Users/ndv/.julia/v0.6/GLAbstraction/src/AbstractGPUArray.jl:58
[3] macro expansion at /Users/ndv/Dropbox/Code/Julia GL testing/test04.jl:53 [inlined]
[4] anonymous at ./:?
[5] include_from_node1(::String) at ./loading.jl:576
[6] include(::String) at ./sysimg.jl:14
[7] process_options(::Base.JLOptions) at ./client.jl:305
[8] _start() at ./client.jl:371
while loading /Users/ndv/Dropbox/Code/Julia GL testing/test04.jl, in expression starting on line 46
(Let me know if you need the code I'm running. But I'm happy now, since I have a method that works!)
I'm not sure if this is the place to post "how do I..." type questions, but I wasn't able to find any kind of user forum, so please point me onwards if I'm in the wrong place.
I'm hoping I can use this package for the relatively simple task of displaying a simple 2D grid-based simulation in real time as it updates. I'd like to use OpenGL for this because then the display won't slow it down too much and I can easily zoom and pan around etc. To do this, I need to either dynamically update a texture, or create a new one each frame.
Starting with the tutorial at https://github.com/JuliaGL/GLAbstraction.jl/blob/master/tutorials/textures1.jl, I tried creating a new Texture object and calling std_renderobject again on each iteration. This works, but it seems quite slow, and makes me wonder if this is the right way to do it. However, I was unable to find any documentation suggesting whether these objects can be dynamically updated without creating new ones every time.
My apologies if this is a dumb question. I'm not at all an OpenGL expert, and would greatly appreciate a simple explanation or even just an example of the best way to dynamically update a texture (from a cpu-based Julia array), if that can be done in this package.
The text was updated successfully, but these errors were encountered: