Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: LaserBoy GUI

  1. #11
    Join Date
    Jan 2006
    Location
    Akron, Ohio USA
    Posts
    1,754

    Default

    Quote Originally Posted by keeperx View Post
    here is what you NEED to compile laserboy as is...
    DEV C++



    In DEV C++ you have to download some additional packages (tools/check for updates) use the "devpacks.org" server
    1. SDL
    2. SDL_gfx (or SDL_image)
    3. zlib
    4. libpng
    5. libtiff
    6. libjpg
    7. libpixman (not sure if you need this)
    do them in this order (i think) SDL, zlib, libjpg, libpng, libtiff, sdl_gfx, (or sdl_image

    --------------------------------------------------------------------------

    James, what the hell is 'screen'.... and can i 1 to 1 replace that with my box pointer? ?


    Can EZI or BMP be a uchar?


    I know you need SDL, but why do you need the ones in red?
    1. SDL
    2. SDL_gfx (or SDL_image)
    3. zlib
    4. libpng
    5. libtiff
    6. libjpg
    7. libpixman (not sure if you need this)
    The "screen" is the name of the object that gives you an SDL_Surface. Actually it is a pointer to the object. It is global.

    EZI is a pointer to the one and only ez_uail_gui. This is the top level object, so a global pointer is set to it so that every other part of the code can see it.

    BMP is a text macro and is nothing more than a substitute for EZI->bmp.
    EZI->bmp is a part of the ez_uail_gui and bmp is a pointer to the memory clone of the display area (the screen).

    James.
    Last edited by James Lehman; 11-11-2008 at 10:27.

  2. #12
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    as i suspected... BMP (or EZI->bmp) inot a real BMP yet. can you make BMP a uchar?

    the ones in red may not be needed, but i think they are.. check your install see if you use them.. i have had to install them at home and at work to compile correctly..

    im still calling you on the way home.. i want to get something done very soon .. i have made no progress today and its pissing me off..

    also noticed lots of other places that SDL needs to be yanked out (other than laserboy.cpp) you probably already know this tho..


    seperating the SDL code from the laserboy core code may be a very nice thing for you to work on... would make my job easier..

    im going to try to recreate laserboy.cpp as FLTK code, but ez_ uail_gui.cpp needs to be sorted before i can realy figure it out (SDL is entrenched with the core in this file)
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  3. #13
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    To do FLTK development in DEV C++ you need the fltk package for dev c++, unfortunately the package will not auto download and install..

    fortunately im one hell of a guy and have included it in the message that that you are currently engaged in the act of reading.

    use the "tools/package manager" in DEV C++ to install
    Attached Files Attached Files
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  4. #14
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    a thought about the nature of future structure of laserboy code from the inside out.

    I believe, that moving forward it would be good to have a set of standards and practices in place for the code structure.

    here is my initial view on the subject...

    A layered approach to the code structure seems key in my mind. I see it like this..

    please excuse my ignorance.. im still learning the code

    CORE
    The core of laserboy would be the virtual 3d space created. it has often been described as a "box" that we draw in. that box is a representation of the real 3d space in front of the laser output.

    The core consists of the following
    Laserboy space (the box itself)
    Objects that are required to draw within that space (points, vectos, etc)

    the core is a space for us to draw in, like a 3d blank canvas.

    VIEW
    This is the window (or camera) thru which we view the core
    it is a set of tools for changing perspective, zoom, rotation, pan.. etc...

    PALETTE
    This controls color. it is impose on the information that lives within the core.

    BASIC TOOLS
    This how we create manipulate the objects in the core. it includes tools for creating points, vectors, lines, etc..

    AUTOMATION TOOLS
    This includes the functions required for all the nifty shit laserboy can do automatically

    PLUGINS
    this would provide a way to expand out tools..

    GUI
    The gui displays the view and provides a human interface to the tools (basic and automated)
    It provides a way to interact with this tools by tweaking and changing any of the values
    -------------------------

    Most of this is in place except that right now the view and the gui are married to each other...

    The current goal (my current goal) is to work on seperating the view from the gui. in otherwords the gui will only be in charge of DISPLAYING the view.

    we accomplish this by removing SDL and replacing it with fltk

    the issue is that SDL is being used in ways that i dont fully understand. but we are working on that..
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  5. #15
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Here is my dilemma

    edited...

    that wasn't my dilemma
    Last edited by keeperx; 11-12-2008 at 09:20.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  6. #16
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Here is another syntax for making the window and box

    this is mine from scratch, but its just a VERY simple example

    no BMP here... ill throw one in tonight..

    Code:
    #in#include <FL/Fl.H>
    #include <FL/Fl_Window.H>
    #include <FL/Fl_Box.H>
    #include <math.h>
    #include <FL/Fl_Image.H>
    
    int bres = 480;
    int wyres = 600;
    int wxres = 800;
    
    int
    main(int argc, char ** argv)
    {
        
    	Fl_Window *window;
            Fl_Box *FL_Surface;  
      
        	    FL_Surface = new Fl_Box(4, 4, bres, bres, "Main Surface");
    	    FL_Surface->box(FL_UP_BOX);
    	    	    
    	    window = new Fl_Window(wxres, wyres, "LaserBoy GUI test 2");
    	    window->end();
                window->show(argc, argv);
                window->color(FL_BLACK);	    
        
    
    	return(Fl::run());
    }
    here is another example
    http://www.gidforums.com/t-18175.html
    Last edited by keeperx; 11-12-2008 at 09:54.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •