ref: 83843949658da44765c67fe9a5865ff5503a9e24
parent: e26ac69f117e5e3d268cd4e3fd16e6628cb844cd
author: David <gek@katherine>
date: Sun Feb 14 12:46:16 EST 2021
Examples update
--- a/SDL_Examples/include/3dMath.h
+++ b/SDL_Examples/include/3dMath.h
@@ -1,3 +1,12 @@
+/* Public Domain / CC0 3d Math Library
+
+
+Written by Gek (DMHSW) in 2020
+
+
+*/
+
+
#ifndef CHAD_MATH_H
#define CHAD_MATH_H
#include <math.h>
--- a/SDL_Examples/include/GLView.h
+++ /dev/null
@@ -1,72 +1,0 @@
-#ifndef _glview_h_
-#define _glview_h_
-
-#define BGL_RGB 0
-#define BGL_INDEX 1
-#define BGL_SINGLE 0
-#define BGL_DOUBLE 2
-#define BGL_DIRECT 0
-#define BGL_INDIRECT 4
-#define BGL_ACCUM 8
-#define BGL_ALPHA 16
-#define BGL_DEPTH 32
-#define BGL_OVERLAY 64
-#define BGL_UNDERLAY 128
-#define BGL_STENCIL 512
-
-#include <interface/View.h>
-#include <support/Locker.h>
-#include "GL/gl.h"
-#include "GL/oscontext.h"
-#include <game/WindowScreen.h>
-#include <game/DirectWindow.h>
-
-class BGLView : public BView {
-public:
- BGLView(BRect rect, char *name,
- ulong resizingMode, ulong mode,
- ulong options);
- virtual ~BGLView();
-
- void LockGL();
- void UnlockGL();
- void SwapBuffers();
-// BView *EmbeddedView();
-// status_t CopyPixelsOut(BPoint source, BBitmap *dest);
-// status_t CopyPixelsIn(BBitmap *source, BPoint dest);
-
- virtual void ErrorCallback(GLenum errorCode);
- virtual void Draw(BRect updateRect);
- virtual void AttachedToWindow();
- virtual void AllAttached();
- virtual void DetachedFromWindow();
- virtual void AllDetached();
- virtual void FrameResized(float width, float height);
-// virtual status_t Perform(perform_code d, void *arg);
-
- //
- // Methods below are pass-throughs to BView for the moment.
- //
-
- virtual status_t Archive(BMessage *data, bool deep = true) const;
- virtual void MessageReceived(BMessage *msg);
- virtual void SetResizingMode(uint32 mode);
-
- virtual void Show();
- virtual void Hide();
-
- virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
- BMessage *specifier, int32 form,
- const char *property);
- virtual status_t GetSupportedSuites(BMessage *data);
- //void DirectConnected( direct_buffer_info *info );
- //void EnableDirectMode( bool enabled );
-
-private:
- ostgl_context *context;
- BBitmap *bitmaps[2];
- int currBitmap;
- static BLocker locker;
-};
-
-#endif // _glview_h_
--- a/SDL_Examples/include/api_audio.h
+++ b/SDL_Examples/include/api_audio.h
@@ -1,16 +1,16 @@
-/*
- *
-Licensed under CC0, public domain software rendering toolkit.
- *
- * */
+/* Public Domain / CC0 Audio Playback Mini Library
-/*
-HOW TO BUILD THINGS USING THIS LIBRARY
-You gotta use a makefile
-Make sure to #include "api.h" into your code. You can only include it in one file.
+Written by Gek (DMHSW) in 2020
-If you aren't using mixer, I recommend disabling USE_MIXER at the top, and then you don't need to link to it.
+
+*/
+
+/*
+HOW TO BUILD THINGS USING THIS LIBRARY
+#define CHAD_API_IMPL
+//^ This line goes in the file you want the "implementation" in.
+#include "api_audio.h"
*/
--- a/SDL_Examples/include/lockstepthread.h
+++ b/SDL_Examples/include/lockstepthread.h
@@ -1,3 +1,12 @@
+
+/* Public Domain / CC0 3d Lock-Step Threading Implementation
+
+
+Written by Gek (DMHSW) in 2020
+
+
+*/
+
#ifndef LOCKSTEPTHREAD_H
#define LOCKSTEPTHREAD_H
#include <pthread.h>
@@ -120,4 +129,4 @@
//end of implementation
#endif
-//end of header
\ No newline at end of file
+//end of header
--- a/SDL_Examples/include/tobjparse.h
+++ b/SDL_Examples/include/tobjparse.h
@@ -1,3 +1,13 @@
+/* Public Domain / CC0 3d OBJ Parser
+
+With support for Per Vertex Color (VC) Lines.
+
+
+Written by Gek (DMHSW) in 2020
+
+
+*/
+
#ifndef TOBJ_PARSE_H
#define TOBJ_PARSE_H
#include "3dMath.h"
@@ -335,4 +345,4 @@
return retval;
}
-#endif
\ No newline at end of file
+#endif
binary files a/SDL_Examples/texture.png b/SDL_Examples/texture.png differ