On 3 July 2013 22:36, Guillermo Polito guillermopol...@gmail.com wrote:
I'm just guessing, but if a function receives a pointer, it does not store
the pointer anywhere but works with the contents, and finally returns while
VM is blocked, voilá :).
Yes.
On Wed, Jul 3, 2013 at 10:13 PM,
ok we should write that in the NB chapter.
On Jul 3, 2013, at 10:36 PM, Guillermo Polito guillermopol...@gmail.com wrote:
I'm just guessing, but if a function receives a pointer, it does not store
the pointer anywhere but works with the contents, and finally returns while
VM is blocked,
On 2 July 2013 23:04, kilon theki...@yahoo.co.uk wrote:
Thank you Igor for the clarifications, the reason why I prefer using the
nativeboost methods is because :
a) I was not sure if smalltalk types map correctly to C types and which
Smalltalk types correspond to which C types
well, there's
if you pass a pointer to something in object memory into function,
make sure GC cannot move the object while function uses/accessing its
contents.
How?
And I love pharo and what you guys have created , a lot of fun and very
productive. So yes I will definitely help you out in documenting NB.
Actually my idea was not to publish in a blog. I hate blogs though I have
one I just find it very non flexible so I was thinking instead wikibooks .
I like to see people contributing :), maybe you could do some contribution
on the code-side?
I personally consider well written, executable examples more valuable than
written documentation outside the image. And I think NativeBoost could
benefit from some in-image documentation.
On
Igor got you will try to avoid using #sizeOf: , even for a readability I can
replace it with a simple method returning the same thing depending in
platform.
Now because I am confused lets clarify how the whole things works because I
see many errors in my code and clearly I don't understand how
Igor one last thing I forgot to ask about b) how I pass the pointer to the
function ?
Now Camillo , If you guys care about making pharo popular , I mean really
popular you should stop caring what you want or what I want and care more
about what most people want. Democracy sucks but hey thats the
On 2 July 2013 16:27, kilon theki...@yahoo.co.uk wrote:
Igor got you will try to avoid using #sizeOf: , even for a readability I can
replace it with a simple method returning the same thing depending in
platform.
Now because I am confused lets clarify how the whole things works because I
see
Thank you Igor for the clarifications, the reason why I prefer using the
nativeboost methods is because :
a) I was not sure if smalltalk types map correctly to C types and which
Smalltalk types correspond to which C types
b) many opengl functions ask for the address of the value and the value
On 30 June 2013 21:11, kilon theki...@yahoo.co.uk wrote:
I am not going to post my code here cause it has become too big , you can
find it here
http://www.smalltalkhub.com/#!/~kilon/GLTutorial
http://www.smalltalkhub.com/#!/~kilon/GLTutorial
I tried adding newlines with String cr to my
Thanks Igor , yes I was aware of String Cr because I have done some googling
around and it did find information on the subject. Apparently it failed
because I had an error in my source.
So for our next challenge is learning how to fetch data that a pointer
points to.
in this case I have an
Sorry I forgot to paste how i create the vpos pointer
vpos := NativeBoost allocate: vptrsize.
My questions on how to pass the contents of a C array to a C function as can
be seen in quoted message remains :)
kilon wrote
Thanks Igor , yes I was aware of String Cr because I have done some
I love your questions!
When you will get all your anwsers you have to write a blog about it so that we
can use that in
a chapter so that every body can know how to do it.
Just no time to think right now :( sadly
Stef
On Jul 1, 2013, at 8:40 PM, kilon theki...@yahoo.co.uk wrote:
Thanks Igor
On 1 July 2013 20:40, kilon theki...@yahoo.co.uk wrote:
Thanks Igor , yes I was aware of String Cr because I have done some googling
around and it did find information on the subject. Apparently it failed
because I had an error in my source.
So for our next challenge is learning how to fetch
I am not going to post my code here cause it has become too big , you can
find it here
http://www.smalltalkhub.com/#!/~kilon/GLTutorial
http://www.smalltalkhub.com/#!/~kilon/GLTutorial
I tried adding newlines with String cr to my shaders strings, but apparently
opengl is not convinced. It
On 28 June 2013 13:11, kilon theki...@yahoo.co.uk wrote:
found a bug in NBOpengl this function definition is incorrect
getShaderiv_shader: in shader pname: in pname params: out params
primitive: #primitiveNativeCall module: #NativeBoostPlugin error:
primErrorCode
^ self
I also tried
gl shaderSource_shader: shader count: 1 string: (NBExternalAddress
fromString: shaderString) length: (NBExternalObject null) .
still getting Error during FFI call : NIL .
This is the full method :
createShader: shaderType string: shaderString
create shader using its
On Jun 27, 2013, at 2:22 , Igor Stasenko wrote:
i think it fails because you passing strange (NBExternalObject null)
as length parameter.
i guess you meant NBExternalAddress null instead.
Speaking of weird external stuff…
NBExternalArray class #initElementType: aTypeName
Igor we should document such mistakes
This is important can you add such comments in class comment?
On Jun 27, 2013, at 5:26 PM, Igor Stasenko siguc...@gmail.com wrote:
On 27 June 2013 17:14, Henrik Johansen henrik.s.johan...@veloxit.no wrote:
On Jun 27, 2013, at 4:11 , Igor Stasenko wrote:
On 27 June 2013 18:32, Stéphane Ducasse stephane.duca...@inria.fr wrote:
On Jun 2
Yes, you right.
(NBFFICallout new resolveType: 'byte*') valueSize = 1
(NBFFICallout new resolveType: 'byte*') storageSize = 4
apparently, if one wants array with 'byte*' element type (or any other)
it
On 27 June 2013 18:33, Stéphane Ducasse stephane.duca...@inria.fr wrote:
Igor we should document such mistakes
This is important can you add such comments in class comment?
Well, it is a general rule to never operate with pointers to moveable objects,
because objects may change their locations
Ok we solved that problem lest move to the next one.
I have this line of code
Glint status;
to be used in this
glGetShaderiv(shader, GL_COMPILE_STATUS, status);
Now my first thought was to do this
statusAdress := NativeBoost allocate: NBOpenGLTypes GLint.
but of course NBOpenGLTypes GLint
My code
gl shaderSource_shader: shader count: 1 string: shaderString length: 0.
must not be correct. I try to translate this
glShaderSource(shader, 1, strFileData, NULL);
using the tutorial in here -
http://www.arcsynthesis.org/gltut/Basics/Tut01%20Making%20Shaders.html
Have you tried
(gl getString: GL_VERSION) readString
or if it does not return an NBExternalAddress
(NBExternalAddress value: (gl getString: GL_VERSION)) readstring
On Sat, Jun 22, 2013 at 4:46 PM, kilon theki...@yahoo.co.uk wrote:
I am trying to find out what version of Opengl NBOpenGL is
No I did not, because I dont have the brain power to assume that
NBExternalAdress will have some methods to make my life easier. And of
course it works like a charm now, thank you very much :)
--
View this message in context:
http://forum.world.st/Understanding-NBOpenGL-tp4686514p4694639.html
next question .
I have this method.
initializeProgram
create each shader and program
| shaderList strVertexShader strFragmentShader |
strVertexShader := self createShader: GL_VERTEX_SHADER string: ( self
vertexShader ).
strFragmentShader := self
On Jun 23, 2013, at 4:52 PM, kilon theki...@yahoo.co.uk wrote:
next question .
I have this method.
initializeProgram
create each shader and program
| shaderList strVertexShader strFragmentShader |
strVertexShader := self createShader: GL_VERTEX_SHADER
yeah and I read about that in PBE and of course I forgot about it. That is
why we need the mailing lists.
Ok that solved the problem partially it does not complain about
strVertexShader but it still complains about strFragmentShader . I use this
code.
shaderList := {strVertexShader
On Jun 23, 2013, at 5:51 PM, kilon theki...@yahoo.co.uk wrote:
yeah and I read about that in PBE and of course I forgot about it. That is
why we need the mailing lists.
Ok that solved the problem partially it does not complain about
strVertexShader but it still complains about
I am trying to find out what version of Opengl NBOpenGL is using so I do:
gl getString:GL_VERSION.
it works and returns me a pointer. I looked at definition of methods and it
is defined to return a pointer.
Question is how I get the string that the pointer points too ?
--
View this message
On 10 June 2013 03:54, Igor Stasenko siguc...@gmail.com wrote:
On 9 June 2013 20:47, kilon theki...@yahoo.co.uk wrote:
Ok I am moving towards the direction you indicated , its just takes time
because I am clueless.
Af far as macos is concerned I was sucessful into intialising opengl context
On 4 June 2013 11:40, kilon theki...@yahoo.co.uk wrote:
Ok new problem, NBOpengl seems to not work at all on my UBUNTU 12.10 machine.
I was trying to do GLViewportMorph new openInWorld , which works fine on my
iMac and it gave me error: function unavailable.
So I assumed it cannot find some
On 22 May 2013 20:11, kilon theki...@yahoo.co.uk wrote:
I am looking at NBGLContextDriver and NBGLDisplay and I see none of that hard
coded stuff.
Look more carefully: there's a code to manage viewport and setting up
buffers and other things,
like blend more etc in those classes.
It is not
ok i see, well I did not mean that we dont need platform specific code, of
course we do.
thanks for adding me.
I will first try to contribute some example classes that show how nbopengl
can be used in practice.
And see if I can fix any of the bugs I find.
No problem if you dont have time, I
Hey Igor , yes I would love to contrinbute to NBOpenGL for a very long time.
I could at least fix those small errors like the one I reported and add
documentation to methods and
especially classes.
I am using pharo 3.0 and GLTTRenderingDemo does not work. I get an error.
Apparently it cannot
I am looking at NBGLContextDriver and NBGLDisplay and I see none of that hard
coded stuff.
I assume you mean the platform specific packages like NBMacGLContextDriver
,NBGLXContextDriver etc. where I see alot of platform specific code inside
the methods of those classes .
--
View this message
On 17 May 2013 10:21, kilon theki...@yahoo.co.uk wrote:
Thank you all for your replies. I have used the solution I get new errors
now. Is there an example how to create a context with NBOpenGL because the
examples NBOpenGL is coming with are confusing at best ?
Pharo2.0
Latest update: #20590
38 matches
Mail list logo