Permalink
Browse files

Initial integration of HTTP server, port 8080.

Move RegalEnum to Regal::Enum, and RegalEnum.h
Add favicon for http purposes
  • Loading branch information...
1 parent 3db19d2 commit 023058958f9644fa26533e14718ca98e81271dbd @nigels-com nigels-com committed Jul 27, 2012
View
@@ -63,20 +63,29 @@ LIB.SRCS += src/regal/RegalDispatchLog.cpp
LIB.SRCS += src/regal/RegalDispatchDebug.cpp
LIB.SRCS += src/regal/RegalDispatchError.cpp
LIB.SRCS += src/regal/RegalDispatchLoader.cpp
+LIB.SRCS += src/regal/RegalHttp.cpp
+LIB.SRCS += src/regal/RegalFavicon.cpp
+
+LIB.SRCS += src/mongoose/mongoose.c
LIB.SRCS.NAMES := $(notdir $(LIB.SRCS))
-LIB.INCLUDE := -Isrc/boost
+LIB.INCLUDE += -Isrc/boost
+LIB.INCLUDE += -Isrc/mongoose
LIB.DEPS :=
LIB.DEPS += include/GL/Regal.h
LIB.DEPS += src/regal/RegalPrivate.h
LIB.OBJS := $(addprefix tmp/$(SYSTEM)/regal/static/,$(LIB.SRCS.NAMES))
+LIB.OBJS := $(LIB.OBJS:.c=.o)
LIB.OBJS := $(LIB.OBJS:.cpp=.o)
LIB.SOBJS := $(addprefix tmp/$(SYSTEM)/regal/shared/,$(LIB.SRCS.NAMES))
+LIB.SOBJS := $(LIB.SOBJS:.c=.o)
LIB.SOBJS := $(LIB.SOBJS:.cpp=.o)
+#CFLAGS += -DREGAL_NO_HTTP
+
regal.lib: lib lib/$(LIB.SHARED) lib/$(LIB.STATIC)
lib:
@@ -109,6 +118,14 @@ tmp/$(SYSTEM)/regal/shared/%.o: src/regal/%.cpp $(LIB.DEPS)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
+tmp/$(SYSTEM)/regal/static/%.o: src/mongoose/%.c $(LIB.DEPS)
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
+
+tmp/$(SYSTEM)/regal/shared/%.o: src/mongoose/%.c $(LIB.DEPS)
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
+
#
# RegalGLEW
#
View
@@ -19,7 +19,8 @@ Compile and link an app against Regal and deploy on various OpenGL implementatio
including compatibility, core and ES 2.0 OpenGL contexts.
* Portability
- Consistent API that runs on all major platforms: Windows, Linux, Mac, iOS, and Android
+ Consistent OpenGL API that runs on all major platforms:
+ Windows, Linux, Mac, iOS, and Android
* Compatible
Immediate mode, fixed function, GL_QUADS work everywhere, emulated as necessary.
@@ -29,10 +30,12 @@ including compatibility, core and ES 2.0 OpenGL contexts.
* Open Source
There is nothing behind the curtain.
- You can see what Regal is doing and change it if you need to.
+ You can see what Regal is doing and change it if needed.
* Ease of Use
- Set breakpoints on OpenGL functions. Step into the code. Inspect state.
+ Set breakpoints on OpenGL functions.
+ Step into the code.
+ Inspect state.
* Efficiency
If it cannot be implemented efficiently in Regal, it is not universally supported.
@@ -63,7 +66,7 @@ Features
http://www.khronos.org/registry/gles/extensions/EXT/EXT_debug_marker.txt
- - Enabled by default.
+ - Fixed function and DSA emulation enabled by default.
- Build-time configuration:
@@ -83,39 +86,60 @@ Features
- Environment variable configuration: **REGAL_ERROR**
+* Browser-based interface
+
+ - Enabled by default.
+
+ - **REGAL_NO_HTTP** --- Build-time and environment variable enable/disable.
+ - **REGAL_HTTP_PORT** --- Port for HTTP connections (8080 by default)
+ - **REGAL_HTTP_LOG_LIMIT** --- Number of lines of logging buffered
+
+ - `http://127.0.0.1:8080/log`_ --- View log
+ - `http://127.0.0.1:8080/glEnable?GL_LOG_APP_REGAL`_ --- Enable/disable application logging
+ - `http://127.0.0.1:8080/glEnable?GL_LOG_DRIVER_REGAL`_ --- Enable/disable driver logging
+ - `http://127.0.0.1:8080`_ --- State information
+
+.. _http://127.0.0.1:8080/log: http://127.0.0.1:8080/log
+.. _http://127.0.0.1:8080/glEnable?GL_LOG_APP_REGAL: http://127.0.0.1:8080/glEnable?GL_LOG_APP_REGAL
+.. _http://127.0.0.1:8080/glEnable?GL_LOG_DRIVER_REGAL: http://127.0.0.1:8080/glEnable?GL_LOG_DRIVER_REGAL
+.. _http://127.0.0.1:8080: http://127.0.0.1:8080
+
* Logging
Regal supports detailed logging for development purposes.
- **Error** -- Fatal and non-fatal Regal runtime errors.
- **Warning** -- Non-fatal Regal warnings.
- **Info** -- Informational messages.
- - **Regal** -- Regal API calls.
- - **OpenGL** -- OpenGL API calls.
+ - **App** -- Application calls into Regal.
+ - **Driver** -- Regal calls into OpenGL.
- **Internal** -- Internal Regal calls.
+ - **Http** -- HTTP traffic logging.
Build-time configuration:
- **REGAL_LOG_ERROR**
- **REGAL_LOG_WARNING**
- **REGAL_LOG_INFO**
- - **REGAL_LOG_REGAL**
- - **REGAL_LOG_OPENGL**
+ - **REGAL_LOG_APP**
+ - **REGAL_LOG_DRIVER**
- **REGAL_LOG_INTERNAL**
+ - **REGAL_LOG_HTTP**
- * Debug mode: All logging supported with error, warning and info enabled.
- * Release mode: Support for Regal, OpenGL and internal logging disabled by default.
+ * Debug mode: All logging supported with error, warning, info and http logging enabled.
+ * Release mode: Support for application, driver and internal logging disabled by default.
Environment variable configuration:
- **REGAL_LOG_ERROR**
- **REGAL_LOG_WARNING**
- **REGAL_LOG_INFO**
- - **REGAL_LOG_REGAL**
- - **REGAL_LOG_OPENGL**
+ - **REGAL_LOG_APP**
+ - **REGAL_LOG_DRIVER**
- **REGAL_LOG_INTERNAL**
- - **REGAL_LOG_API** --- Regal + OpenGL
- - **REGAL_LOG_NONE** --- disable all logging
+ - **REGAL_LOG_HTTP**
+ - **REGAL_LOG_API** --- Application + Driver OpenGL logging
+ - **REGAL_LOG_NONE** --- enable or disable all logging
Environment variable lookup is globally disabled by defining **REGAL_NO_GETENV**
at compile-time.
@@ -125,10 +149,11 @@ Features
- **GL_LOG_ERROR_REGAL**
- **GL_LOG_WARNING_REGAL**
- **GL_LOG_INFO_REGAL**
- - **GL_LOG_REGAL_REGAL**
- - **GL_LOG_OPENGL_REGAL**
+ - **GL_LOG_APP_REGAL**
+ - **GL_LOG_DRIVER_REGAL**
- **GL_LOG_INTERNAL_REGAL**
-
+ - **GL_LOG_HTTP_REGAL**
+
* Spoofing OpenGL vendor, renderer, version and extension strings
Build-time configuration
@@ -148,11 +173,18 @@ Features
Environment variable lookup is globally disabled by defining **REGAL_NO_GETENV**
at compile-time.
+* Regal OpenGL extensions
+
+ - **GL_REGAL_error_string** for GLU-style GLenum to error string conversion.
+ - **GL_REGAL_extension_query** for GLEW-style extension checking.
+ - **GL_REGAL_log** for Regal logging configuration.
+
Planned Features
----------------
* Debug label.
* Debug output.
+* Web browser-based debugging tools.
* Display list emulation.
Limitations
@@ -0,0 +1,94 @@
+Name
+
+ REGAL_error_string
+
+Name Strings
+
+ GL_REGAL_error_string
+
+Contact
+
+ Cass Everitt, NVIDIA (ceveritt 'at' nvidia.com)
+ Nigel Stewart, NVIDIA (nstewart 'at' nvidia.com)
+ Scott Nations, NVIDIA (snations 'at' nvidia.com)
+
+Contributors
+
+ None.
+
+Status
+
+ XXX - Experimental - not approved by Khronos.
+
+Version
+
+ Last Modified Date: July 23, 2012
+ Revision: 1
+
+Number
+
+ REGAL Extension #1
+
+Dependencies
+
+ None.
+
+ This extension is written against the OpenGL 4.2
+ Specification (April 27, 20012).
+
+Overview
+
+ This extension provides the same functionality as
+ gluErrorString as specified in Chapter 8 of The
+ OpenGL Graphics System Utility Library, Version 1.3.
+
+ It is provided as part of Regal for the purpose of
+ easing the retargeting of desktop OpenGL code
+ to platforms without GLU library support, such as
+ ES.
+
+IP Status
+
+ No known IP claims.
+
+ gluErrorString was part of the OpenGL Graphics System
+ Utility Library, Version 1.3 as specific by Silicon
+ Graphics Inc.
+
+New Procedures and Functions
+
+ const char *ErrorStringREGAL(enum error);
+
+New Types
+
+ None
+
+New Tokens
+
+ None
+
+Additions to Chapter x of the OpenGL 4.2 (Core Profile) Specification
+(OpenGL Operation)
+
+ TODO
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+New Implementation Dependent State
+
+ None.
+
+Issues
+
+ None.
+
+Revision History
+
+ Revision 1, 2012/07/23
+ - Initial revision.
@@ -0,0 +1,95 @@
+Name
+
+ REGAL_extension_query
+
+Name Strings
+
+ GL_REGAL_extension_query
+
+Contact
+
+ Cass Everitt, NVIDIA (ceveritt 'at' nvidia.com)
+ Nigel Stewart, NVIDIA (nstewart 'at' nvidia.com)
+ Scott Nations, NVIDIA (snations 'at' nvidia.com)
+
+Contributors
+
+ None.
+
+Status
+
+ XXX - Experimental - not approved by Khronos.
+
+Version
+
+ Last Modified Date: July 23, 2012
+ Revision: 1
+
+Number
+
+ REGAL Extension #2
+
+Dependencies
+
+ None.
+
+ This extension is written against the OpenGL 4.2
+ Specification (April 27, 20012).
+
+Overview
+
+ This extension provides the same functionality as
+ glewGetExtension and glewIsSupported as implemented
+ by The OpenGL Extension Wrangler Library (GLEW).
+
+ It is provided as part of Regal for the purpose of
+ easing the retargeting of desktop OpenGL code
+ to without requiring GLEW for extension query
+ purposes.
+
+IP Status
+
+ No known IP claims.
+
+ glewGetExtension and glewIsSupported are implemented
+ by The OpenGL Extension Wrangler Library (GLEW).
+
+New Procedures and Functions
+
+ boolean GetExtensionREGAL(const char *ext);
+
+ boolean IsSupportedREGAL(const char *ext);
+
+New Types
+
+ None
+
+New Tokens
+
+ None
+
+Additions to Chapter x of the OpenGL 4.2 (Core Profile) Specification
+(OpenGL Operation)
+
+ TODO
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+New Implementation Dependent State
+
+ None.
+
+Issues
+
+ None.
+
+Revision History
+
+ Revision 1, 2012/07/23
+ - Initial revision.
Oops, something went wrong. Retry.

0 comments on commit 0230589

Please sign in to comment.