« Return to Thread: Really slow loading of minuscule island

Re: opengl version

by matthew chadwick :: Rate this Message:

Reply to Author | View in Thread

My naivety with Squeak had caused me to get all confused, thinking I'd need to recompile a plugin for OpenGL.

It was indeed a simple case of adding those 4 constants to the appropriate method of OGLExtManager (initializeArbVertexBufferObject), which was as easy as pasting them in directly from the spec, as first directed by Josh, and then evaluating 'OGLExtManager initialize' as per the class comments.

Many thanks all!




David Faught wrote:
As Josh says, you shouldn't need to touch the VM to add OpenGL
functions.  The only thing you need to compile is Squeak code with the
Squeak compiler.  All the OpenGL functions are called dynamically via
FFI, and are wrapped by the OGLExtManager class to make them platform
independent.

On 5/21/08, Joshua Gargus schwa@... wrote:
  
Is this a completely unrelated question?  You shouldn't need to touch the VM
to add PBO support.

Addressing the question... John McIntosh has set up nice XCode projects for
compiling VMs on OS X.  However, I'm not sure where he stashes it by
default.  I couldn't find it in the SVN repository on squeakvm.org.  You'd
probably have more success asking the question the Squeak list.  Sorry I
don't have the actual answer.

Cheers,
Josh




On May 21, 2008, at 3:45 PM, Matthew Chadwick wrote:

Thanks guys. I have built the Squeak VM & plugins for Unix before so I have
some vague idea of what to do, but I'm currently on a OS X -- is there
anything I should know about building Squeak for OS X Leopard ? I've
googled, but the results are scant.

Joshua Gargus wrote:
(For some reason, David's mail is screwed up in my mail-reader, so I can't
reply-all.  So, I'm responding to this message)

David is correct about massaging the header file (or probably easier, the
spec for the OpenGL extension you're interested in:
http://opengl.org/registry/) so that Squeak can import it.  There is some
good documentation in the class comment of OGLExtManager.

It turns out that ARB_pixel_buffer_object is about the easiest extension you
could hope to add (nice place to dip your toes in!)... it doesn't require
any new function definitions (since Croquet already supports
ARB_vertex_buffer_object), and only defines 4 new constants.

Let us know if you run into trouble,

Cheers,
Josh





On May 16, 2008, at 1:06 PM, David Faught wrote:
On 5/14/08, Matthew Chadwick post@... wrote:
there are some features of OpenGL 2.0 I'd like to use (e.g. PBOs). How might
I go about bringing Croquet's interface to OpenGL up to 2.0 ?

First, carefully read through the page at
http://croquetconsortium.org/index.php/OpenGL_in_Croquet
especially the part about the OGLExtManager class comments, and look
at some of the existing examples.

As I recall, adding the FBO support was a matter of manually
reformatting parts of the OGL header (.h) files into something that
looks like the required definitions for Squeak.

Correct, either that or start with the function prototypes in the spec of
the OpenGL extension you're interested in.

 I think someone has
semi-automated this process, but it's not that hard for just a few
functions.  If you haven't tried it before, fileOut a method or two
and take a look at the .st or .cs file format.  It's not too difficult
to reformat the proper portions of the standard .h files.

I think I might have PBO code kicking around.  I'll check this weekend.

Josh


Cheers,
Dave





On May 14, 2008, at 1:57 PM, Matthew Chadwick wrote:
there are some features of OpenGL 2.0 I'd like to use (e.g. PBOs). How might
I go about bringing Croquet's interface to OpenGL up to 2.0 ?

tb@... wrote:
Hi,
AFAIK you need at least OpenGL 1.3 because of big textures, but that will
change to at least 1.4 when Croquet makes more use of shaders.

Cheers...
thbr







    

  

 « Return to Thread: Really slow loading of minuscule island

LightInTheBox - Buy quality products at wholesale price