From 918ea5168baaecdf70f5ea37e5815cacf9558163 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Mon, 29 Oct 2007 19:50:10 +0000 Subject: Rename 'mms-config.' to 'mms.config'. It looks like Windows does not like filenames ending with a dot, in effect renaming it to 'mms-config'. --- progs/util/descrip.mms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'progs/util') diff --git a/progs/util/descrip.mms b/progs/util/descrip.mms index 21dec4b9be..b2ee5ec971 100644 --- a/progs/util/descrip.mms +++ b/progs/util/descrip.mms @@ -5,7 +5,7 @@ .first define gl [--.include.gl] -.include [--]mms-config. +.include [--]mms.config ##### MACROS ##### -- cgit v1.2.3 From 2d38d1b3005c02273abf3941df5dddc245a6b792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 25 Feb 2008 17:11:28 +0900 Subject: Remove files of unsupported build systems. --- progs/util/descrip.mms | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 progs/util/descrip.mms (limited to 'progs/util') diff --git a/progs/util/descrip.mms b/progs/util/descrip.mms deleted file mode 100644 index b2ee5ec971..0000000000 --- a/progs/util/descrip.mms +++ /dev/null @@ -1,42 +0,0 @@ -# Makefile for GLUT-based demo programs for VMS -# contributed by Jouk Jansen joukj@crys.chem.uva.nl - - -.first - define gl [--.include.gl] - -.include [--]mms.config - -##### MACROS ##### - -INCDIR = ([--.include],[-.util]) -CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)/float=ieee/ieee=denorm - -.ifdef SHARE -GL_LIBS = $(XLIBS) -LIB_DEP = [--.lib]$(GL_SHAR) [--.lib]$(GLU_SHAR) [--.lib]$(GLUT_SHAR) -.else -GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS) -LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB) -.endif - - -OBJS =readtex.obj,showbuffer.obj - - -##### RULES ##### -.obj.exe : - cxxlink $(MMS$TARGET_NAME),$(GL_LIBS) - -##### TARGETS ##### -default : - $(MMS)$(MMSQUALIFIERS) $(OBJS) - -clean : - delete *.obj;* - -realclean : - delete *.obj;* - -readtex.obj : readtex.c -showbuffer.obj : showbuffer.c -- cgit v1.2.3 From f7f4b81ad8984384f1771de185daf3d3277f505d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 4 Apr 2008 18:55:48 -0600 Subject: mesa: added more ext funcs (from Mesa/master) --- progs/util/extfuncs.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'progs/util') diff --git a/progs/util/extfuncs.h b/progs/util/extfuncs.h index 5d647cdae7..cf6b29d0e3 100644 --- a/progs/util/extfuncs.h +++ b/progs/util/extfuncs.h @@ -12,6 +12,7 @@ static PFNGLCREATESHADERPROC glCreateShader_func = NULL; static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL; static PFNGLDELETESHADERPROC glDeleteShader_func = NULL; static PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib_func = NULL; +static PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform_func = NULL; static PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders_func = NULL; static PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation_func = NULL; static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_func = NULL; @@ -26,6 +27,13 @@ static PFNGLISSHADERPROC glIsShader_func = NULL; static PFNGLLINKPROGRAMPROC glLinkProgram_func = NULL; static PFNGLSHADERSOURCEPROC glShaderSource_func = NULL; static PFNGLUNIFORM1IPROC glUniform1i_func = NULL; +static PFNGLUNIFORM2IPROC glUniform2i_func = NULL; +static PFNGLUNIFORM3IPROC glUniform3i_func = NULL; +static PFNGLUNIFORM4IPROC glUniform4i_func = NULL; +static PFNGLUNIFORM1FPROC glUniform1f_func = NULL; +static PFNGLUNIFORM2FPROC glUniform2f_func = NULL; +static PFNGLUNIFORM3FPROC glUniform3f_func = NULL; +static PFNGLUNIFORM4FPROC glUniform4f_func = NULL; static PFNGLUNIFORM1FVPROC glUniform1fv_func = NULL; static PFNGLUNIFORM2FVPROC glUniform2fv_func = NULL; static PFNGLUNIFORM3FVPROC glUniform3fv_func = NULL; @@ -47,6 +55,10 @@ static PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv_func = NULL; static PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv_func = NULL; static PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv_func = NULL; +/* OpenGL 1.4 */ +static PFNGLPOINTPARAMETERFVPROC glPointParameterfv_func = NULL; +static PFNGLSECONDARYCOLOR3FVPROC glSecondaryColor3fv_func = NULL; + /* GL_ARB_vertex/fragment_program */ static PFNGLBINDPROGRAMARBPROC glBindProgramARB_func = NULL; static PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB_func = NULL; @@ -80,6 +92,7 @@ GetExtensionFuncs(void) glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram"); glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader"); glGetActiveAttrib_func = (PFNGLGETACTIVEATTRIBPROC) glutGetProcAddress("glGetActiveAttrib"); + glGetActiveUniform_func = (PFNGLGETACTIVEUNIFORMPROC) glutGetProcAddress("glGetActiveUniform"); glGetAttachedShaders_func = (PFNGLGETATTACHEDSHADERSPROC) glutGetProcAddress("glGetAttachedShaders"); glGetAttribLocation_func = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress("glGetAttribLocation"); glGetProgramInfoLog_func = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress("glGetProgramInfoLog"); @@ -94,6 +107,13 @@ GetExtensionFuncs(void) glLinkProgram_func = (PFNGLLINKPROGRAMPROC) glutGetProcAddress("glLinkProgram"); glShaderSource_func = (PFNGLSHADERSOURCEPROC) glutGetProcAddress("glShaderSource"); glUniform1i_func = (PFNGLUNIFORM1IPROC) glutGetProcAddress("glUniform1i"); + glUniform2i_func = (PFNGLUNIFORM2IPROC) glutGetProcAddress("glUniform2i"); + glUniform3i_func = (PFNGLUNIFORM3IPROC) glutGetProcAddress("glUniform3i"); + glUniform4i_func = (PFNGLUNIFORM4IPROC) glutGetProcAddress("glUniform3i"); + glUniform1f_func = (PFNGLUNIFORM1FPROC) glutGetProcAddress("glUniform1f"); + glUniform2f_func = (PFNGLUNIFORM2FPROC) glutGetProcAddress("glUniform2f"); + glUniform3f_func = (PFNGLUNIFORM3FPROC) glutGetProcAddress("glUniform3f"); + glUniform4f_func = (PFNGLUNIFORM4FPROC) glutGetProcAddress("glUniform4f"); glUniform1fv_func = (PFNGLUNIFORM1FVPROC) glutGetProcAddress("glUniform1fv"); glUniform2fv_func = (PFNGLUNIFORM2FVPROC) glutGetProcAddress("glUniform2fv"); glUniform3fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform3fv"); @@ -115,6 +135,10 @@ GetExtensionFuncs(void) glUniformMatrix3x4fv_func = (PFNGLUNIFORMMATRIX3X4FVPROC) glutGetProcAddress("glUniformMatrix3x4fv"); glUniformMatrix4x3fv_func = (PFNGLUNIFORMMATRIX4X3FVPROC) glutGetProcAddress("glUniformMatrix4x3fv"); + /* OpenGL 1.4 */ + glPointParameterfv_func = (PFNGLPOINTPARAMETERFVPROC) glutGetProcAddress("glPointParameterfv"); + glSecondaryColor3fv_func = (PFNGLSECONDARYCOLOR3FVPROC) glutGetProcAddress("glSecondaryColor3fv"); + /* GL_ARB_vertex/fragment_program */ glBindProgramARB_func = (PFNGLBINDPROGRAMARBPROC) glutGetProcAddress("glBindProgramARB"); glDeleteProgramsARB_func = (PFNGLDELETEPROGRAMSARBPROC) glutGetProcAddress("glDeleteProgramsARB"); -- cgit v1.2.3 From e1c35601529d396dcaa75523fe16114c25221a40 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 11 Apr 2008 09:01:04 -0600 Subject: add missing glViewport calls cherry-picked from master --- progs/util/showbuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'progs/util') diff --git a/progs/util/showbuffer.c b/progs/util/showbuffer.c index 17f84dc62b..b0cedea217 100644 --- a/progs/util/showbuffer.c +++ b/progs/util/showbuffer.c @@ -71,6 +71,8 @@ ShowDepthBuffer( GLsizei winWidth, GLsizei winHeight, glPushMatrix(); glLoadIdentity(); + glViewport(0, 0, winWidth, winHeight); + glDisable(GL_STENCIL_TEST); glDisable(GL_DEPTH_TEST); glRasterPos2f(0, 0); @@ -120,6 +122,8 @@ ShowAlphaBuffer( GLsizei winWidth, GLsizei winHeight ) glPushMatrix(); glLoadIdentity(); + glViewport(0, 0, winWidth, winHeight); + glDisable(GL_STENCIL_TEST); glDisable(GL_DEPTH_TEST); glRasterPos2f(0, 0); @@ -170,6 +174,8 @@ ShowStencilBuffer( GLsizei winWidth, GLsizei winHeight, glPushMatrix(); glLoadIdentity(); + glViewport(0, 0, winWidth, winHeight); + glDisable(GL_STENCIL_TEST); glDisable(GL_DEPTH_TEST); glRasterPos2f(0, 0); -- cgit v1.2.3 From 77ce568ff704e6cdcfaa557965c894752d19e462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 26 May 2008 20:14:40 +0900 Subject: Remove CVS keywords. --- progs/util/README | 1 - progs/util/glstate.c | 2 -- progs/util/glstate.h | 2 -- progs/util/sampleMakefile | 2 -- 4 files changed, 7 deletions(-) (limited to 'progs/util') diff --git a/progs/util/README b/progs/util/README index ca89d34bd3..ea71ebd2b9 100644 --- a/progs/util/README +++ b/progs/util/README @@ -19,4 +19,3 @@ imagesgi.cpp,.h - read SGI image files more to come... ---------------------------------------------------------------------- -$Id: README,v 1.1 1999/08/19 00:55:42 jtg Exp $ diff --git a/progs/util/glstate.c b/progs/util/glstate.c index 4c5db13ec7..21d7e4552d 100644 --- a/progs/util/glstate.c +++ b/progs/util/glstate.c @@ -1,4 +1,3 @@ -/* $Id: glstate.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ /* * Print GL state information (for debugging) @@ -21,7 +20,6 @@ /* - * $Log: glstate.c,v $ * Revision 1.1 1999/08/19 00:55:42 jtg * Initial revision * diff --git a/progs/util/glstate.h b/progs/util/glstate.h index 1aa4d21d8e..9216382b7b 100644 --- a/progs/util/glstate.h +++ b/progs/util/glstate.h @@ -1,4 +1,3 @@ -/* $Id: glstate.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ /* * Print GL state information (for debugging) @@ -21,7 +20,6 @@ /* - * $Log: glstate.h,v $ * Revision 1.1 1999/08/19 00:55:42 jtg * Initial revision * diff --git a/progs/util/sampleMakefile b/progs/util/sampleMakefile index ebb57ff3dd..71ec150b88 100644 --- a/progs/util/sampleMakefile +++ b/progs/util/sampleMakefile @@ -1,11 +1,9 @@ -# $Id: sampleMakefile,v 1.1 1999/08/19 00:55:42 jtg Exp $ # Sample makefile for compiling OpenGL/Mesa applications on Unix. # This example assumes Linux with gcc. # This makefile is in the public domain -# $Log: sampleMakefile,v $ # Revision 1.1 1999/08/19 00:55:42 jtg # Initial revision # -- cgit v1.2.3 From 7d41f10605c9e31b8d427f9f63f6505b187ac637 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 17 Dec 2008 13:58:05 -0700 Subject: util: check for frag/vertShader=0 before attaching --- progs/util/shaderutil.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'progs/util') diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 745851395a..2f1c4e38b3 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -6,6 +6,7 @@ */ +#include #include #include #include @@ -106,8 +107,12 @@ LinkShaders(GLuint vertShader, GLuint fragShader) { GLuint program = glCreateProgram_func(); - glAttachShader_func(program, fragShader); - glAttachShader_func(program, vertShader); + assert(vertShader || fragShader); + + if (fragShader) + glAttachShader_func(program, fragShader); + if (vertShader) + glAttachShader_func(program, vertShader); glLinkProgram_func(program); /* check link */ -- cgit v1.2.3 From 9aa73cfae84c7710df97ce182d32bea8d3423ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 1 Feb 2009 12:00:07 +0000 Subject: progs: Get more samples building on windows. --- progs/util/SConscript | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 progs/util/SConscript (limited to 'progs/util') diff --git a/progs/util/SConscript b/progs/util/SConscript new file mode 100644 index 0000000000..8ad2466291 --- /dev/null +++ b/progs/util/SConscript @@ -0,0 +1,15 @@ +Import('env') + +env = env.Clone() + +util = env.StaticLibrary( + target = ['util'], + source = [ + 'readtex.c', + 'trackball.c', + 'showbuffer.c', + 'shaderutil.c', + ], +) + +Export('util') -- cgit v1.2.3