Permalink
Browse files

glui can now be built as a dll with MSVC7.1

  • Loading branch information...
baxissimo committed Jul 18, 2006
1 parent b50e581 commit 073990da4004da7cdba743974f8c1de07a73afb7
Showing with 1,429 additions and 207 deletions.
  1. +12 −10 glui.cpp
  2. +1 −1 glui_button.cpp
  3. +1 −1 glui_checkbox.cpp
  4. +1 −1 glui_control.cpp
  5. +17 −0 glui_internal.h
  6. +1 −1 glui_panel.cpp
  7. +1 −1 glui_radio.cpp
  8. +1 −1 glui_rollout.cpp
  9. +2 −2 glui_scrollbar.cpp
  10. +1 −20 glui_spinner.cpp
  11. +1 −1 glui_string.cpp
  12. +1 −1 glui_tree.cpp
  13. +71 −57 include/GL/glui.h
  14. +94 −0 msvc/README.txt
  15. +153 −14 msvc/example1.vcproj
  16. +153 −15 msvc/example2.vcproj
  17. +151 −14 msvc/example3.vcproj
  18. +153 −15 msvc/example4.vcproj
  19. +156 −17 msvc/example5.vcproj
  20. +154 −16 msvc/example6.vcproj
  21. +46 −7 msvc/glui.sln
  22. +16 −12 msvc/glui.vcproj
  23. +242 −0 msvc/gluidll.vcproj
