(no subject)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Vincent Lesbros-2
Hi all,

I am new to openGL, and I am trying to use it from VisualWorks
in order to achieve quickly huge calculations.

I couldn't find any documentation describing how to use OpenGL
from Visualworks apart from the OpenGL Lessons package,
the comments and ... the code of lessons.

I build my program by transforming examples from
Lesson #5 - GPGPU and Lesson #9 - Texture.

- I build a RenderContext on a FloatArray
- I create a program with the two shaders, vertexShader and fragmentShader,
- I built my geometry and a Texture (data comes from the texture),
- I understand how to pass uniform values from Smalltalk to openGL,
and use varying to pass

values from vertexShader to the fragmentShader.
- I retrieve the calculated values in my float array correctly.

It is working... up to an unknown limit :
When I try examples in growing complexity, at a time I
get a violent crash ; screen came black, and I have to reboot...

I thought it was because the time to run the job was to long,
so I rewrite my code to split it into pieces,
and do a loop in smalltalk that create the context, run a part of the job,
on the same output buffer.

Problem 1/ Each context seems to clear my output FloatArray when I
create the context on
it. so, the data calculated by the previous context of the loop is lost.
(While I don't send Clear commands). How can I make next context
working on data produced by the previous without having to copy and recopy ?

Problem 2/ After having crashed many times... I go to the VisualWorks Setting
and set the Memory option to : 1536870912  (instead of the default 536870912).
And : the crashes stopped !
So, If there is a limit in memory, why didn't I have any "Error" firing ?
like when we try "Array new: 2 ** 29"
How can I know the limits in time (and/or) memory for a context ?
Should I fork the job in a new process if it is too long ?
When I am in context whileCurrentDo: [ ... ] can other applications
(like Windows
for example) still use the graphic card ?

Problem 3/ Having to undersand how to write code for the shaders,
I found the description of shading language in http://www.opengl.org/
And I discover that the Smalltalk package do not covers all the fonctions
of openGL. And that for exemple : compute shader or tesselation shaders
are not accessible.
I read  http://forum.world.st/VW-7-8-and-OpenGL-tessellation-tp4630411.html
And I think I have not the needed time to rebuild a new interface to OpenGL 4
Is a release of OpenGL package for actual OpenGL planned ?

Problem 4/ I search in www.opengl.org about VisualWorks... but can't find
any thing. Is there any "How to" for OpenGL in VisualWorks ?
for exemple, I don't undersand the 'bind' 'unbind' methods...
in Lessons sometime there is a "geometryBuffer unbind" some time not why ???
If I have crashes that depends of the size of memory, perhaps I do not free
or release correctly objects... But where can I find the "rule of the game" ?

Problem 5/ I want to both visualize and caculate.
If my renderContext is open on a float array, I can get values in Float precision but I can't visualize them without a conversion to truplets of bytes.
If my renderCopntext is open on an image to visualize the result, I loose precision.
Should I do 2 diffrents renderContext ?


How can help me ?
Thanks,


Vincent

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc