Hello Johannes, I've attached a LogicOpChunk implementation (I haven't tested it, it compiles though), but in case you still want to try it yourself:
Johannes Brunen wrote:
> Hi Dirk,
> Could you please outline the task I have to do for writing a special
> StateChunk for the logical ops?
> More specifically:
> - Is there a good example which I can use for guidiance?
I used the LineChunk as an example. I don't think we have step-by-step
instructions.
> - I do have the impression that there is some code generation
> machinery at work for building
> StateChunk classes. Is that correct?
Yes, for 1.8 there is a fcdEdit in OpenSG/Tools/fcdEdit which is
relatively easy to use. To compile it osg-config should be in your PATH.
Here is what I entered (on the left side) to get the LogicOpChunk:
Name: LogicOpChunk
SystemComponent?: checked
Decoratable?: unchecked
Parent: StateChunk
Library: System
PFTypes: both
Structure: concrete
Use Local Includes: unchecked
Description: This StateChunk wraps the state associated with the
glLogicOp function.
Then on the right press the new button to create a field and enter:
Name: LogicOp
Type: GLenum
Card: Single
Access: public
Visibility: external
Header: OSGGL.h
DefaultValue: GL_COPY
DefaultHeader:
Description: The logic operation applied to fragments.
Save the information to OSGLogicOpChunk.fcd and generate the files with
the buttons "Write Field Container Base Code" and "Write Field Container
Code" then edit the files OSGLogicOpChunk.{h,cpp,inl}.
> And if that's the case,
> can I use it from within my 1.8
> (daily build: source) installation?
just drop the files in OpenSG/Source/System/State and run make/scons
from the OpenSG dir again.
> Would it be different for
> 2.0?
Not much, the *Base.{cpp,h,inl} files would have to be regenerated using
the fcd2code tool used with 2.0
> - I'm not familiar with the scons build system. What would I
> have to do in order to integrate new
> StateLogOpsChunk/StateLogOpsChunkBase sources into the build
> system?
Just drop them into the appropriate directory, the build will
automatically pick them up.
> - What would be the procedure in order to bring such an
> extension back into the 1.8/2.0 toolkit?
Open a patch ticket on opensg.vrsource.org and if it is not integrated
after some time remind people that it is there ;)
Hope it helps,
Carsten
OSGLogicOpChunk.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