View
@@ -581,10 +581,10 @@ void GLUI_Main::display( void )
}
/******* Draw GLUI window ******/
glClearColor( (float) bkgd_color.r / 255.0,
(float) bkgd_color.g / 255.0,
(float) bkgd_color.b / 255.0,
1.0 );
glClearColor( bkgd_color[0] / 255.0f,
bkgd_color[1] / 255.0f,
bkgd_color[2] / 255.0f,
1.0f );
glClear( GL_COLOR_BUFFER_BIT ); /* | GL_DEPTH_BUFFER_BIT ); */
set_ortho_projection();
@@ -1129,10 +1129,12 @@ GLUI_Main::GLUI_Main( void )
curr_cursor = GLUT_CURSOR_LEFT_ARROW;
int r=200, g=200, b=200;
bkgd_color.set( r,g,b );
bkgd_color_f[0] = r / 255.0;
bkgd_color_f[1] = g / 255.0;
bkgd_color_f[2] = b / 255.0;
bkgd_color[0] = r;
bkgd_color[1] = g;
bkgd_color[2] = b;
bkgd_color_f[0] = r / 255.0f;
bkgd_color_f[1] = g / 255.0f;
bkgd_color_f[2] = b / 255.0f;
/*** Create the main panel ***/
main_panel = new GLUI_Panel;
@@ -1148,7 +1150,7 @@ void GLUI_Main::draw_raised_box( int x, int y, int w, int h )
w = w+x;
h = h+y;
glColor3ub( bkgd_color.r, bkgd_color.g, bkgd_color.b );
glColor3ubv( bkgd_color );
glBegin( GL_LINE_LOOP );
glVertex2i( x+1, y+1 ); glVertex2i( w-1, y+1 );
glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
@@ -1179,7 +1181,7 @@ void GLUI_Main::draw_lowered_box( int x, int y, int w, int h )
w = w+x;
h = h+y;
glColor3ub( bkgd_color.r, bkgd_color.g, bkgd_color.b );
glColor3ubv( bkgd_color );
glBegin( GL_LINE_LOOP );
glVertex2i( x+1, y+1 ); glVertex2i( w-1, y+1 );
glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
View
@@ -136,7 +136,7 @@ void GLUI_Button::draw_text( int sunken )
{
int string_width;
glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
glColor3ubv( glui->bkgd_color );
glDisable( GL_CULL_FACE );
glBegin( GL_QUADS );
glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
View
@@ -148,7 +148,7 @@ void GLUI_Checkbox::draw_active_area( void )
glLineStipple( 1, 0x5555 );
glColor3f( 0., 0., 0. );
} else {
glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
glColor3ubv( glui->bkgd_color );
}
glBegin( GL_LINE_LOOP );
View
@@ -74,7 +74,7 @@ void GLUI_Control::set_to_bkgd_color( void )
if ( NOT glui )
return;
glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
glColor3ubv( glui->bkgd_color );
}
/******** GLUI_Control::draw_box_inwards_outline() ********/
View
@@ -101,5 +101,22 @@
/**** Return the ASCII control code given the non-control ASCII character */
#define CTRL(c) ( (c>=('a'-1)) ? (c-'a'+1) : (c-'A'+1) )
/*
typedef unsigned char Byte;
#ifndef _RGBC_
class RGBc
{
public:
Byte r, g, b;
void set(Byte r,Byte g,Byte b) {this->r=r;this->g=g;this->b=b;}
RGBc( void ) {}
RGBc( Byte r, Byte g, Byte b ) { set( r, g, b ); }
};
#define _RGBC_
#endif
*/
#endif /* GLUI_INTERNAL_H */
View
@@ -124,7 +124,7 @@ void GLUI_Panel::draw( int x, int y )
str_width = string_width(name);
if ( glui )
glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
glColor3ubv(glui->bkgd_color);
glDisable( GL_CULL_FACE );
glBegin( GL_QUADS );
glVertex2i( left-3, 0 ); glVertex2i( left+str_width+3, 0 );
View
@@ -335,7 +335,7 @@ void GLUI_RadioButton::draw_active_area( void )
glLineStipple( 1, 0x5555 );
glColor3f( 0., 0., 0. );
} else {
glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
glColor3ubv( glui->bkgd_color );
}
glBegin( GL_LINE_LOOP );
View
@@ -186,7 +186,7 @@ void GLUI_Rollout::draw( int x, int y )
glui->draw_raised_box( left, top, w-left*2, 16 );
if ( glui )
glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
glColor3ubv(glui->bkgd_color);
glDisable( GL_CULL_FACE );
glBegin( GL_QUADS );
glVertex2i( left+1, top+1 ); glVertex2i( right-1, top+1 );
View
@@ -322,7 +322,7 @@ void GLUI_Scrollbar::draw_scroll_arrow(int arrowtype, int x, int y)
return; /* tri is NULL */
}
glColor3ubv(&glui->bkgd_color.r);
glColor3ubv(glui->bkgd_color);
glRecti(x,y,x+GLUI_SCROLL_ARROW_WIDTH,y+GLUI_SCROLL_ARROW_HEIGHT);
if (!offset) {
glui->draw_raised_box(x,y+1,GLUI_SCROLL_ARROW_WIDTH-1,GLUI_SCROLL_ARROW_HEIGHT-1);
@@ -414,7 +414,7 @@ void GLUI_Scrollbar::draw_scroll() {
void GLUI_Scrollbar::draw_scroll_box(int x, int y, int w, int h)
{
if (!enabled) return;
glColor3ubv(&glui->bkgd_color.r);
glColor3ubv(glui->bkgd_color);
glRecti(x,y,x+w,y+h);
glui->draw_raised_box(x,y, w-1, h-1);
View
@@ -52,25 +52,6 @@ FIXME: there's a heck of a lot of duplication between this and glui_scrollbar.cp
#define GLUI_SPINNER_CALLBACK_INTERVAL 1
/****************************** spinner_edittext_callback() ******************/
/* This function is not used anymore. It has been replaced by directly */
/* Including an optional pointer to a spinner from an edittext box */
void spinner_edittext_callback( int id )
{
GLUI_Spinner *spinner;
putchar( '.' ); flushout;
spinner = (GLUI_Spinner*) id;
if ( NOT spinner )
return;
spinner->do_callbacks();
}
/****************************** GLUI_Spinner::GLUI_Spinner() ****************/
GLUI_Spinner::GLUI_Spinner( GLUI_Node* parent, const char *name,
@@ -310,7 +291,7 @@ void GLUI_Spinner::draw( int x, int y )
glLineStipple( 1, 0x5555 );
}
else {
glColor3ub( glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b );
glColor3ubv( glui->bkgd_color );
}
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
View
@@ -46,7 +46,7 @@ GLUI_String& glui_format_str(GLUI_String& str, const char* fmt, ...)
va_list arg;
while (1) {
va_start(arg, fmt);
int ret = vsnprintf(buf,299,fmt,arg);
int ret = vsnprintf(buf,bufsz-1,fmt,arg);
va_end(arg);
if (ret>=0) {
break;
View
@@ -168,7 +168,7 @@ void GLUI_Tree::draw( int x, int y )
glui->draw_raised_box( left, top, 16, 16 );
if ( glui )
glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
glColor3ubv(glui->bkgd_color);
glDisable( GL_CULL_FACE );
glBegin( GL_QUADS );
glVertex2i( left+17, top+1 ); glVertex2i( right-1, top+1 );
Oops, something went wrong.

0 comments on commit 073990d

Please sign in to comment.