diff --git a/Docs/Unuk Documentation.odt b/Docs/Unuk Documentation.odt index df8201a..d69413d 100644 Binary files a/Docs/Unuk Documentation.odt and b/Docs/Unuk Documentation.odt differ diff --git a/Docs/html/_a_star_8cpp.html b/Docs/html/_a_star_8cpp.html deleted file mode 100644 index 1f0c6dc..0000000 --- a/Docs/html/_a_star_8cpp.html +++ /dev/null @@ -1,192 +0,0 @@ - - -
- -![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
00001 #include <stdlib.h> -00002 #include "AStar.h" -00003 #include "Node.h" -00004 -00005 AStar::AStar(void) { -00006 m_open = NULL; -00007 m_stack = NULL; -00008 m_best = NULL; -00009 -00010 udCost = NULL; -00011 udValid = NULL; -00012 udNotifyChild = NULL; -00013 udNotifyList = NULL; -00014 } -00015 -00016 AStar::~AStar(void) { -00017 ClearNodes(); -00018 } -00019 -00020 bool AStar::GeneratePath(int startx, int starty, int destx, int desty) { -00021 // Grab the next node from the f position. -00022 InitStep(startx, starty, destx, desty); -00023 -00024 int retval = 0; -00025 while(retval == 0) { -00026 // Go find the next node. -00027 retval = Step(); -00028 } -00029 -00030 if(retval == 0 || !m_best) { -00031 // Set m_best to NULL so we can go and check for the next best node. -00032 m_best = NULL; -00033 return false; -00034 } -00035 return true; -00036 } -00037 -00038 int AStar::Step(void) { -00039 // If we don't get the most efficent route, then go back -00040 // and check some more nodes plox! -00041 if(!(m_best == GetBest())) { return -1; } -00042 // Ok, we found the best route. -00043 if(m_best->id == m_ID) { return 1; } -00044 -00045 // Please set the best route as a child node. -00046 CreateChildren(m_best); -00047 -00048 return 0; -00049 } -00050 -00051 int AStar::InitStep(int startx, int starty, int destx, int desty) { -00052 // Prepare for the next pass by clearing our previous nodes. -00053 ClearNodes(); -00054 -00055 // Initialize our variables. -00056 m_startx = startx; -00057 m_starty = starty; -00058 m_destx = destx; -00059 m_desty = desty; -00060 m_ID = Coord2Id(destx, desty); -00061 -00062 // Set the node for our start location. -00063 Node *temp = new Node(startx, starty); -00064 temp->g = 0; -00065 temp->h = abs(destx - startx) + abs(desty - starty); -00066 temp->f = temp->g + temp->h; -00067 temp->id = Coord2Id(startx, starty); -00068 m_open = temp; -00069 -00070 return 0; -00071 } -00072 -00073 void AStar::AddToOpen(Node *addnode) { -00074 Node *node = m_open; -00075 Node *prev = NULL; -00076 -00077 if(!m_open) { -00078 // Add a a new node to the open list. -00079 m_open = addnode; -00080 -00081 m_open->next = NULL; -00082 -00083 // Start a new open list with our new node. -00084 //Func(udNotifyList, NULL, addnode, NL_STARTOPEN, NCData); -00085 -00086 return; -00087 } -00088 -00089 while(node) { -00090 // If our addnode's f is greater than the currently open node -00091 // then add the open node to the to previous to make room for -00092 // add node to be on the open list. -00093 if(addnode->f > node->f) { -00094 prev = node; -00095 // Now we have our new node go to next. -00096 node = node->next; -00097 } else { -00098 // go to the next node, and set it on our open list to check it's -00099 // f value. -00100 if(prev) { -00101 prev->next = addnode; -00102 addnode->next = node; -00103 Func(udNotifyList, prev, addnode, NL_ADDOPEN, NCData); -00104 } else { -00105 // We will only ever run through this once per instance. We have no nodes currently -00106 // so we set an open list with this node. -00107 Node *temp = m_open; -00108 -00109 m_open = addnode; -00110 m_open->next = temp; -00111 //Func(udNotifyList, temp, addnode, NL_STARTOPEN, NCData); -00112 } -00113 return; -00114 } -00115 } -00116 // Get the next node and add it to the open list. -00117 prev->next = addnode; -00118 //Func(udNotifyList, prev, addnode, NL_ADDOPEN, NCData); -00119 } -00120 -00121 void AStar::ClearNodes(void) { -00122 Node *temp = NULL; -00123 Node *temp2 = NULL; -00124 -00125 if(m_open) { -00126 while(m_open) { -00127 temp = m_open->next; -00128 delete m_open; -00129 m_open = temp; -00130 } -00131 } -00132 if(m_closed) { -00133 while(m_closed) { -00134 temp = m_closed->next; -00135 delete m_closed; -00136 m_closed = temp; -00137 } -00138 } -00139 } -00140 -00141 void AStar::CreateChildren(Node *node) { -00142 Node temp; -00143 int x = node->x; -00144 int y = node->y; -00145 -00146 // Loop through the grid and add the children to the list. -00147 for(int i = -1; i < 2; i++) { -00148 for(int j = -1; j < 2; j++) { -00149 temp.x = x+i; -00150 temp.y = y+j; -00151 if((i == 0) && (j == 0) || !Func(udValid, node, &temp, NC_INITIALADD, CBData)) continue; -00152 -00153 LinkChild(node, &temp); -00154 } -00155 } -00156 } -00157 -00158 void AStar::LinkChild(Node *node, Node *temp) { -00159 // Initialize variables for our temp node. -00160 int x = temp->x; -00161 int y = temp->y; -00162 int g = temp->g + Func(udCost, node, temp, 0, CBData); -00163 // Grabbing a unique ID before adding the node to the open list. -00164 int id = Coord2Id(x, y); -00165 -00166 Node *check = NULL; -00167 -00168 if(check = CheckList(m_open, id)) { -00169 node->children[node->numChildren++] = check; -00170 -00171 // We have found an awesome route, update the node and variables. -00172 if(g < check->g) { -00173 check->parent = node; -00174 check->g = g; -00175 check->f = g+check->h; -00176 //Func(udNotifyChild, node, check, NC_OPENADD_UP, NCData); -00177 } else { -00178 //Func(udNotifyChild, node, check, 2, NCData); -00179 } -00180 } else if(check = CheckList(m_closed, id)) { -00181 node->children[node->numChildren++] = check; -00182 -00183 if(g < check->g) { -00184 check->parent = node; -00185 check->g = g; -00186 check->f = g+check->h; -00187 //Func(udNotifyChild, node, check, 3, NCData); -00188 -00189 // Update the parents. -00190 UpdateParents(check); -00191 } else { -00192 //Func(udNotifyChild, node, check, 4, NCData); -00193 } -00194 } else { -00195 Node *newnode = new Node(x, y); -00196 newnode->parent = node; -00197 newnode->g = g; -00198 newnode->h = abs(x - m_destx) + abs(y - m_desty); -00199 newnode->f = newnode->g + newnode->h; -00200 newnode->id = Coord2Id(x, y); -00201 -00202 AddToOpen(newnode); -00203 node->children[node->numChildren++] = newnode; -00204 -00205 //Func(udNotifyChild, node, newnode, 5, NCData); -00206 } -00207 } -00208 -00209 -00210 void AStar::UpdateParent(Node *node) { -00211 int g = node->g; -00212 int c = node->numChildren; -00213 -00214 Node *child = NULL; -00215 for(int i = 0; i < c; i++) { -00216 child = node->children[i]; -00217 if(g + 1 < child->g) { -00218 child->g = g + 1; -00219 child->f = child->g + child->h; -00220 child->parent = node; -00221 Push(child); -00222 } -00223 } -00224 Node *parent; -00225 -00226 while(m_stack) { -00227 parent = Pop(); -00228 c = parent->numC22hildren; -00229 for(int i = 0; i < c; i++) { -00230 child = parent->children[i]; -00231 -00232 if(parent->g + 1 < child->g) { -00233 child->g = parent->g + Func(udCost, parent, child, NC_INITIALADD, CBData); -00234 child->f = child->g + child->h; -00235 child->parent = parent; -00236 Push(child); -00237 } -00238 } -00239 } -00240 } -00241 -00242 void AStar::Push(Node *node) { -00243 if(!m_stack) { -00244 m_stack = new Stack; -00245 m_stack->data = node; -00246 m_stack->next = NULL; -00247 } else { -00248 Stack *temp = new Stack; -00249 temp->data = node; -00250 temp->next = m_stack; -00251 m_stack = temp; -00252 } -00253 } -00254 -00255 Node AStar::*Pop(void) { -00256 Node *data = m_stack->data; -00257 Stack *temp = m_stack; -00258 -00259 m_stack = temp->next; -00260 delete temp; -00261 -00262 return data; -00263 } -00264 -00265 Node AStar::*CheckList(Node *node, int id) { -00266 while(node) { -00267 if(node->id == id) return node; -00268 -00269 node = node->next; -00270 } -00271 return NULL; -00272 } -00273 -00274 // Get the best node in the open list to enable us to find -00275 // the best route to take. -00276 Node AStar::*GetBest(void) { -00277 if(!m_open) { return NULL; } -00278 -00279 Node *temp = m_open; -00280 Node *temp2 = m_closed; -00281 m_open = temp->next; -00282 -00283 //Func(udNotifyList, NULL, temp, NL_DELETEOPEN, NCData); -00284 m_closed = temp; -00285 m_closed->next = temp2; -00286 //Func(udNotifyList, NULL, m_closed, NL_ADDCLOSED, NCData); -00287 -00288 return temp; -00289 } -
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _ASTAR_H_ -00002 #define _ASTAR_H_ -00003 #include "Node.h" -00004 -00005 class AStar { -00006 public: -00007 AStar(void); -00008 ~AStar(void); -00009 -00010 Func udCost; // Called when the cost is needed. -00011 Func udValid; // Check the validity of the coordanate. -00012 Func udNotifyChild; // Child is called/checked (LinkChild). -00013 Func udNotifyList; // node is added to the open/closed list. -00014 -00015 void *CBData; // Data passed back to the callback function. -00016 void *NCData; // Data paseed back to to notify child. -00017 -00018 bool GeneratePath(int startx, int starty, int destx, int desty); -00019 int Step(void); -00020 int InitStep(int startx, int starty, int destx, int desty); -00021 void SetRows(int r) { m_rows = r; } -00022 void Reset(void) { m_best = NULL; } -00023 -00024 Node *GetBestNode(void) { return m_best; } -00025 -00026 private: -00027 int m_rows; // Used to calculate unique ID for node->number. -00028 int m_startx; -00029 int m_starty; -00030 int m_destx; -00031 int m_desty; -00032 -00033 int m_ID; -00034 -00035 -00036 // Node list. -00037 Node *m_open; -00038 Node *m_closed; -00039 Node *m_best; -00040 -00041 Stack *m_stack; -00042 -00043 // Private methods. -00044 void AddToOpen(Node *node); -00045 void ClearNodes(void); -00046 void CreateChildren(Node *node); -00047 void LinkChild(Node *, Node *); -00048 void UpdateParent(Node *node); -00049 -00050 // Stack functions. -00051 void Push(Node *node); -00052 Node *Pop(void); -00053 Node *CheckList(Node *node, int number); -00054 Node *GetBest(void); -00055 -00056 inline int Coord2Id(int x, int y) { return x * m_rows + y; } -00057 }; -00058 -00059 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <iostream>
#include <fstream>
#include <cstdarg>
#include <ctime>
#include "Debug.h"
#include "string"
Go to the source code of this file.
-![]() |
-
- Unuk 1.0
- |
-
00001 #include <iostream> -00002 #include <fstream> -00003 #include <cstdarg> -00004 #include <ctime> -00005 #include "Debug.h" -00006 #include "string" -00007 -00008 -00009 using namespace std; -00010 -00011 // =================================================================== -00012 // The Debug log allows us to display ever piece of data that -00013 // populates our class components, anything that is loaded, serialized, -00014 // de-serialized etc will be printed out to a text file. -00015 // (Running our program in a terminal, this debug log will print to it.) -00016 // =================================================================== -00017 -00018 Debug *Debug::logger = NULL; -00019 -00020 Debug::Debug(bool logToFile) { -00021 time_t timestamp; -00022 if(logToFile) { -00023 logFile.open("../Bin/Debug.log", ios::out); -00024 if(!logToFile) { -00025 // We can not open our log. -00026 cerr << "Warning: Can not open Debug.log to write, continueing without logging\n"; -00027 } else { -00028 // Log File is open, let us give it a nice time stamp. -00029 timestamp = time(NULL); -00030 logFile << "Log Started: " << ctime(×tamp) << endl; -00031 } -00032 } -00033 } -00034 -00035 Debug::~Debug(void) { -00036 time_t timestamp; -00037 -00038 // We only need to close the log if it is open. -00039 if(logFile) { -00040 // Give it a closing timestamp. -00041 timestamp = time(NULL); -00042 logFile << endl << "Log Closed: " << ctime(×tamp) << endl; -00043 -00044 // Close the log file. -00045 logFile.close(); -00046 } -00047 } -00048 -00049 void Debug::message(std::string msg) { -00050 if(logFile) { -00051 logFile << msg << endl; -00052 } -00053 cerr << msg << endl << endl; -00054 } -00055 -00056 void Debug::message(const char *msg, ...) { -00057 va_list vargList; // This is to handlle the variable arguments -00058 -00059 char outBuf[1024]; -00060 unsigned short outLen; -00061 -00062 // This takes the arguments and puts them into the character array. -00063 va_start(vargList, msg); -00064 -00065 #if defined WIN32 -00066 outLen = _vsnprintf(outBuf, sizeof(outBuf), msg, vargList); -00067 #else -00068 outLen = vsnprintf(outBuf, sizeof(outBuf), msg, vargList); -00069 #endif -00070 -00071 va_end(vargList); -00072 -00073 if(outLen >= sizeof(outBuf)) { -00074 outLen = sizeof(outBuf); -00075 } -00076 -00077 if(logFile) { -00078 logFile << outBuf << endl; -00079 } -00080 -00081 cerr << outBuf << endl; -00082 } -00083 -00084 bool Debug::openLog(bool logToFile) { -00085 // Make sure the logger has not already been initialized. -00086 if(logger != NULL) { -00087 logger->message("Warning: Multiple calls to openLog()."); -00088 return false; -00089 } -00090 logger = new Debug(logToFile); -00091 return true; -00092 } -00093 -00094 void Debug::closeLog(void) { -00095 if(logger == NULL) { -00096 cerr << "Warning: Call to closeLog() with NULL logger pointer." << endl; -00097 return; -00098 } -00099 delete logger; -00100 logger = NULL; -00101 } -
![]() |
-
- Unuk 1.0
- |
-
#include <fstream>
#include "string"
Go to the source code of this file.
--Classes | |
class | Debug |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _DEBUG_H_ -00002 #define _DEBUG_H_ -00003 #include <fstream> -00004 #include "string" -00005 -00006 class Debug { -00007 public: -00008 Debug(bool logToFile); -00009 ~Debug(void); -00010 -00011 // Log an error message. -00012 void message(std::string msg); -00013 void message(const char *msg, ...); -00014 static bool openLog(bool logToFile); -00015 static void closeLog(void); -00016 -00017 static Debug *logger; -00018 -00019 private: -00020 std::ofstream logFile; -00021 }; -00022 -00023 #endif // _DEBUG_H_ -
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
00001 #include "Entity.h" -00002 -00003 Entity::Entity(GameWorld* const gameWorld) : -00004 m_canBeRemoved(false), -00005 m_world(gameWorld) {} -00006 -00007 Entity::~Entity(void) {} -00008 -00009 bool Entity::CanBeRemoved(void) const { -00010 return m_canBeRemoved; -00011 } -00012 -00013 void Entity::Destroy(void) { -00014 m_canBeRemoved = true; -00015 } -00016 -00017 void Entity::Prepare(float dt) { -00018 OnPrepare(dt); -00019 } -00020 -00021 void Entity::Render(void) const { -00022 OnRender(); -00023 } -00024 -00025 void Entity::OnPostRender(void) { -00026 OnPostRender(); -00027 } -00028 -00029 bool Entity::Initialize(void) { -00030 return OnInitiaize(); -00031 } -00032 -00033 void Entity::Shutdown(void) { -00034 OnShutdown(); -00035 } -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Classes | |
class | Entity |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _ENTITY_H_ -00002 #define _ENTITY_H_ -00003 #include "Geometry.h" -00004 #include "EntityType.h" -00005 #include "Static.h" -00006 -00007 class GameWorld; -00008 -00009 /* -00010 * Entity is static because we will mainly be handling -00011 * pointers (that can be copied around) but we want -00012 * all entities to be initiaized by the gameworld. -00013 */ -00014 -00015 class Entity : private Static { -00016 public: -00017 Entity(GameWorld* const gameWorld); -00018 virtual ~Entity(void); -00019 -00020 void Prepare(float dt); -00021 void Render(void) const; -00022 void PostRender(void); -00023 bool Initialize(void); -00024 void Shutdown(void); -00025 bool CanBeRemoved(void) const; -00026 void Destroy(void); -00027 -00028 virtual Vector2 GetPosition(void) const = 0; -00029 //virtual Vector2 GetVelocity() const = 0; -00030 virtual void SetPosition(const Vector2& position) = 0; -00031 -00032 virtual EntityType GetType(void) const = 0; -00033 -00034 private: -00035 virtual void OnPrepare(float dt) = 0; -00036 virtual void OnRender(void) const = 0; -00037 virtual void OnPostRender(void) = 0; -00038 virtual bool OnInitiaize(void) = 0; -00039 virtual void OnShutdown(void) = 0; -00040 -00041 bool m_canBeRemoved; -00042 -00043 GameWorld* m_world; -00044 }; -00045 -00046 #endif -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Enumerations | |
enum | EntityType { PLAYER - } |
enum EntityType | -
Definition at line 4 of file EntityType.h.
- -![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _ENTITYTYPES_H_ -00002 #define _ENTITYTYPES_H_ -00003 -00004 enum EntityType { -00005 PLAYER -00006 }; -00007 -00008 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <cstdlib>
#include "SDL/SDL.h"
#include "Game.h"
#include "Player.h"
#include "../libUnuk/Input.h"
#include "../libUnuk/Sprite.h"
#include "../libUnuk/Debug.h"
Go to the source code of this file.
-![]() |
-
- Unuk 1.0
- |
-
00001 #ifdef WIN32 -00002 #include <windows.h> -00003 #endif -00004 -00005 #include <X11/Xlib.h> -00006 #include <GL/gl.h> -00007 #include <GL/glu.h> -00008 #include <GL/glut.h> -00009 #include <cstdlib> -00010 -00011 #include "SDL/SDL.h" -00012 #include "Game.h" -00013 #include "Player.h" -00014 #include "../libUnuk/Input.h" -00015 #include "../libUnuk/Sprite.h" -00016 #include "../libUnuk/Debug.h" -00017 -00018 Game::Game(void) { -00019 m_assets = false; -00020 //m_player = new Player(); -00021 //m_player->SetSprite(); -00022 m_rotationAngle = 0.0f; -00023 } -00024 -00025 Game::~Game(void) { -00026 DeleteAssets(); -00027 } -00028 -00029 bool Game::Init(void) { -00030 glEnable(GL_DEPTH_TEST); -00031 glDepthFunc(GL_LEQUAL); -00032 -00033 LoadAssets(); -00034 m_assets = true; -00035 -00036 return true; -00037 } -00038 -00039 void Game::Prepare(float dt) { -00040 glEnable(GL_BLEND); -00041 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -00042 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); -00043 glShadeModel(GL_FLAT); -00044 glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -00045 -00046 Sprite::Enable2D(); -00047 -00048 m_player->Prepare(); -00049 -00050 const float SPEED = 15.0f; -00051 m_rotationAngle += SPEED * dt; -00052 if(m_rotationAngle > 360.0f) { -00053 m_rotationAngle -= 360.0f; -00054 } -00055 } -00056 -00057 void Game::Render(void) { -00058 static GLint T0 = 0; -00059 static GLint frames = 0; -00060 -00061 glClear(GL_COLOR_BUFFER_BIT); -00062 glRasterPos2i(0, 0); -00063 -00064 // Draw the test image. -00065 if(m_assets) { -00066 m_player->Render(); -00067 } -00068 -00069 glFlush(); -00070 -00071 glDisable(GL_TEXTURE_2D); -00072 -00073 // Get frames per second. -00074 frames++; -00075 { -00076 GLint t = SDL_GetTicks(); -00077 if (t - T0 >= 5000) { -00078 GLfloat seconds = (t - T0) / 1000.0f; -00079 GLfloat fps = frames / seconds; -00080 Debug::logger->message("\n%d frames in %g seconds = %g FPS", frames, seconds, fps); -00081 T0 = t; -00082 frames = 0; -00083 } -00084 } -00085 } -00086 -00087 void Game::Shutdown(void) { -00088 Debug::logger->message("\n\n-----Cleaning Up-----"); -00089 m_player->CleanUp(); -00090 delete m_player; -00091 Debug::logger->message("\nPlayer Deleted."); -00092 Debug::closeLog(); -00093 } -00094 -00095 void Game::UpdateProjection(void) { -00096 GLint iViewport[4]; -00097 -00098 // Get a copy of the viewport. -00099 glGetIntegerv(GL_VIEWPORT, iViewport); -00100 glPushMatrix(); -00101 glLoadIdentity(); -00102 -00103 // Save a copy of the projection matrix so that we can restore -00104 // it when it's time to do 3D rendering again. -00105 glMatrixMode(GL_PROJECTION); -00106 glPushMatrix(); -00107 glLoadIdentity(); -00108 -00109 // Set up the orthographic projection. -00110 glOrtho( iViewport[0], iViewport[0] + iViewport[2], -00111 iViewport[1] + iViewport[3], iViewport[1], -1, 1); -00112 glMatrixMode(GL_MODELVIEW); -00113 glPushMatrix(); -00114 glLoadIdentity(); -00115 -00116 // Make sure depth testing and lighting are disabled for 2D rendering -00117 //until we are finished rendering in 2D. -00118 glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_LIGHTING_BIT); -00119 glDisable(GL_DEPTH_TEST); -00120 glDisable(GL_LIGHTING); -00121 -00122 // glMatrixMode(GL_PROJECTION); -00123 // glLoadIdentity(); -00124 // -00125 // // Set up the orthographic projection. -00126 // glOrtho(-1.0, 1.0, -1.0, 1.0, 1.0, 1000.0); -00127 // -00128 // glMatrixMode(GL_MODELVIEW); -00129 // glLoadIdentity(); -00130 } -00131 -00132 void Game::OnResize(int width, int height) { -00133 // Let's see you divide by zero now! -00134 if(height == 0) { height = 1; } -00135 -00136 // Set the viewport to the window size. -00137 glViewport(0, 0, width, height); -00138 -00139 // Set the projection. -00140 UpdateProjection(); -00141 } -00142 -00143 void Game::LoadAssets(void) { -00144 m_player = new Player(); -00145 m_player->SetSprite(); -00146 } -00147 -00148 void Game::DeleteAssets(void) { -00149 delete m_player; -00150 } -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Classes | |
class | Game |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _GAME_H_ -00002 #define _GAME_H_ -00003 #include "SDL/SDL.h" -00004 #include "Player.h" -00005 -00006 class Game { -00007 public: -00008 Game(void); -00009 ~Game(void); -00010 -00011 bool Init(void); -00012 void Prepare(float dt); -00013 void Render(void); -00014 void Shutdown(void); -00015 -00016 void UpdateProjection(); -00017 void OnResize(int width, int height); -00018 -00019 private: -00020 void LoadAssets(void); -00021 void DeleteAssets(void); -00022 float m_rotationAngle; -00023 Player *m_player; -00024 -00025 bool m_assets; -00026 }; -00027 -00028 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <cmath>
Go to the source code of this file.
--Classes | |
struct | TexCoord |
struct | Colour |
struct | Vector2 |
-Typedefs | |
typedef Vector2 | Vertex |
-Functions | |
float | degreesToRadians (const float degrees) |
Definition at line 85 of file Geometry.h.
- -float degreesToRadians | -( | -const float | -degrees | ) | - [inline] |
-
Definition at line 87 of file Geometry.h.
- -![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _GEOMETRY_H_ -00002 #define _GEOMETRY_H_ -00003 #include <cmath> -00004 -00005 struct TexCoord { -00006 float s, t; -00007 TexCoord(void): -00008 s(0.0f), -00009 t(0.0f) {} -00010 -00011 TexCoord(float s, float t): -00012 s(s), -00013 t(t) {} -00014 }; -00015 -00016 struct Colour { -00017 float r, g, b, a; -00018 Colour(float R, float G, float B, float A): -00019 r(R), -00020 g(G), -00021 b(B), -00022 a(A) {} -00023 -00024 Colour(void): -00025 r(0.0f), -00026 g(0.0f), -00027 b(0.0f), -00028 a(0.0f) {} -00029 }; -00030 -00031 struct Vector2 { -00032 float x, y; -00033 Vector2(float X, float Y): -00034 x(X), -00035 y(Y) {} -00036 -00037 Vector2(void): -00038 x(0.0f), -00039 y(0.0f) {} -00040 -00041 Vector2(const Vector2& v): -00042 x(v.x), -00043 y(v.y) {} -00044 -00045 Vector2 operator*(const float s) const { -00046 return Vector2(x*s, y*s); -00047 } -00048 -00049 Vector2& operator=(const Vector2& v) { -00050 if(this == &v) { -00051 return *this; -00052 } -00053 x = v.x; -00054 y = v.y; -00055 -00056 return *this; -00057 } -00058 -00059 Vector2& operator+=(const Vector2& v) { -00060 this->x += v.x; -00061 this->y += v.y; -00062 -00063 return *this; -00064 } -00065 -00066 const Vector2 operator-(const Vector2& v) const { -00067 Vector2 result; -00068 result.x = x - v.x; -00069 result.y = y - v.y; -00070 -00071 return result; -00072 } -00073 -00074 float length(void) const { -00075 return sqrtf(x*x+y*y); -00076 } -00077 -00078 void normalize(void) { -00079 float l = 1.0f / length(); -00080 x *= l; -00081 y *= l; -00082 } -00083 }; -00084 -00085 typedef Vector2 Vertex; -00086 -00087 inline float degreesToRadians(const float degrees) { -00088 const float PIOver180 = 3.14159f / 180.0f; -00089 return degrees * PIOver180; -00090 } -00091 -00092 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <cstdio>
#include <cstring>
#include <errno.h>
#include "ImageLoader.h"
#include "Debug.h"
Go to the source code of this file.
--Defines | |
#define | BITMAP_TYPE 19778 |
#define BITMAP_TYPE 19778 | -
Definition at line 6 of file ImageLoader.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
00001 #include <cstdio> -00002 #include <cstring> -00003 #include <errno.h> -00004 #include "ImageLoader.h" -00005 #include "Debug.h" -00006 #define BITMAP_TYPE 19778 -00007 -00008 // Initialize an empty image. -00009 ImageLoader::ImageLoader(void) { -00010 Reset(); -00011 } -00012 -00013 // Initializes an image with an image from the disk. -00014 ImageLoader::ImageLoader(const char *filename) { -00015 Reset(); -00016 LoadBMP(filename); -00017 } -00018 -00019 ImageLoader::~ImageLoader(void) { -00020 if(colors != NULL) { -00021 delete [] colors; -00022 } -00023 -00024 if(pixelData != NULL) { -00025 delete [] pixelData; -00026 } -00027 } -00028 -00029 bool ImageLoader::LoadBMP(const char* filename) { -00030 FILE *in = NULL; -00031 bool result = false; -00032 -00033 // Open the file for reading in binary mode. -00034 in = fopen(filename, "rb"); -00035 if(in == NULL) { -00036 perror("Error"); -00037 Debug::logger->message("\nError Number: %d", errno); -00038 return false; -00039 } -00040 -00041 fread(&bmfh, sizeof(BITMAPFILEHEADER), 1, in); -00042 -00043 // Check if this is even the right type of file. -00044 if(bmfh.bfType != BITMAP_TYPE) { -00045 perror("Error"); -00046 Debug::logger->message("\nError Number: %d", errno); -00047 return false; -00048 } -00049 -00050 fread(&bmih, sizeof(BITMAPINFOHEADER), 1, in); -00051 width = bmih.biWidth; -00052 height = bmih.biHeight; -00053 bpp = bmih.biBitCount; -00054 -00055 // TODO: Get this running on 24-bit images too, right now it will seg fault if it is 24-bit. -00056 // Set the number of colors. -00057 LONG numColors = 1 << bmih.biBitCount; -00058 -00059 // The bitmap is not yet loaded. -00060 loaded = false; -00061 // Make sure memory is not lost. -00062 if(colors != NULL) { -00063 delete [] colors; -00064 } -00065 -00066 if(pixelData != NULL) { -00067 delete [] pixelData; -00068 } -00069 -00070 // Load the palette for 8 bits per pixel. -00071 if(bmih.biBitCount < 24) { -00072 colors = new RGBQUAD[numColors]; -00073 fread(colors, sizeof(RGBQUAD), numColors, in); -00074 } -00075 -00076 DWORD size = bmfh.bfSize - bmfh.bfOffBits; -00077 -00078 BYTE *tempPixelData = NULL; -00079 tempPixelData = new BYTE[size]; -00080 -00081 if(tempPixelData == NULL) { -00082 Debug::logger->message("\nError: Out of memory. Cannot find space to load image into memory."); -00083 fclose(in); -00084 return false; -00085 } -00086 -00087 fread(tempPixelData, sizeof(BYTE), size, in); -00088 -00089 result = FixPadding(tempPixelData, size); -00090 loaded = result; -00091 -00092 delete [] tempPixelData; -00093 fclose(in); -00094 -00095 return result; -00096 } -00097 -00098 bool ImageLoader::FixPadding(BYTE const * const tempPixelData, DWORD size) { -00099 // byteWidth is the width of the actual image in bytes. padWidth is -00100 // the width of the image plus the extrapadding. -00101 LONG byteWidth, padWidth; -00102 -00103 // Set both to the width of the image. -00104 byteWidth = padWidth = (LONG)((float)width * (float)bpp / 8.0); -00105 -00106 // Add any extra space to bring each line to a DWORD boundary. -00107 short padding = padWidth % 4 != 0; -00108 padWidth += padding; -00109 -00110 DWORD diff; -00111 int offset; -00112 -00113 height = bmih.biHeight; -00114 // Set the diff to the actual image size (without any padding). -00115 diff = height * byteWidth; -00116 // allocate memory for the image. -00117 pixelData = new BYTE[diff]; -00118 -00119 if(pixelData == NULL) { -00120 return false; -00121 } -00122 -00123 // =================================================================== -00124 // Bitmap is inverted, so the paddind needs to be removed and the -00125 // image reversed. Here you can start from the back of the file or -00126 // the front, after the header. The only problem is that some programs -00127 // will pad not only the data, but also the file size to be divisiaible -00128 // by 4 bytes. -00129 // =================================================================== -00130 if(height > 0) { -00131 offset = padWidth - byteWidth; -00132 for(unsigned int i = 0; i < size - 2; i += 4) { -00133 if((i + 1) % padWidth == 0) { -00134 i += offset; -00135 } -00136 // Now we need to swap the data for it to have the right order. -00137 *(pixelData + i) = *(tempPixelData + i + 2); // R -00138 *(pixelData + i + 1) = *(tempPixelData + i + 1); // G -00139 *(pixelData + i + 2) = *(tempPixelData + i); // B -00140 *(pixelData + i + 3) = *(tempPixelData + i + 3); // A -00141 } -00142 } else { -00143 // The image is not reserved. Only the padding needs to be removed. -00144 height = height * -1; -00145 offset = 0; -00146 while(offset < height) { -00147 memcpy((pixelData + (offset * byteWidth)), (tempPixelData + (offset * padWidth)), byteWidth); -00148 offset++; -00149 } -00150 } -00151 return true; -00152 } -00153 -00154 void ImageLoader::Reset(void) { -00155 width = 0; -00156 height = 0; -00157 pixelData = NULL; -00158 colors = NULL; -00159 loaded = false; -00160 } -00161 -00162 // Get the alpha channel as an array of bytes. -00163 // The size of the array will return -1 on failure. -00164 BYTE *ImageLoader::GetAlpha() const { -00165 LONG arraySize = width * height; -00166 BYTE *array = new BYTE[arraySize]; -00167 -00168 if(array == NULL) { -00169 delete [] array; -00170 return NULL; -00171 } -00172 -00173 for(long i = 0; i < arraySize; i++) { -00174 // Jump to the alpha and extract it everytime. -00175 array[i] = pixelData[i * 4 + 3]; -00176 } -00177 return array; -00178 } -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Classes | |
class | ImageLoader |
-Typedefs | |
typedef unsigned char | BYTE |
typedef int | LONG |
typedef unsigned int | DWORD |
typedef unsigned short | WORD |
-Functions | |
struct | __attribute__ ((__packed__)) tagBITMAPFILEHEADER |
-Variables | |
BITMAPFILEHEADER | |
* | PBITMAPFILEHEADER |
BITMAPINFOHEADER | |
* | PBITAPINFOHEADER |
RGBQUAD |
typedef unsigned char BYTE | -
Definition at line 8 of file ImageLoader.h.
- -typedef unsigned int DWORD | -
Definition at line 10 of file ImageLoader.h.
- -typedef int LONG | -
Definition at line 9 of file ImageLoader.h.
- -typedef unsigned short WORD | -
Definition at line 11 of file ImageLoader.h.
- -struct __attribute__ | -( | -(__packed__) | -) | - [read] |
-
Definition at line 14 of file ImageLoader.h.
- -BITMAPFILEHEADER | -
Definition at line 20 of file ImageLoader.h.
- -BITMAPINFOHEADER | -
Definition at line 35 of file ImageLoader.h.
- -* PBITAPINFOHEADER | -
Definition at line 35 of file ImageLoader.h.
- -* PBITMAPFILEHEADER | -
Definition at line 20 of file ImageLoader.h.
- -RGBQUAD | -
Definition at line 43 of file ImageLoader.h.
- -![]() |
-
- Unuk 1.0
- |
-
00001 // =================================================================== -00002 // This image loader will read in a 32-bit bitmap. -00003 // =================================================================== -00004 -00005 #ifndef _IMAGELOADER_H_ -00006 #define _IMAGELOADER_H_ -00007 -00008 typedef unsigned char BYTE; -00009 typedef int LONG; -00010 typedef unsigned int DWORD; -00011 typedef unsigned short WORD; -00012 -00013 // Provides general information about the file. -00014 typedef struct __attribute__ ((__packed__)) tagBITMAPFILEHEADER { -00015 WORD bfType; -00016 DWORD bfSize; -00017 WORD bfReserved1; -00018 WORD bfReserved2; -00019 DWORD bfOffBits; -00020 } BITMAPFILEHEADER, *PBITMAPFILEHEADER; -00021 -00022 // The information header provides information specific to the image data. -00023 typedef struct __attribute__ ((__packed__)) tagBITMAPINFOHEADER { -00024 DWORD biSize; -00025 LONG biWidth; -00026 LONG biHeight; -00027 WORD biPlanes; -00028 WORD biBitCount; -00029 DWORD biCompression; -00030 DWORD biSizeImage; -00031 DWORD biXPelsPerMeter; -00032 DWORD biYPelsPerMeter; -00033 DWORD biCLRUsed; -00034 DWORD biCLRImportant; -00035 } BITMAPINFOHEADER, *PBITAPINFOHEADER; -00036 -00037 // Color palette. -00038 typedef struct __attribute__ ((__packed__)) tagRGBQUAD { -00039 BYTE rbgBlue; -00040 BYTE rgbGreen; -00041 BYTE rgbRed; -00042 BYTE rgbReserved; -00043 } RGBQUAD; -00044 -00045 class ImageLoader { -00046 public: -00047 ImageLoader(void); -00048 ImageLoader(const char *filename); -00049 -00050 virtual ~ImageLoader(void); -00051 -00052 bool LoadBMP(const char *filename); -00053 BYTE *GetAlpha(void) const; -00054 -00055 LONG GetHeight(void) const { return height; } -00056 RGBQUAD *GetColors(void) const { return colors; } -00057 bool GetLoaded(void) const { return loaded; } -00058 BYTE *GetPixelData(void) const { return pixelData; } -00059 LONG GetWidth(void) const { return width; } -00060 -00061 private: -00062 BITMAPFILEHEADER bmfh; -00063 BITMAPINFOHEADER bmih; -00064 RGBQUAD *colors; -00065 BYTE *pixelData; -00066 bool loaded; -00067 LONG width; -00068 LONG height; -00069 WORD bpp; -00070 -00071 // Private methods. -00072 void Reset(void); -00073 bool FixPadding(BYTE const * const tempPixelData, DWORD size); -00074 }; -00075 -00076 #endif -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Functions | |
bool | _curr_key (int index) |
bool | _old_key (int index) |
bool | _curr_mouse (int button) |
bool | _old_mouse (int button) |
bool | CreateInput (void) |
void | UpdateInput (void) |
char | GetKey (void) |
unsigned int | GetX (void) |
unsigned int | GetY (void) |
unsigned int | GetOldX (void) |
unsigned int | GetOldY (void) |
unsigned int | GetMods (void) |
bool | KeyDown (int index) |
bool | KeyStillDown (int index) |
bool | KeyUp (int index) |
bool | KeyStillUp (int index) |
bool | MouseDown (int button) |
bool | MouseStillDown (int button) |
bool | MouseUp (int button) |
bool | MouseStillUp (int button) |
void | DestroyInput (void) |
bool _curr_key | -( | -int | -index | ) | -- |
bool _curr_mouse | -( | -int | -button | ) | -- |
bool _old_key | -( | -int | -index | ) | -- |
bool _old_mouse | -( | -int | -button | ) | -- |
void DestroyInput | -( | -void | -) | -- |
unsigned int GetMods | -( | -void | -) | -- |
unsigned int GetOldX | -( | -void | -) | -- |
unsigned int GetOldY | -( | -void | -) | -- |
unsigned int GetX | -( | -void | -) | -- |
unsigned int GetY | -( | -void | -) | -- |
bool KeyStillDown | -( | -int | -index | ) | -- |
bool KeyStillUp | -( | -int | -index | ) | -- |
bool MouseDown | -( | -int | -button | ) | -- |
bool MouseStillDown | -( | -int | -button | ) | -- |
bool MouseStillUp | -( | -int | -button | ) | -- |
bool MouseUp | -( | -int | -button | ) | -- |
![]() |
-
- Unuk 1.0
- |
-
00001 #include <string.h> -00002 #include "Input.h" -00003 -00004 static mouse_t mouse; -00005 static keyboard_t keyboard; -00006 -00007 bool _curr_key(int index) { -00008 return(keyboard.keys[index] != 0); -00009 } -00010 -00011 bool _old_key(int index) { -00012 return(keyboard.oldKeys[index] != 0); -00013 } -00014 -00015 bool _curr_mouse(int button) { -00016 return((mouse.buttons * SDL_BUTTON(button)) != 0); -00017 } -00018 -00019 bool _old_mouse(int button) { -00020 return((mouse.oldButtons & SDL_BUTTON(button)) != 0); -00021 } -00022 -00023 bool CreateInput(void) { -00024 memset(&keyboard, 0, sizeof(keyboard_t)); -00025 memset(&mouse, 0, sizeof(mouse_t)); -00026 SDL_PumpEvents(); -00027 SDL_PumpEvents(); -00028 unsigned char* tempKeys = SDL_GetKeyState(&keyboard.keycount); -00029 keyboard.keys = (unsigned char*)malloc(sizeof(char) * keyboard.keycount); -00030 keyboard.oldKeys = (unsigned char*)malloc(sizeof(char) * keyboard.keycount); -00031 -00032 memcpy(keyboard.keys, tempKeys, sizeof(char) * keyboard.keycount); -00033 mouse.buttons = SDL_GetMouseState(&mouse.dx, &mouse.dy); -00034 return true; -00035 } -00036 -00037 void UpdateInput(void) { -00038 SDL_PumpEvents(); -00039 keyboard.lastChar = -1; -00040 mouse.oldx = mouse.dx; -00041 mouse.oldy = mouse.dy; -00042 mouse.oldButtons = SDL_GetMouseState(&mouse.dx, &mouse.dy); -00043 -00044 memcpy(keyboard.oldKeys, keyboard.keys, sizeof(char) * keyboard.keycount); -00045 -00046 unsigned char *tmp = SDL_GetKeyState(&keyboard.keycount); -00047 memcpy(keyboard.keys, tmp, sizeof(char) * keyboard.keycount); -00048 -00049 keyboard.mods = SDL_GetModState(); -00050 -00051 SDL_Event event; -00052 while(SDL_PollEvent(&event)) { -00053 if(event.type == SDL_KEYDOWN) { -00054 keyboard.lastChar = event.key.keysym.sym; -00055 } -00056 } -00057 } -00058 -00059 char GetKey(void) { -00060 if(keyboard.lastChar != -1) -00061 return keyboard.lastChar; -00062 return 0; -00063 } -00064 -00065 unsigned int GetX(void) { return mouse.dx; } -00066 unsigned int GetY(void) { return mouse.dy; } -00067 unsigned int GetOldX(void) { return mouse.oldx; } -00068 unsigned int GetOldY(void) { return mouse.oldy; } -00069 unsigned int GetMods(void) { return keyboard.mods; } -00070 bool KeyDown(int index) { return(_curr_key(index) && !_old_key(index)); } -00071 bool KeyStillDown(int index) { return(_curr_key(index) && _old_key(index)); } -00072 bool KeyUp(int index) { return(!_curr_key(index) && _old_key(index)); } -00073 bool KeyStillUp(int index) { return(!_curr_key(index) && !_old_key(index)); } -00074 bool MouseDown(int button) { return(_curr_mouse(button) && !_old_mouse(button)); } -00075 bool MouseStillDown(int button) { return(_curr_mouse(button) && _old_mouse(button)); } -00076 bool MouseUp(int button) { return(!_curr_mouse(button) && _old_mouse(button)); } -00077 bool MouseStillUp(int button) { return(!_curr_mouse(button) && !_old_mouse(button)); } -00078 -00079 void DestroyInput(void) { -00080 free(keyboard.keys); -00081 free(keyboard.oldKeys); -00082 } -
![]() |
-
- Unuk 1.0
- |
-
#include <SDL/SDL.h>
Go to the source code of this file.
--Classes | |
struct | mouse_s |
struct | keyboard_s |
struct | input_s |
-Typedefs | |
typedef struct mouse_s | mouse_t |
typedef struct keyboard_s | keyboard_t |
typedef struct input_s | input_t |
-Functions | |
bool | CreateInput (void) |
void | UpdateInput (void) |
char | GetKey (void) |
unsigned int | GetX (void) |
unsigned int | GetY (void) |
unsigned int | GetOldX (void) |
unsigned int | GetOldY (void) |
unsigned int | GetMods (void) |
bool | KeyDown (int index) |
bool | KeyStillDown (int index) |
bool | KeyUp (int index) |
bool | KeyStillUp (int index) |
bool | MouseDown (int button) |
bool | MouseStillDown (int button) |
bool | MouseUp (int button) |
bool | MouseStillUp (int button) |
void | DestroyInput (void) |
typedef struct keyboard_s keyboard_t | -
void DestroyInput | -( | -void | -) | -- |
unsigned int GetMods | -( | -void | -) | -- |
unsigned int GetOldX | -( | -void | -) | -- |
unsigned int GetOldY | -( | -void | -) | -- |
unsigned int GetX | -( | -void | -) | -- |
unsigned int GetY | -( | -void | -) | -- |
bool KeyStillDown | -( | -int | -index | ) | -- |
bool KeyStillUp | -( | -int | -index | ) | -- |
bool MouseDown | -( | -int | -button | ) | -- |
bool MouseStillDown | -( | -int | -button | ) | -- |
bool MouseStillUp | -( | -int | -button | ) | -- |
bool MouseUp | -( | -int | -button | ) | -- |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _INPUT_H_ -00002 #define _INPUT_H_ -00003 #include <SDL/SDL.h> -00004 -00005 typedef struct mouse_s { -00006 int dx, dy; -00007 int oldx, oldy; -00008 unsigned int buttons; -00009 unsigned int oldButtons; -00010 } mouse_t; -00011 -00012 typedef struct keyboard_s { -00013 unsigned char *keys; -00014 unsigned char *oldKeys; -00015 int keycount; -00016 int lastChar; -00017 unsigned int mods; -00018 } keyboard_t; -00019 -00020 typedef struct input_s { -00021 mouse_t mouse; -00022 keyboard_t keyboard; -00023 } input_t; -00024 -00025 bool CreateInput(void); -00026 void UpdateInput(void); -00027 -00028 char GetKey(void); -00029 -00030 unsigned int GetX(void); -00031 unsigned int GetY(void); -00032 unsigned int GetOldX(void); -00033 unsigned int GetOldY(void); -00034 unsigned int GetMods(void); -00035 bool KeyDown(int index); -00036 bool KeyStillDown(int index); -00037 bool KeyUp(int index); -00038 bool KeyStillUp(int index); -00039 bool MouseDown(int button); -00040 bool MouseStillDown(int button); -00041 bool MouseUp(int button); -00042 bool MouseStillUp(int button); -00043 -00044 void DestroyInput(void); -00045 -00046 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <memory.h>
Go to the source code of this file.
--Classes | |
class | Node |
struct | Stack |
-Defines | |
#define | NULL 0 |
#define | NL_ADDOPEN 0 |
#define | NL_STARTOPEN 1 |
#define | NL_DELETEOPEN 2 |
#define | NL_ADDCLOSED 3 |
#define | NC_INITIALADD 0 |
#define | NC_OPENADD_UP 1 |
#define | NC_OPENADD 2 |
#define | NC_CLOSEDADD_UP 3 |
#define | NC_CLOSEADD 4 |
#define | NC_NEWADD 5 |
-Typedefs | |
typedef int(* | Func )(Node *, Node *, int, void *) |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _NODE_H_ -00002 #define _NODE_H_ -00003 #include <memory.h> -00004 -00005 #ifndef NULL -00006 #define NULL 0 -00007 #endif -00008 -00009 #define NL_ADDOPEN 0 -00010 #define NL_STARTOPEN 1 -00011 #define NL_DELETEOPEN 2 -00012 #define NL_ADDCLOSED 3 -00013 -00014 #define NC_INITIALADD 0 -00015 #define NC_OPENADD_UP 1 -00016 #define NC_OPENADD 2 -00017 #define NC_CLOSEDADD_UP 3 -00018 #define NC_CLOSEADD 4 -00019 #define NC_NEWADD 5 -00020 -00021 class Node { -00022 public: -00023 Node(int posx = -1, int posy = -1) : x(posx), y(posy), id(0), numChildren(0) { -00024 parent = next = NULL; -00025 memset(children, 0, sizeof(children)); -00026 } -00027 -00028 // Fitness, goal, heuristic. -00029 int f, g, h; -00030 // Position x and y. -00031 int x, y; -00032 int numChildren; // x*m_rows+y -00033 int id; -00034 -00035 Node *parent; -00036 Node *next; -00037 // Square tiles. -00038 Node *children[8]; -00039 }; -00040 -00041 struct Stack { -00042 Node *data; -00043 Stack *next; -00044 }; -00045 -00046 typedef int(*Func) (Node *, Node *, int, void *); -00047 -00048 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <GL/gl.h>
#include <SDL/SDL.h>
#include "../libUnuk/Sprite.h"
#include "../libUnuk/Debug.h"
#include "../libUnuk/Input.h"
#include "Player.h"
Go to the source code of this file.
-![]() |
-
- Unuk 1.0
- |
-
00001 #include <GL/gl.h> -00002 #include <SDL/SDL.h> -00003 #include "../libUnuk/Sprite.h" -00004 #include "../libUnuk/Debug.h" -00005 #include "../libUnuk/Input.h" -00006 #include "Player.h" -00007 -00008 Player::Player(void) : m_posx(0), m_posy(0) { -00009 //m_player = new Sprite("../Data/Media/test.bmp"); -00010 } -00011 -00012 Player::~Player(void) { -00013 CleanUp(); -00014 } -00015 -00016 void Player::Prepare(void) { -00017 // I borked up the image loader, so for now we will -00018 // rotate the image 180 degrees. -00019 m_player->Rotate(180); -00020 m_player->SetScale(0.5f, 0.5f); -00021 //Set our pivot to the top right. -00022 m_player->SetPivot(1.0f, 1.0f); -00023 -00024 CreateInput(); -00025 // Move the player. -00026 if(KeyStillDown(SDLK_w) || KeyStillDown(SDLK_UP)) { SetVelocity(0, -5); } -00027 if(KeyStillDown(SDLK_a) || KeyStillDown(SDLK_LEFT)) { SetVelocity(-5, 0); } -00028 if(KeyStillDown(SDLK_s) || KeyStillDown(SDLK_DOWN)) { SetVelocity( 0, 5); } -00029 if(KeyStillDown(SDLK_d) || KeyStillDown(SDLK_RIGHT)) { SetVelocity( 5, 0); } -00030 UpdateInput(); -00031 -00032 SetPosition(m_posx, m_posy); -00033 } -00034 -00035 void Player::Render(void) { -00036 // Only render calls should appear here. -00037 m_player->Render(); -00038 } -00039 -00040 void Player::SetSprite(void) { -00041 m_player = new Sprite("../Data/Media/test.bmp"); -00042 } -00043 -00044 void Player::SetPosition(GLdouble posx, GLdouble posy) { -00045 // Set the position of the player sprite. -00046 m_posx = posx; -00047 m_posy = posy; -00048 -00049 m_player->SetX(m_posx); -00050 m_player->SetY(m_posy); -00051 } -00052 -00053 void Player::SetVelocity(GLdouble velx, GLdouble vely) { -00054 m_velx = velx; -00055 m_vely = vely; -00056 -00057 m_posx += m_velx; -00058 m_posy += m_vely; -00059 } -00060 -00061 void Player::CleanUp(void) { -00062 delete m_player; -00063 } -
![]() |
-
- Unuk 1.0
- |
-
#include <SDL/SDL.h>
#include "../libUnuk/Sprite.h"
Go to the source code of this file.
--Classes | |
class | Player |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _PLAYER_H_ -00002 #define _PLAYER_H_ -00003 #include <SDL/SDL.h> -00004 #include "../libUnuk/Sprite.h" -00005 -00006 class Player { -00007 public: -00008 Player(void); -00009 ~Player(void); -00010 -00011 void Prepare(void); -00012 void Render(void); -00013 -00014 void SetSprite(void); -00015 -00016 void SetPosition(GLdouble posx, GLdouble posy); -00017 void SetVelocity(GLdouble velx, GLdouble vely); -00018 -00019 void CleanUp(void); -00020 -00021 private: -00022 Sprite* m_player; -00023 -00024 // Position variables. -00025 GLdouble m_posx; -00026 GLdouble m_posy; -00027 -00028 // Velocity variables. -00029 int m_velx; -00030 int m_vely; -00031 }; -00032 -00033 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <GL/glut.h>
#include <iostream>
#include <cstring>
#include "Sprite.h"
#include "ImageLoader.h"
#include "Debug.h"
Go to the source code of this file.
-![]() |
-
- Unuk 1.0
- |
-
00001 #include <GL/glut.h> -00002 #include <iostream> -00003 #include <cstring> -00004 #include "Sprite.h" -00005 #include "ImageLoader.h" -00006 #include "Debug.h" -00007 -00008 Sprite::Sprite(string filename) { -00009 image = new ImageLoader(filename.c_str()); -00010 angle = 0; -00011 x = 0.0f; -00012 y = 0.0f; -00013 SetPivot(0.0f, 0.0f); -00014 SetScale(1.0f, 1.0f); -00015 } -00016 -00017 Sprite::~Sprite(void) { -00018 delete image; -00019 } -00020 -00021 // Enable 2D drawing mode to draw our sprites. This function MUST be -00022 // called before any sprite is drawn on screen using the Draw method. -00023 void Sprite::Enable2D(void) { -00024 GLint iViewport[4]; -00025 -00026 // Get a copy of the viewport. -00027 glGetIntegerv(GL_VIEWPORT, iViewport); -00028 glPushMatrix(); -00029 glLoadIdentity(); -00030 -00031 // Save a copy of the projection atrix so that we can restore -00032 // it when it's time to do 3D rendering again. -00033 glMatrixMode(GL_PROJECTION); -00034 glPushMatrix(); -00035 glLoadIdentity(); -00036 -00037 // Set upt the orthographic projection. -00038 glOrtho( iViewport[0], iViewport[0] + iViewport[2], -00039 iViewport[1] + iViewport[3], iViewport[1], -1, 1); -00040 glMatrixMode(GL_MODELVIEW); -00041 glPushMatrix(); -00042 glLoadIdentity(); -00043 -00044 // Make sure depth testing and lighting are disabled for 2D rendering -00045 //until we are finished rendering in 2D. -00046 glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_LIGHTING_BIT); -00047 glDisable(GL_DEPTH_TEST); -00048 glDisable(GL_LIGHTING); -00049 } -00050 -00051 // Disables the 2D drawing. This can be called before you are done -00052 // drawing all 2D sprites on screen using the Draw method. -00053 void Sprite::Disable2D(void) { -00054 glPopAttrib(); -00055 glMatrixMode(GL_PROJECTION); -00056 glPopMatrix(); -00057 glMatrixMode(GL_MODELVIEW); -00058 glPopMatrix(); -00059 } -00060 -00061 // Initializes extensions, textures, render states, etc. before rendering. -00062 void Sprite::InitScene(void) { -00063 // Disable lighting. -00064 glDisable(GL_LIGHTING); -00065 // Disable dithering. -00066 glDisable(GL_DITHER); -00067 // Disable blending (for now). -00068 glDisable(GL_BLEND); -00069 // Disable depth testing. -00070 glDisable(GL_DEPTH_TEST); -00071 -00072 // Is the extension supported on this driver/card? -00073 if(!IsExtensionSupported("GL_ARB_texture_rectangle")) { -00074 Debug::logger->message("\nERROR: Texture rectangles not supported on this video card!"); -00075 exit(-1); -00076 } -00077 -00078 // TODO: -00079 // If your machine does not support GL_NV_texture_rectangle, you can try -00080 // using GL_EXT_texture_rectangle. Maybe I will run a test so I can support both. -00081 -00082 // Enable the texture rectangle extension. -00083 glEnable(GL_TEXTURE_RECTANGLE_ARB); -00084 -00085 // Generate one texture ID. -00086 glGenTextures(1, &textureID); -00087 // Bind the texture using GL_TEXTURE_RECTANGLE_NV -00088 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, textureID); -00089 // Enable bilinear filtering on this texture. -00090 glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -00091 glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -00092 -00093 // Write the 32-bit RGBA texture buffer to video memory. -00094 glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, image->GetWidth(), image->GetHeight(), -00095 0, GL_RGBA, GL_UNSIGNED_BYTE, image->GetPixelData()); -00096 } -00097 -00098 // ================================================================= -00099 // Set the pivot point in relation to the sprite itself, that is -00100 // using the object coordinates system. In this coordinate system -00101 // the bottom left point of the object is at (0,0) and the top -00102 // right is at (1,1). -00103 // -00104 // Example: To set the pivot to be in the middle of the sprite use -00105 // (0.5, 0.5) default values are (1,1). -00106 // pivotX can be any value, but when x is in the range [0,1] the -00107 // pivot is inside the sprite where 0 is the left edge of the sprite -00108 // and 1 is the right edge of the sprite. -00109 // pivotY is the same as pivotX but when y is in the range of [0,1] -00110 // the pivot is inside the sprite where 0 is the bottom edge of the -00111 // sprite and 1 is the top edge of the sprite. -00112 // ================================================================= -00113 void Sprite::SetPivot(GLfloat pivotX, GLfloat pivotY) { -00114 GLfloat deltaPivotX = pivotX - GetPivotX(); -00115 GLfloat deltaPivotY = pivotY - GetPivotY(); -00116 -00117 this->pivotX = pivotX; -00118 this->pivotY = pivotY; -00119 -00120 x += deltaPivotX * image->GetWidth(); -00121 y += deltaPivotY * image->GetHeight(); -00122 } -00123 -00124 // ================================================================= -00125 // Sets the pivot to be at the point where object's pivot is set. -00126 // obj is the reference object to whose pivot we will set this pivot -00127 // to be. -00128 // Note: If the obj pivot changes or the obj moves after the SetPivot -00129 // call has been issued, the pivot of this object will not reflect these -00130 // changes. You must call SetPivot again with that object to update the -00131 // pivot information. -00132 // ================================================================= -00133 void Sprite::SetPivot(const Sprite &obj) { -00134 // This x location if the pivot was at SetPivot(0, 0); -00135 GLint worldX; -00136 // This y location it the pivot was at SetPivot(0, 0); -00137 GLint worldY; -00138 GLfloat newPivotX; -00139 GLfloat newPivotY; -00140 -00141 worldX = x - GetPivotX() * image->GetWidth(); -00142 worldY = y - GetPivotY() * image->GetHeight(); -00143 -00144 newPivotX = (float)(obj.x - worldX) / image->GetWidth(); -00145 newPivotY = (float)(obj.y - worldY) / image->GetHeight(); -00146 -00147 SetPivot(newPivotX, newPivotY); -00148 } -00149 -00150 // Help determine if an OpenGL extension is supported on the target machine -00151 // at runtime. -00152 bool Sprite::IsExtensionSupported(const char *extension) const { -00153 const GLubyte *extensions = NULL; -00154 const GLubyte *start; -00155 GLubyte *where, *terminator; -00156 -00157 // Extension names should not have spaces. -00158 where = (GLubyte *) strchr(extension, ' '); -00159 -00160 if (where || *extension == '\0') { -00161 return false; -00162 } -00163 -00164 extensions = glGetString(GL_EXTENSIONS); -00165 -00166 // It takes a bit of care to be fool-proof about parsing the -00167 // OpenGL extensions string. Don't be fooled by sub-strings, etc. -00168 start = extensions; -00169 -00170 for (;;) { -00171 where = (GLubyte *) strstr((const char *) start, extension); -00172 -00173 if (!where) { -00174 break; -00175 } -00176 -00177 terminator = where + strlen(extension); -00178 if (where == start || *(where - 1) == ' ') { -00179 if (*terminator == ' ' || *terminator == '\0') { -00180 return true; -00181 } -00182 } -00183 -00184 start = terminator; -00185 } -00186 -00187 return false; -00188 } -00189 -00190 void Sprite::Render(void) { -00191 InitScene(); -00192 -00193 glEnable(GL_BLEND); -00194 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); -00195 glEnable(GL_TEXTURE_2D); -00196 -00197 // Set the primitive color to white -00198 glColor3f(1.0f, 1.0f, 1.0f); -00199 // Bind the texture to the polygons -00200 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, textureID); -00201 -00202 glPushMatrix(); -00203 -00204 GLfloat transX = 1; -00205 GLfloat transY = 1; -00206 -00207 if(x != 0.0) { -00208 transX = x; -00209 } -00210 -00211 if(y != 0.0) { -00212 transY = y; -00213 } -00214 -00215 glLoadIdentity(); -00216 glTranslatef(transX, transY, 0); -00217 glScalef(scaleX, scaleY, 1.0); -00218 glRotatef(angle, 0.0, 0.0, 1.0); -00219 -00220 // ================================================================= -00221 // Render a quad -00222 // Instead of the using (s,t) coordinates, with the GL_NV_texture_rectangle -00223 // extension, you need to use the actual dimensions of the texture. -00224 // This makes using 2D sprites for games and emulators much easier now -00225 // that you won't have to convert :) -00226 // -00227 // convert the coordinates so that the bottom left corner changes to -00228 // (0, 0) -> (1, 1) and the top right corner changes from (1, 1) -> (0, 0) -00229 // we will use this new coordinate system to calculate the location of the sprite -00230 // in the world coordinates to do the rotation and scaling. This mapping is done in -00231 // order to make implementation simpler in this class and let the caller keep using -00232 // the standard OpenGL coordinates system (bottom left corner at (0, 0)) -00233 // ================================================================= -00234 glBegin(GL_QUADS); -00235 glTexCoord2i(0, 0); -00236 glVertex2i(-pivotX * image->GetWidth(), -pivotY * image->GetHeight()); -00237 -00238 glTexCoord2i(0, image->GetHeight()); -00239 glVertex2i(-pivotX * image->GetWidth(), (1 - pivotY) * image->GetHeight()); -00240 -00241 glTexCoord2i(image->GetWidth(), image->GetHeight()); -00242 glVertex2i( (1 - pivotX) * image->GetWidth(), (1 - pivotY) * image->GetHeight()); -00243 -00244 glTexCoord2i(image->GetWidth(), 0); -00245 glVertex2i( (1 - pivotX) * image->GetWidth(), -pivotY * image->GetHeight()); -00246 glEnd(); -00247 -00248 glPopMatrix(); -00249 } -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Classes | |
class | Sprite |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _SPRITE_H_ -00002 #define _SPRITE_H_ -00003 #include <GL/glut.h> -00004 #include <string> -00005 #include "ImageLoader.h" -00006 -00007 using namespace std; -00008 -00009 class ImageLoader; -00010 -00011 class Sprite { -00012 public: -00013 static void Enable2D(void); -00014 -00015 static void Disable2D(void); -00016 -00017 Sprite(string filename); -00018 virtual ~Sprite(void); -00019 -00020 virtual void Render(void); -00021 virtual void Rotate(GLint degrees) { angle += degrees; } -00022 -00023 // Mutators. -00024 GLint GetAngle(void) const { return angle; } -00025 void SetAngle(GLint angle) { this->angle = angle; } -00026 void SetX(GLdouble x) { this->x = x; } -00027 void SetY(GLdouble y) { this->y = y; } -00028 GLint GetHeight(void) const { return image->GetHeight() * scaleY; } -00029 GLint GetWidth(void) const { return image->GetWidth() * scaleX; } -00030 -00031 void SetPivot(GLfloat pivotX, GLfloat pivotY); -00032 GLfloat GetPivotX(void) const { return pivotX; } -00033 GLfloat GetPivotY(void) const { return pivotY; } -00034 -00035 GLdouble GetX(void) const { return x; } -00036 GLdouble GetY(void) const { return y; } -00037 -00038 void SetPivot(const Sprite &obj); -00039 -00040 -00041 // ================================================================= -00042 // Set the scale of the object. A scale of (1.0,1.0) means the sprite -00043 // maintains its original size. Values larger than 1 scales the sprite -00044 // up while values less than 1 shrink it down. -00045 // ================================================================= -00046 void SetScale(GLfloat x, GLfloat y) { scaleX = x, scaleY = y; } -00047 -00048 private: -00049 ImageLoader *image; -00050 GLuint textureID; -00051 GLint angle; -00052 GLdouble x; -00053 GLdouble y; -00054 GLfloat pivotX; -00055 GLfloat pivotY; -00056 GLfloat scaleX; -00057 GLfloat scaleY; -00058 -00059 void InitScene(void); -00060 -00061 bool IsExtensionSupported(const char *extension) const; -00062 }; -00063 -00064 #endif -
![]() |
-
- Unuk 1.0
- |
-
Go to the source code of this file.
--Classes | |
class | Static |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _STATIC_H_ -00002 #define _STATIC_H_ -00003 -00004 /* -00005 * Inheriting from this class will make the class uncopyable. -00006 * It is useful to do this because a lot of the time we won't -00007 * want to be able to copy stuff, like the window or the game class. -00008 * -00009 * I probably chose a bad name for this. -00010 * -00011 */ -00012 -00013 class Static { -00014 protected: -00015 Static() {} -00016 ~Static() {} -00017 private: -00018 Static(const Static&); -00019 Static& operator=(const Static &); -00020 }; -00021 -00022 #endif -
![]() |
-
- Unuk 1.0
- |
-
#include <ctime>
#include <iostream>
#include <windows.h>
#include <GL/gl.h>
#include "../Libs/wglext.h"
#include "Win32Window.h"
#include "../Unuk/Game.h"
Go to the source code of this file.
--Typedefs | |
typedef const int -*PFNWGLCREATECONTEXTATTRIBSARBPROC | wglCreateContextAttribsARB = NULL |
-Functions | |
typedef | HGLRC (APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC |
-Variables | |
typedef | HGLRC |
typedef const int* PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL | -
Definition at line 10 of file Win32Window.cpp.
- -typedef HGLRC | -( | -APIENTRYP | -PFNWGLCREATECONTEXTATTRIBSARBPROC | ) | -- |
typedef HGLRC | -
Definition at line 9 of file Win32Window.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
00001 #include <ctime> -00002 #include <iostream> -00003 #include <windows.h> -00004 #include <GL/gl.h> -00005 #include "../Libs/wglext.h" -00006 #include "Win32Window.h" -00007 #include "../Unuk/Game.h" -00008 -00009 typedef HGLRC(APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC, HGLRC, const int*); -00010 PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL; -00011 -00012 Win32Window::Win32Window(HINSTANCE hInstance) { -00013 m_isRunning = false; -00014 m_game = NULL; -00015 m_hinstance = hInstance; -00016 m_lastTime = 0; -00017 } -00018 -00019 Win32Window::~Win32Window(void) { -00020 -00021 } -00022 -00023 bool Win32Window::Create(int width, int height, int bpp, bool fullscreen) { -00024 DWORD dwExStyle; -00025 DWORD dwStyle; -00026 -00027 m_isFullscreen = fullscreen; -00028 -00029 // Set up the window values. -00030 m_windowRect.left = (long) 0; -00031 m_windowRect.right = (long) width; -00032 m_windowRect.top = (long) 0; -00033 m_windowRect.bottom = (long) height; -00034 -00035 // Set up the window class structure. -00036 m_windowClass.cbSize = sizeof(WNDCLASSEX); -00037 m_windowClass.style = CS_HREDRAW | CS_VREDRAW; -00038 m_windowClass.lpfnWndProc = Win32Window::StaticWndProc; // Our static method is the event handler. -00039 m_windowClass.cbClsExtra = 0; -00040 m_windowClass.cbWndExtra = 0; -00041 m_windowClass.hInstance = m_hinstance; -00042 m_windowClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); -00043 m_windowClass.hCurser = LoadCursor(NULL, IDC_ARROW); -00044 m_windowClass.hbrBackground = NULL; -00045 m_windowClass.lpszMenuName = NULL; -00046 m_windowClass.lpszClassName = "Unuk"; -00047 m_windowClass.hIconSm = LoadIcon(NULL, IDI_WINLOGO); -00048 -00049 // Register the window class. -00050 if(!RegisterClassEx(&m_windowClass)) { -00051 return false; -00052 } -00053 -00054 // We need to change the display mode if we are running fullscreen. -00055 if(m_isFullsceen) { -00056 // This is the device mode. -00057 DEVMODE dmScreenSettings; -00058 memset(&dmScreenSettings, 0, sizeof(smScreenSettings)); -00059 dmScreenSettings.dmSize = sizeof(dmScreenSettings); -00060 -00061 // Set the screen width/height/bpp. -00062 dmScreenSettings.dmPelsWidth = width; -00063 dmScreenSettings.dmPelsHeight = height; -00064 dmScreenSettings.dmBitsPerPel = bpp; -00065 dmScreenSettings.dwFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; -00066 -00067 if(ChangeDisplaySettings(&dScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) { -00068 // Setting display mode failed, we will switch to windowed mode. -00069 MessageBox(NULL, "Display mode failed", NULL, MB_OK); -00070 m_isFullscreen = false; -00071 } -00072 } -00073 -00074 // Check to see if we are still in fullscreen mode. -00075 if(m_fullscreen) { -00076 dwExStyle = WS_EX_APPWINDOW; -00077 dwStyle = WS_POPUP; -00078 ShowCursor(false); -00079 } else { -00080 // fullscreen mode must have failed. -00081 dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; -00082 dwStyle = WS_OVERLAPPEDWINDOW -00083 } -00084 -00085 // Adjusted the window to the requested size. -00086 AdjustWindowRectEx(&m_windowRect, swStyle, false, dwExStyle); -00087 -00088 // Now the class is regestered we can finaly create the window. -00089 m_hWnd = CreateWindowEx(NULL, "Unuk", dwStyle | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, -00090 m_windowRect.right - m_windowRect.left, m_windowRect.bottom - m_windowRect.top, -00091 NULL, NULL, m_hinstance, this); -00092 -00093 // Let's make sure the window creation went as planned. -00094 if(!m_hWnd) return 0; -00095 -00096 m_hdc = GetDC(m_hWnd); -00097 -00098 // We know everything is ok, display and update the window now. -00099 ShowWindow(m_hWnd, SW_SHOW); -00100 UpdateWindow(m_hWnd); -00101 -00102 m_lastTime = GetTickCount() / 1000.0f; -00103 return true; -00104 } -00105 -00106 void Win32Window::Destroy(void) { -00107 // If we are in fullscreen we want to switch back to desktop, and show the mouse cursor. -00108 if(m_isFullscreen) { -00109 ChangeDisplaySettings(NULL, 0); -00110 ShowCursor(true); -00111 } -00112 } -00113 -00114 void Win32Window::AttachGame(Game* game) { -00115 m_game = game; -00116 } -00117 -00118 bool Win32Window::IsRunning(void) { -00119 return m_isRunning; -00120 } -00121 -00122 void Win32Window::ProccessEvents(void) { -00123 MSG msg; -00124 -00125 // While there are messages in the queue, store them in msg. -00126 while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { -00127 // Process the messages one at a time. -00128 TranslateMessage(&msg); -00129 DispatchMessage(&msg); -00130 } -00131 } -00132 -00133 void Win32Window::SetupPixelFormat(void) { -00134 int pixelFormat; -00135 -00136 PIXELFORMATDESCRIPTOR pfd = { -00137 sizeof(PIXELFORMATDESCRIPTOR), // Size. -00138 1, // Version. -00139 PFD_SUPPORT_OPENGL | // OpenGL window. -00140 PFD_DRAW_TO_WINDOW | // Render to window. -00141 PFD_DOUBLEBUFFER, // Double buffer. -00142 PFD_TYPE_RGBA, // Color type. -00143 32, // Color Depth. -00144 0, 0, 0, 0, 0, 0, // Color bits (ignored). -00145 0, // No alpha buffer. -00146 0, // Alpha bits (ignored). -00147 0, // No accumulation buffer. -00148 0, 0, 0, 0, // Accumulation bits (ignored). -00149 16, // Depth buffer. -00150 0, // No stencil buffer. -00151 0, // No auxiliary buffers. -00152 PFD_MAIN_PLANE, // Main layer. -00153 0, // Reserved. -00154 0, 0, 0, // No layer, visible, damage masks. -00155 }; -00156 -00157 pixelFormat = ChoosePixelFormat(m_hdc, &pfd); -00158 SetPixelFormat(m_hdc, pixelFormat, &pfd); -00159 } -00160 -00161 LRESULT Win32Window::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { -00162 switch(uMsg) { -00163 // Create the window. -00164 case WM_CREATE: -00165 m_hdc = GetDC(hWnd); -00166 SetupPixelFormat(); -00167 -00168 // Setup the OpenGL version. We want to use 3.0. -00169 int attribs[] = { -00170 WGL_CONTEXT_MAJOR_VERSION_ARB, 3, -00171 WGL_CONTEXT_MINOR_VERSION_ARB, 0, -00172 0 -00173 }; -00174 -00175 // Create a temporary context so we can get a pointer to the function. -00176 HGLRC tmpContext = wglCreateContext(m_hdc); -00177 // Make it the current. -00178 wglMakeCurrent(m_hdc, tmpContext); -00179 -00180 // Get the function pointer. -00181 wglCreateContextAttribsARB = (PFNWGLCCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress("wglCreateContextAttribsARB"); -00182 -00183 // If it is NULL, then GL 3.0 is not supported. -00184 if(!wglCreateContextAttribsARB) { -00185 Debug::logger->message("\nOpenGL 3.0 is not supported, falling back to GL 2.1"); -00186 m_hglrc = tmpContext; -00187 } else { -00188 // Create an OpenGL 3.0 context using the new function. -00189 m_hglrc = wglCreateContextAttribsARB(m_hdc, 0, attribs); -00190 // Delete then temp context. -00191 wglDeleteContext(tmpContext); -00192 } -00193 -00194 // Make the GL3 context current. -00195 wglMakeCurrent(m_hdc, m_hglrc); -00196 // Our window is now running. -00197 m_isRunning = true; -00198 break; -00199 case WM_DESTROY: -00200 case WM_CLOSE: -00201 wglMakeCurrent(m_hdc, NULL); -00202 wglDeleteContext(m_hglrc); -00203 m_isRunning = false; -00204 PostQuitMessage(0); -00205 return 0; -00206 break; -00207 case WM_SIZE: -00208 // Get the width and height. -00209 int height = HIWORD(lParam); -00210 int width = LOWORD(lParam); -00211 getAttachedExample()->onResize(width, height); -00212 break; -00213 case WM_KEYDOWN: -00214 // If we detect the escape key, then please close the window. -00215 if(wParam == VK_ESCAPE) { -00216 DestroyWindow(m_hwnd); -00217 } -00218 break; -00219 default: -00220 break; -00221 } -00222 return DefWindowProc(hWnd, uMsg, wParam, lParam); -00223 } -00224 -00225 LRESULT CALLBACK Win32Window::StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { -00226 Win32Window* window = NULL; -00227 -00228 // If we see the create message. -00229 if(uMsg == WM_CREATE) { -00230 // Then get the pointer we stored during create. -00231 window = (Win32Window)(LPCREATESTRUCT)lParam)->lpCreateParams; -00232 // Associate the window pointer with the hWnd for the other events to access. -00233 SetWindowLongPtr(hWnd, GWL_USERDAA, (LONG_PTR)window); -00234 } else { -00235 // If this aint a creation event, then we should have stored a pointer to the window. -00236 window = (Win32Window)GetWindowLongPtr(hWnd, GWL_USERDATA); -00237 if(!window) { -00238 return DefWindowProc(hWnd, uMsg, wParam, lParam); -00239 } -00240 } -00241 // Call our window's member WndProc (allows us to access member variables). -00242 return window->WndProc(hWnd, uMsg, wParam, lParam) -00243 } -00244 -00245 float Win32Window::getElapsedSeconds() { -00246 float currentTime = float(GetTickCount()) / 1000.0f; -00247 float seconds = float(currentTime - m_lastTime); -00248 m_lastTime = currentTime; -00249 return seconds; -00250 } -
![]() |
-
- Unuk 1.0
- |
-
#include <windows.h>
#include <ctime>
Go to the source code of this file.
--Classes | |
class | Win32Window |
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef _WIN32WINDOW_H_ -00002 #define _WIN32WINDOW_H_ -00003 #include <windows.h> -00004 #include <ctime> -00005 -00006 class Game; // Declaration of our Game class. -00007 -00008 class Win32Window { -00009 public: -00010 // Default constructor/deconstructor. -00011 Win32Window(HINSTANCE hInstance); -00012 ~Win32Window(void); -00013 -00014 bool Create(int width, int height, int bpp, bool fullscreen); -00015 void Destroy(); -00016 void ProcessEvents(); -00017 void AttachGame(Game* game); -00018 -00019 // Is the window running? -00020 bool IsRunning(); -00021 -00022 void SwapBuffers() { SwapBuffers(m_hdc); } -00023 -00024 static LRESULT CALLBACK StaticWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); -00025 LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); -00026 -00027 float GetElapsedSeconds(); -00028 -00029 private: -00030 // Pointer to the game class. -00031 Game* m_game; -00032 // Is the window still running? -00033 bool m_isRunning; -00034 bool m_fullscreen; -00035 -00036 // Window handle. -00037 HWND m_hWnd; -00038 // This is our rendering context. -00039 HGLRC m_hglrc; -00040 // The device context. -00041 HDC m_hdc; -00042 // Window bounds. -00043 RECT m_windowRect; -00044 // Application instance. -00045 HINSTANCE m_hinstance; -00046 WNDCLASSEX m_windowClass; -00047 -00048 void SetupPixelFormat(void); -00049 Game* GetAttachedGame() { return m_game; } -00050 -00051 float m_lastTime; -00052 }; -00053 -00054 #endif // _WIN32WINDOW_H_ -
![]() |
-
- Unuk 1.0
- |
-
AStar | |
Colour | |
Debug | |
Entity | |
Game | |
GLXBufferClobberEventSGIX | |
GLXHyperpipeConfigSGIX | |
GLXHyperpipeNetworkSGIX | |
GLXPipeRect | |
GLXPipeRectLimits | |
ImageLoader | |
input_s | |
keyboard_s | |
mouse_s | |
Node | |
Player | |
Sprite | |
Stack | |
Static | |
TexCoord | |
Vector2 | |
Win32Window |
![]() |
-
- Unuk 1.0
- |
-
AStar(void) | AStar | |
CBData | AStar | |
GeneratePath(int startx, int starty, int destx, int desty) | AStar | |
GetBestNode(void) | AStar | [inline] |
InitStep(int startx, int starty, int destx, int desty) | AStar | |
NCData | AStar | |
Reset(void) | AStar | [inline] |
SetRows(int r) | AStar | [inline] |
Step(void) | AStar | |
udCost | AStar | |
udNotifyChild | AStar | |
udNotifyList | AStar | |
udValid | AStar | |
~AStar(void) | AStar |
![]() |
-
- Unuk 1.0
- |
-
#include <AStar.h>
-Public Member Functions | |
AStar (void) | |
~AStar (void) | |
bool | GeneratePath (int startx, int starty, int destx, int desty) |
int | Step (void) |
int | InitStep (int startx, int starty, int destx, int desty) |
void | SetRows (int r) |
void | Reset (void) |
Node * | GetBestNode (void) |
-Public Attributes | |
Func | udCost |
Func | udValid |
Func | udNotifyChild |
Func | udNotifyList |
void * | CBData |
void * | NCData |
bool AStar::GeneratePath | -( | -int | -startx, | -
- | - | int | -starty, | -
- | - | int | -destx, | -
- | - | int | -desty | -
- | ) | -- |
Node* AStar::GetBestNode | -( | -void | -) | - [inline] |
-
int AStar::InitStep | -( | -int | -startx, | -
- | - | int | -starty, | -
- | - | int | -destx, | -
- | - | int | -desty | -
- | ) | -- |
void AStar::Reset | -( | -void | -) | - [inline] |
-
void AStar::SetRows | -( | -int | -r | ) | - [inline] |
-
void* AStar::CBData | -
void* AStar::NCData | -
Func AStar::udCost | -
Func AStar::udNotifyChild | -
Func AStar::udNotifyList | -
Func AStar::udValid | -
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <Debug.h>
-Public Member Functions | |
Debug (bool logToFile) | |
~Debug (void) | |
void | message (std::string msg) |
void | message (const char *msg,...) |
-Static Public Member Functions | |
static bool | openLog (bool logToFile) |
static void | closeLog (void) |
-Static Public Attributes | |
static Debug * | logger = NULL |
Debug::Debug | -( | -bool | -logToFile | ) | -- |
void Debug::closeLog | -( | -void | -) | - [static] |
-
void Debug::message | -( | -const char * | -msg, | -
- | - | - | ... | -
- | ) | -- |
void Debug::message | -( | -std::string | -msg | ) | -- |
bool Debug::openLog | -( | -bool | -logToFile | ) | - [static] |
-
Debug * Debug::logger = NULL [static] |
-
![]() |
-
- Unuk 1.0
- |
-
CanBeRemoved(void) const | Entity | |
Destroy(void) | Entity | |
Entity(GameWorld *const gameWorld) | Entity | |
GetPosition(void) const =0 | Entity | [pure virtual] |
GetType(void) const =0 | Entity | [pure virtual] |
Initialize(void) | Entity | |
PostRender(void) | Entity | |
Prepare(float dt) | Entity | |
Render(void) const | Entity | |
SetPosition(const Vector2 &position)=0 | Entity | [pure virtual] |
Shutdown(void) | Entity | |
Static() | Static | [inline, private] |
~Entity(void) | Entity | [virtual] |
~Static() | Static | [inline, private] |
![]() |
-
- Unuk 1.0
- |
-
#include <Entity.h>
-Public Member Functions | |
Entity (GameWorld *const gameWorld) | |
virtual | ~Entity (void) |
void | Prepare (float dt) |
void | Render (void) const |
void | PostRender (void) |
bool | Initialize (void) |
void | Shutdown (void) |
bool | CanBeRemoved (void) const |
void | Destroy (void) |
virtual Vector2 | GetPosition (void) const =0 |
virtual void | SetPosition (const Vector2 &position)=0 |
virtual EntityType | GetType (void) const =0 |
Entity::Entity | -( | -GameWorld *const | -gameWorld | ) | -- |
Definition at line 3 of file Entity.cpp.
- -Entity::~Entity | -( | -void | -) | - [virtual] |
-
Definition at line 7 of file Entity.cpp.
- -bool Entity::CanBeRemoved | -( | -void | -) | -const | -
Definition at line 9 of file Entity.cpp.
- -void Entity::Destroy | -( | -void | -) | -- |
Definition at line 13 of file Entity.cpp.
- -virtual Vector2 Entity::GetPosition | -( | -void | -) | - const [pure virtual] |
-
virtual EntityType Entity::GetType | -( | -void | -) | - const [pure virtual] |
-
bool Entity::Initialize | -( | -void | -) | -- |
Definition at line 29 of file Entity.cpp.
- -void Entity::PostRender | -( | -void | -) | -- |
void Entity::Prepare | -( | -float | -dt | ) | -- |
Definition at line 17 of file Entity.cpp.
- -void Entity::Render | -( | -void | -) | -const | -
Definition at line 21 of file Entity.cpp.
- -virtual void Entity::SetPosition | -( | -const Vector2 & | -position | ) | - [pure virtual] |
-
void Entity::Shutdown | -( | -void | -) | -- |
Definition at line 33 of file Entity.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <Game.h>
-Public Member Functions | |
Game (void) | |
~Game (void) | |
bool | Init (void) |
void | Prepare (float dt) |
void | Render (void) |
void | Shutdown (void) |
void | UpdateProjection () |
void | OnResize (int width, int height) |
void Game::OnResize | -( | -int | -width, | -
- | - | int | -height | -
- | ) | -- |
void Game::Prepare | -( | -float | -dt | ) | -- |
void Game::Shutdown | -( | -void | -) | -- |
void Game::UpdateProjection | -( | -void | -) | -- |
![]() |
-
- Unuk 1.0
- |
-
GetAlpha(void) const | ImageLoader | |
GetColors(void) const | ImageLoader | [inline] |
GetHeight(void) const | ImageLoader | [inline] |
GetLoaded(void) const | ImageLoader | [inline] |
GetPixelData(void) const | ImageLoader | [inline] |
GetWidth(void) const | ImageLoader | [inline] |
ImageLoader(void) | ImageLoader | |
ImageLoader(const char *filename) | ImageLoader | |
LoadBMP(const char *filename) | ImageLoader | |
~ImageLoader(void) | ImageLoader | [virtual] |
![]() |
-
- Unuk 1.0
- |
-
#include <ImageLoader.h>
-Public Member Functions | |
ImageLoader (void) | |
ImageLoader (const char *filename) | |
virtual | ~ImageLoader (void) |
bool | LoadBMP (const char *filename) |
BYTE * | GetAlpha (void) const |
LONG | GetHeight (void) const |
RGBQUAD * | GetColors (void) const |
bool | GetLoaded (void) const |
BYTE * | GetPixelData (void) const |
LONG | GetWidth (void) const |
Definition at line 45 of file ImageLoader.h.
-ImageLoader::ImageLoader | -( | -void | -) | -- |
Definition at line 9 of file ImageLoader.cpp.
- -ImageLoader::ImageLoader | -( | -const char * | -filename | ) | -- |
Definition at line 14 of file ImageLoader.cpp.
- -ImageLoader::~ImageLoader | -( | -void | -) | - [virtual] |
-
Definition at line 19 of file ImageLoader.cpp.
- -BYTE * ImageLoader::GetAlpha | -( | -void | -) | -const | -
Definition at line 164 of file ImageLoader.cpp.
- -RGBQUAD* ImageLoader::GetColors | -( | -void | -) | - const [inline] |
-
Definition at line 56 of file ImageLoader.h.
- -LONG ImageLoader::GetHeight | -( | -void | -) | - const [inline] |
-
Definition at line 55 of file ImageLoader.h.
- -bool ImageLoader::GetLoaded | -( | -void | -) | - const [inline] |
-
Definition at line 57 of file ImageLoader.h.
- -BYTE* ImageLoader::GetPixelData | -( | -void | -) | - const [inline] |
-
Definition at line 58 of file ImageLoader.h.
- -LONG ImageLoader::GetWidth | -( | -void | -) | - const [inline] |
-
Definition at line 59 of file ImageLoader.h.
- -bool ImageLoader::LoadBMP | -( | -const char * | -filename | ) | -- |
Definition at line 29 of file ImageLoader.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <Node.h>
-Public Member Functions | |
Node (int posx=-1, int posy=-1) | |
-Public Attributes | |
int | f |
int | g |
int | h |
int | x |
int | y |
int | numChildren |
int | id |
Node * | parent |
Node * | next |
Node * | children [8] |
Node::Node | -( | -int | -posx = -1 , |
-
- | - | int | -posy = -1 |
-
- | ) | - [inline] |
-
Node* Node::children[8] | -
Node* Node::next | -
int Node::numChildren | -
Node* Node::parent | -
![]() |
-
- Unuk 1.0
- |
-
CleanUp(void) | Player | |
Player(void) | Player | |
Prepare(void) | Player | |
Render(void) | Player | |
SetPosition(GLdouble posx, GLdouble posy) | Player | |
SetSprite(void) | Player | |
SetVelocity(GLdouble velx, GLdouble vely) | Player | |
~Player(void) | Player |
![]() |
-
- Unuk 1.0
- |
-
#include <Player.h>
-Public Member Functions | |
Player (void) | |
~Player (void) | |
void | Prepare (void) |
void | Render (void) |
void | SetSprite (void) |
void | SetPosition (GLdouble posx, GLdouble posy) |
void | SetVelocity (GLdouble velx, GLdouble vely) |
void | CleanUp (void) |
Player::Player | -( | -void | -) | -- |
Definition at line 8 of file Player.cpp.
- -Player::~Player | -( | -void | -) | -- |
Definition at line 12 of file Player.cpp.
- -void Player::CleanUp | -( | -void | -) | -- |
Definition at line 61 of file Player.cpp.
- -void Player::Prepare | -( | -void | -) | -- |
Definition at line 16 of file Player.cpp.
- -void Player::Render | -( | -void | -) | -- |
Definition at line 35 of file Player.cpp.
- -void Player::SetPosition | -( | -GLdouble | -posx, | -
- | - | GLdouble | -posy | -
- | ) | -- |
Definition at line 44 of file Player.cpp.
- -void Player::SetSprite | -( | -void | -) | -- |
Definition at line 40 of file Player.cpp.
- -void Player::SetVelocity | -( | -GLdouble | -velx, | -
- | - | GLdouble | -vely | -
- | ) | -- |
Definition at line 53 of file Player.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
Disable2D(void) | Sprite | [static] |
Enable2D(void) | Sprite | [static] |
GetAngle(void) const | Sprite | [inline] |
GetHeight(void) const | Sprite | [inline] |
GetPivotX(void) const | Sprite | [inline] |
GetPivotY(void) const | Sprite | [inline] |
GetWidth(void) const | Sprite | [inline] |
GetX(void) const | Sprite | [inline] |
GetY(void) const | Sprite | [inline] |
Render(void) | Sprite | [virtual] |
Rotate(GLint degrees) | Sprite | [inline, virtual] |
SetAngle(GLint angle) | Sprite | [inline] |
SetPivot(GLfloat pivotX, GLfloat pivotY) | Sprite | |
SetPivot(const Sprite &obj) | Sprite | |
SetScale(GLfloat x, GLfloat y) | Sprite | [inline] |
SetX(GLdouble x) | Sprite | [inline] |
SetY(GLdouble y) | Sprite | [inline] |
Sprite(string filename) | Sprite | |
~Sprite(void) | Sprite | [virtual] |
![]() |
-
- Unuk 1.0
- |
-
#include <Sprite.h>
-Public Member Functions | |
Sprite (string filename) | |
virtual | ~Sprite (void) |
virtual void | Render (void) |
virtual void | Rotate (GLint degrees) |
GLint | GetAngle (void) const |
void | SetAngle (GLint angle) |
void | SetX (GLdouble x) |
void | SetY (GLdouble y) |
GLint | GetHeight (void) const |
GLint | GetWidth (void) const |
void | SetPivot (GLfloat pivotX, GLfloat pivotY) |
GLfloat | GetPivotX (void) const |
GLfloat | GetPivotY (void) const |
GLdouble | GetX (void) const |
GLdouble | GetY (void) const |
void | SetPivot (const Sprite &obj) |
void | SetScale (GLfloat x, GLfloat y) |
-Static Public Member Functions | |
static void | Enable2D (void) |
static void | Disable2D (void) |
Sprite::Sprite | -( | -string | -filename | ) | -- |
Definition at line 8 of file Sprite.cpp.
- -Sprite::~Sprite | -( | -void | -) | - [virtual] |
-
Definition at line 17 of file Sprite.cpp.
- -void Sprite::Disable2D | -( | -void | -) | - [static] |
-
Definition at line 53 of file Sprite.cpp.
- -void Sprite::Enable2D | -( | -void | -) | - [static] |
-
Definition at line 23 of file Sprite.cpp.
- -GLint Sprite::GetAngle | -( | -void | -) | - const [inline] |
-
GLint Sprite::GetHeight | -( | -void | -) | - const [inline] |
-
GLfloat Sprite::GetPivotX | -( | -void | -) | - const [inline] |
-
GLfloat Sprite::GetPivotY | -( | -void | -) | - const [inline] |
-
GLint Sprite::GetWidth | -( | -void | -) | - const [inline] |
-
GLdouble Sprite::GetX | -( | -void | -) | - const [inline] |
-
GLdouble Sprite::GetY | -( | -void | -) | - const [inline] |
-
void Sprite::Render | -( | -void | -) | - [virtual] |
-
Definition at line 190 of file Sprite.cpp.
- -virtual void Sprite::Rotate | -( | -GLint | -degrees | ) | - [inline, virtual] |
-
void Sprite::SetAngle | -( | -GLint | -angle | ) | - [inline] |
-
void Sprite::SetPivot | -( | -const Sprite & | -obj | ) | -- |
Definition at line 133 of file Sprite.cpp.
- -void Sprite::SetPivot | -( | -GLfloat | -pivotX, | -
- | - | GLfloat | -pivotY | -
- | ) | -- |
Definition at line 113 of file Sprite.cpp.
- -void Sprite::SetScale | -( | -GLfloat | -x, | -
- | - | GLfloat | -y | -
- | ) | - [inline] |
-
void Sprite::SetX | -( | -GLdouble | -x | ) | - [inline] |
-
void Sprite::SetY | -( | -GLdouble | -y | ) | - [inline] |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <Static.h>
-Protected Member Functions | |
Static () | |
~Static () |
Static::Static | -( | -) | - [inline, protected] |
-
Static::~Static | -( | -) | - [inline, protected] |
-
![]() |
-
- Unuk 1.0
- |
-
AttachGame(Game *game) | Win32Window | |
Create(int width, int height, int bpp, bool fullscreen) | Win32Window | |
Destroy() | Win32Window | |
GetElapsedSeconds() | Win32Window | |
IsRunning() | Win32Window | |
ProcessEvents() | Win32Window | |
StaticWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) | Win32Window | [static] |
SwapBuffers() | Win32Window | [inline] |
Win32Window(HINSTANCE hInstance) | Win32Window | |
WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) | Win32Window | |
~Win32Window(void) | Win32Window |
![]() |
-
- Unuk 1.0
- |
-
#include <Win32Window.h>
-Public Member Functions | |
Win32Window (HINSTANCE hInstance) | |
~Win32Window (void) | |
bool | Create (int width, int height, int bpp, bool fullscreen) |
void | Destroy () |
void | ProcessEvents () |
void | AttachGame (Game *game) |
bool | IsRunning () |
void | SwapBuffers () |
LRESULT CALLBACK | WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
float | GetElapsedSeconds () |
-Static Public Member Functions | |
static LRESULT CALLBACK | StaticWndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
Definition at line 8 of file Win32Window.h.
-Win32Window::Win32Window | -( | -HINSTANCE | -hInstance | ) | -- |
Definition at line 12 of file Win32Window.cpp.
- -Win32Window::~Win32Window | -( | -void | -) | -- |
Definition at line 19 of file Win32Window.cpp.
- -void Win32Window::AttachGame | -( | -Game * | -game | ) | -- |
Definition at line 114 of file Win32Window.cpp.
- -bool Win32Window::Create | -( | -int | -width, | -
- | - | int | -height, | -
- | - | int | -bpp, | -
- | - | bool | -fullscreen | -
- | ) | -- |
Definition at line 23 of file Win32Window.cpp.
- -void Win32Window::Destroy | -( | -void | -) | -- |
Definition at line 106 of file Win32Window.cpp.
- -float Win32Window::GetElapsedSeconds | -( | -) | -- |
bool Win32Window::IsRunning | -( | -void | -) | -- |
Definition at line 118 of file Win32Window.cpp.
- -void Win32Window::ProcessEvents | -( | -) | -- |
LRESULT CALLBACK Win32Window::StaticWndProc | -( | -HWND | -hWnd, | -
- | - | UINT | -msg, | -
- | - | WPARAM | -wParam, | -
- | - | LPARAM | -lParam | -
- | ) | - [static] |
-
Definition at line 225 of file Win32Window.cpp.
- -void Win32Window::SwapBuffers | -( | -) | - [inline] |
-
Definition at line 22 of file Win32Window.h.
- -LRESULT Win32Window::WndProc | -( | -HWND | -hWnd, | -
- | - | UINT | -msg, | -
- | - | WPARAM | -wParam, | -
- | - | LPARAM | -lParam | -
- | ) | -- |
Definition at line 161 of file Win32Window.cpp.
- -![]() |
-
- Unuk 1.0
- |
-
|
|
|
| Static | ||||
AStar | Game | ImageLoader | Node |
| ||||
| GLXBufferClobberEventSGIX | input_s |
| TexCoord | ||||
Colour | GLXHyperpipeConfigSGIX |
| Player |
| ||||
| GLXHyperpipeNetworkSGIX | keyboard_s |
| Vector2 | ||||
Debug | GLXPipeRect |
| Sprite |
| ||||
| GLXPipeRectLimits | mouse_s | Stack | Win32Window | ||||
Entity |
![]() |
-
- Unuk 1.0
- |
-
src/Libs/glxext.h [code] | |
src/Libs/wglext.h [code] | |
src/libUnuk/AStar.cpp [code] | |
src/libUnuk/AStar.h [code] | |
src/libUnuk/Debug.cpp [code] | |
src/libUnuk/Debug.h [code] | |
src/libUnuk/Entity.cpp [code] | |
src/libUnuk/Entity.h [code] | |
src/libUnuk/EntityType.h [code] | |
src/libUnuk/Geometry.h [code] | |
src/libUnuk/ImageLoader.cpp [code] | |
src/libUnuk/ImageLoader.h [code] | |
src/libUnuk/Input.cpp [code] | |
src/libUnuk/Input.h [code] | |
src/libUnuk/Node.h [code] | |
src/libUnuk/Sprite.cpp [code] | |
src/libUnuk/Sprite.h [code] | |
src/libUnuk/Static.h [code] | |
src/libUnuk/Win32Window.cpp [code] | |
src/libUnuk/Win32Window.h [code] | |
src/Unuk/Game.cpp [code] | |
src/Unuk/Game.h [code] | |
src/Unuk/main.cpp [code] | |
src/Unuk/Player.cpp [code] | |
src/Unuk/Player.h [code] |
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <inttypes.h>
Go to the source code of this file.
--Classes | |
struct | GLXBufferClobberEventSGIX |
struct | GLXHyperpipeNetworkSGIX |
struct | GLXHyperpipeConfigSGIX |
struct | GLXPipeRect |
struct | GLXPipeRectLimits |
-Defines | |
#define | APIENTRY |
#define | APIENTRYP APIENTRY * |
#define | GLAPI extern |
#define | GLX_GLXEXT_VERSION 21 |
#define | GLX_WINDOW_BIT 0x00000001 |
#define | GLX_PIXMAP_BIT 0x00000002 |
#define | GLX_PBUFFER_BIT 0x00000004 |
#define | GLX_RGBA_BIT 0x00000001 |
#define | GLX_COLOR_INDEX_BIT 0x00000002 |
#define | GLX_PBUFFER_CLOBBER_MASK 0x08000000 |
#define | GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 |
#define | GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 |
#define | GLX_BACK_LEFT_BUFFER_BIT 0x00000004 |
#define | GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 |
#define | GLX_AUX_BUFFERS_BIT 0x00000010 |
#define | GLX_DEPTH_BUFFER_BIT 0x00000020 |
#define | GLX_STENCIL_BUFFER_BIT 0x00000040 |
#define | GLX_ACCUM_BUFFER_BIT 0x00000080 |
#define | GLX_CONFIG_CAVEAT 0x20 |
#define | GLX_X_VISUAL_TYPE 0x22 |
#define | GLX_TRANSPARENT_TYPE 0x23 |
#define | GLX_TRANSPARENT_INDEX_VALUE 0x24 |
#define | GLX_TRANSPARENT_RED_VALUE 0x25 |
#define | GLX_TRANSPARENT_GREEN_VALUE 0x26 |
#define | GLX_TRANSPARENT_BLUE_VALUE 0x27 |
#define | GLX_TRANSPARENT_ALPHA_VALUE 0x28 |
#define | GLX_DONT_CARE 0xFFFFFFFF |
#define | GLX_NONE 0x8000 |
#define | GLX_SLOW_CONFIG 0x8001 |
#define | GLX_TRUE_COLOR 0x8002 |
#define | GLX_DIRECT_COLOR 0x8003 |
#define | GLX_PSEUDO_COLOR 0x8004 |
#define | GLX_STATIC_COLOR 0x8005 |
#define | GLX_GRAY_SCALE 0x8006 |
#define | GLX_STATIC_GRAY 0x8007 |
#define | GLX_TRANSPARENT_RGB 0x8008 |
#define | GLX_TRANSPARENT_INDEX 0x8009 |
#define | GLX_VISUAL_ID 0x800B |
#define | GLX_SCREEN 0x800C |
#define | GLX_NON_CONFORMANT_CONFIG 0x800D |
#define | GLX_DRAWABLE_TYPE 0x8010 |
#define | GLX_RENDER_TYPE 0x8011 |
#define | GLX_X_RENDERABLE 0x8012 |
#define | GLX_FBCONFIG_ID 0x8013 |
#define | GLX_RGBA_TYPE 0x8014 |
#define | GLX_COLOR_INDEX_TYPE 0x8015 |
#define | GLX_MAX_PBUFFER_WIDTH 0x8016 |
#define | GLX_MAX_PBUFFER_HEIGHT 0x8017 |
#define | GLX_MAX_PBUFFER_PIXELS 0x8018 |
#define | GLX_PRESERVED_CONTENTS 0x801B |
#define | GLX_LARGEST_PBUFFER 0x801C |
#define | GLX_WIDTH 0x801D |
#define | GLX_HEIGHT 0x801E |
#define | GLX_EVENT_MASK 0x801F |
#define | GLX_DAMAGED 0x8020 |
#define | GLX_SAVED 0x8021 |
#define | GLX_WINDOW 0x8022 |
#define | GLX_PBUFFER 0x8023 |
#define | GLX_PBUFFER_HEIGHT 0x8040 |
#define | GLX_PBUFFER_WIDTH 0x8041 |
#define | GLX_SAMPLE_BUFFERS 100000 |
#define | GLX_SAMPLES 100001 |
#define | GLX_SAMPLE_BUFFERS_ARB 100000 |
#define | GLX_SAMPLES_ARB 100001 |
#define | GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 |
#define | GLX_RGBA_FLOAT_BIT_ARB 0x00000004 |
#define | GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 |
#define | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 |
#define | GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 |
#define | GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 |
#define | GLX_CONTEXT_FLAGS_ARB 0x2094 |
#define | GLX_SAMPLE_BUFFERS_SGIS 100000 |
#define | GLX_SAMPLES_SGIS 100001 |
#define | GLX_X_VISUAL_TYPE_EXT 0x22 |
#define | GLX_TRANSPARENT_TYPE_EXT 0x23 |
#define | GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 |
#define | GLX_TRANSPARENT_RED_VALUE_EXT 0x25 |
#define | GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 |
#define | GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 |
#define | GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 |
#define | GLX_NONE_EXT 0x8000 |
#define | GLX_TRUE_COLOR_EXT 0x8002 |
#define | GLX_DIRECT_COLOR_EXT 0x8003 |
#define | GLX_PSEUDO_COLOR_EXT 0x8004 |
#define | GLX_STATIC_COLOR_EXT 0x8005 |
#define | GLX_GRAY_SCALE_EXT 0x8006 |
#define | GLX_STATIC_GRAY_EXT 0x8007 |
#define | GLX_TRANSPARENT_RGB_EXT 0x8008 |
#define | GLX_TRANSPARENT_INDEX_EXT 0x8009 |
#define | GLX_VISUAL_CAVEAT_EXT 0x20 |
#define | GLX_SLOW_VISUAL_EXT 0x8001 |
#define | GLX_NON_CONFORMANT_VISUAL_EXT 0x800D |
#define | GLX_SHARE_CONTEXT_EXT 0x800A |
#define | GLX_VISUAL_ID_EXT 0x800B |
#define | GLX_SCREEN_EXT 0x800C |
#define | GLX_WINDOW_BIT_SGIX 0x00000001 |
#define | GLX_PIXMAP_BIT_SGIX 0x00000002 |
#define | GLX_RGBA_BIT_SGIX 0x00000001 |
#define | GLX_COLOR_INDEX_BIT_SGIX 0x00000002 |
#define | GLX_DRAWABLE_TYPE_SGIX 0x8010 |
#define | GLX_RENDER_TYPE_SGIX 0x8011 |
#define | GLX_X_RENDERABLE_SGIX 0x8012 |
#define | GLX_FBCONFIG_ID_SGIX 0x8013 |
#define | GLX_RGBA_TYPE_SGIX 0x8014 |
#define | GLX_COLOR_INDEX_TYPE_SGIX 0x8015 |
#define | GLX_PBUFFER_BIT_SGIX 0x00000004 |
#define | GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 |
#define | GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 |
#define | GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 |
#define | GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 |
#define | GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 |
#define | GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 |
#define | GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 |
#define | GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 |
#define | GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 |
#define | GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 |
#define | GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 |
#define | GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 |
#define | GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 |
#define | GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 |
#define | GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A |
#define | GLX_PRESERVED_CONTENTS_SGIX 0x801B |
#define | GLX_LARGEST_PBUFFER_SGIX 0x801C |
#define | GLX_WIDTH_SGIX 0x801D |
#define | GLX_HEIGHT_SGIX 0x801E |
#define | GLX_EVENT_MASK_SGIX 0x801F |
#define | GLX_DAMAGED_SGIX 0x8020 |
#define | GLX_SAVED_SGIX 0x8021 |
#define | GLX_WINDOW_SGIX 0x8022 |
#define | GLX_PBUFFER_SGIX 0x8023 |
#define | GLX_SYNC_FRAME_SGIX 0x00000000 |
#define | GLX_SYNC_SWAP_SGIX 0x00000001 |
#define | GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 |
#define | GLX_BLENDED_RGBA_SGIS 0x8025 |
#define | GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 |
#define | GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 |
#define | GLX_SAMPLE_BUFFERS_3DFX 0x8050 |
#define | GLX_SAMPLES_3DFX 0x8051 |
#define | GLX_3DFX_WINDOW_MODE_MESA 0x1 |
#define | GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 |
#define | GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 |
#define | GLX_SWAP_METHOD_OML 0x8060 |
#define | GLX_SWAP_EXCHANGE_OML 0x8061 |
#define | GLX_SWAP_COPY_OML 0x8062 |
#define | GLX_SWAP_UNDEFINED_OML 0x8063 |
#define | GLX_FLOAT_COMPONENTS_NV 0x20B0 |
#define | GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 |
#define | GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 |
#define | GLX_BAD_HYPERPIPE_SGIX 92 |
#define | GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 |
#define | GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 |
#define | GLX_PIPE_RECT_SGIX 0x00000001 |
#define | GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 |
#define | GLX_HYPERPIPE_STEREO_SGIX 0x00000003 |
#define | GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 |
#define | GLX_HYPERPIPE_ID_SGIX 0x8030 |
#define | GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 |
#define | GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 |
#define | GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 |
#define | GLX_TEXTURE_1D_BIT_EXT 0x00000001 |
#define | GLX_TEXTURE_2D_BIT_EXT 0x00000002 |
#define | GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 |
#define | GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 |
#define | GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 |
#define | GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 |
#define | GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 |
#define | GLX_Y_INVERTED_EXT 0x20D4 |
#define | GLX_TEXTURE_FORMAT_EXT 0x20D5 |
#define | GLX_TEXTURE_TARGET_EXT 0x20D6 |
#define | GLX_MIPMAP_TEXTURE_EXT 0x20D7 |
#define | GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 |
#define | GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 |
#define | GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA |
#define | GLX_TEXTURE_1D_EXT 0x20DB |
#define | GLX_TEXTURE_2D_EXT 0x20DC |
#define | GLX_TEXTURE_RECTANGLE_EXT 0x20DD |
#define | GLX_FRONT_LEFT_EXT 0x20DE |
#define | GLX_FRONT_RIGHT_EXT 0x20DF |
#define | GLX_BACK_LEFT_EXT 0x20E0 |
#define | GLX_BACK_RIGHT_EXT 0x20E1 |
#define | GLX_FRONT_EXT GLX_FRONT_LEFT_EXT |
#define | GLX_BACK_EXT GLX_BACK_LEFT_EXT |
#define | GLX_AUX0_EXT 0x20E2 |
#define | GLX_AUX1_EXT 0x20E3 |
#define | GLX_AUX2_EXT 0x20E4 |
#define | GLX_AUX3_EXT 0x20E5 |
#define | GLX_AUX4_EXT 0x20E6 |
#define | GLX_AUX5_EXT 0x20E7 |
#define | GLX_AUX6_EXT 0x20E8 |
#define | GLX_AUX7_EXT 0x20E9 |
#define | GLX_AUX8_EXT 0x20EA |
#define | GLX_AUX9_EXT 0x20EB |
#define | GLX_NUM_VIDEO_SLOTS_NV 0x20F0 |
#define | GLX_VIDEO_OUT_COLOR_NV 0x20C3 |
#define | GLX_VIDEO_OUT_ALPHA_NV 0x20C4 |
#define | GLX_VIDEO_OUT_DEPTH_NV 0x20C5 |
#define | GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 |
#define | GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 |
#define | GLX_VIDEO_OUT_FRAME_NV 0x20C8 |
#define | GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 |
#define | GLX_VIDEO_OUT_FIELD_2_NV 0x20CA |
#define | GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB |
#define | GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC |
#define | GLEXT_64_TYPES_DEFINED |
#define | GLX_VERSION_1_3 1 |
#define | GLX_VERSION_1_4 1 |
#define | GLX_ARB_get_proc_address 1 |
#define | GLX_ARB_multisample 1 |
#define | GLX_ARB_fbconfig_float 1 |
#define | GLX_ARB_create_context 1 |
#define | GLX_SGIS_multisample 1 |
#define | GLX_EXT_visual_info 1 |
#define | GLX_SGI_swap_control 1 |
#define | GLX_SGI_video_sync 1 |
#define | GLX_SGI_make_current_read 1 |
#define | GLX_SGIX_video_source 1 |
#define | GLX_EXT_visual_rating 1 |
#define | GLX_EXT_import_context 1 |
#define | GLX_SGIX_fbconfig 1 |
#define | GLX_SGIX_pbuffer 1 |
#define | GLX_SGI_cushion 1 |
#define | GLX_SGIX_video_resize 1 |
#define | GLX_SGIX_dmbuffer 1 |
#define | GLX_SGIX_swap_group 1 |
#define | GLX_SGIX_swap_barrier 1 |
#define | GLX_SUN_get_transparent_index 1 |
#define | GLX_MESA_copy_sub_buffer 1 |
#define | GLX_MESA_pixmap_colormap 1 |
#define | GLX_MESA_release_buffers 1 |
#define | GLX_MESA_set_3dfx_mode 1 |
#define | GLX_SGIX_visual_select_group 1 |
#define | GLX_OML_swap_method 1 |
#define | GLX_OML_sync_control 1 |
#define | GLX_NV_float_buffer 1 |
#define | GLX_SGIX_hyperpipe 1 |
#define | GLX_MESA_agp_offset 1 |
#define | GLX_EXT_fbconfig_packed_float 1 |
#define | GLX_EXT_framebuffer_sRGB 1 |
#define | GLX_EXT_texture_from_pixmap 1 |
#define | GLX_NV_present_video 1 |
#define | GLX_NV_video_out 1 |
#define | GLX_NV_swap_group 1 |
-Typedefs | |
typedef void(* | __GLXextFuncPtr )(void) |
typedef XID | GLXVideoSourceSGIX |
typedef XID | GLXFBConfigIDSGIX |
typedef struct __GLXFBConfigRec * | GLXFBConfigSGIX |
typedef XID | GLXPbufferSGIX |
typedef GLXFBConfig *(* | PFNGLXGETFBCONFIGSPROC )(Display *dpy, int screen, int *nelements) |
typedef GLXFBConfig *(* | PFNGLXCHOOSEFBCONFIGPROC )(Display *dpy, int screen, const int *attrib_list, int *nelements) |
typedef int(* | PFNGLXGETFBCONFIGATTRIBPROC )(Display *dpy, GLXFBConfig config, int attribute, int *value) |
typedef XVisualInfo *(* | PFNGLXGETVISUALFROMFBCONFIGPROC )(Display *dpy, GLXFBConfig config) |
typedef GLXWindow(* | PFNGLXCREATEWINDOWPROC )(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list) |
typedef void(* | PFNGLXDESTROYWINDOWPROC )(Display *dpy, GLXWindow win) |
typedef GLXPixmap(* | PFNGLXCREATEPIXMAPPROC )(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list) |
typedef void(* | PFNGLXDESTROYPIXMAPPROC )(Display *dpy, GLXPixmap pixmap) |
typedef GLXPbuffer(* | PFNGLXCREATEPBUFFERPROC )(Display *dpy, GLXFBConfig config, const int *attrib_list) |
typedef void(* | PFNGLXDESTROYPBUFFERPROC )(Display *dpy, GLXPbuffer pbuf) |
typedef void(* | PFNGLXQUERYDRAWABLEPROC )(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) |
typedef GLXContext(* | PFNGLXCREATENEWCONTEXTPROC )(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct) |
typedef Bool(* | PFNGLXMAKECONTEXTCURRENTPROC )(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) |
typedef GLXDrawable(* | PFNGLXGETCURRENTREADDRAWABLEPROC )(void) |
typedef Display *(* | PFNGLXGETCURRENTDISPLAYPROC )(void) |
typedef int(* | PFNGLXQUERYCONTEXTPROC )(Display *dpy, GLXContext ctx, int attribute, int *value) |
typedef void(* | PFNGLXSELECTEVENTPROC )(Display *dpy, GLXDrawable draw, unsigned long event_mask) |
typedef void(* | PFNGLXGETSELECTEDEVENTPROC )(Display *dpy, GLXDrawable draw, unsigned long *event_mask) |
typedef __GLXextFuncPtr(* | PFNGLXGETPROCADDRESSPROC )(const GLubyte *procName) |
typedef __GLXextFuncPtr(* | PFNGLXGETPROCADDRESSARBPROC )(const GLubyte *procName) |
typedef GLXContext(* | PFNGLXCREATECONTEXTATTRIBSARBPROC )(Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list) |
typedef int(* | PFNGLXSWAPINTERVALSGIPROC )(int interval) |
typedef int(* | PFNGLXGETVIDEOSYNCSGIPROC )(unsigned int *count) |
typedef int(* | PFNGLXWAITVIDEOSYNCSGIPROC )(int divisor, int remainder, unsigned int *count) |
typedef Bool(* | PFNGLXMAKECURRENTREADSGIPROC )(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) |
typedef GLXDrawable(* | PFNGLXGETCURRENTREADDRAWABLESGIPROC )(void) |
typedef Display *(* | PFNGLXGETCURRENTDISPLAYEXTPROC )(void) |
typedef int(* | PFNGLXQUERYCONTEXTINFOEXTPROC )(Display *dpy, GLXContext context, int attribute, int *value) |
typedef GLXContextID(* | PFNGLXGETCONTEXTIDEXTPROC )(const GLXContext context) |
typedef GLXContext(* | PFNGLXIMPORTCONTEXTEXTPROC )(Display *dpy, GLXContextID contextID) |
typedef void(* | PFNGLXFREECONTEXTEXTPROC )(Display *dpy, GLXContext context) |
typedef int(* | PFNGLXGETFBCONFIGATTRIBSGIXPROC )(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) |
typedef GLXFBConfigSGIX *(* | PFNGLXCHOOSEFBCONFIGSGIXPROC )(Display *dpy, int screen, int *attrib_list, int *nelements) |
typedef GLXPixmap(* | PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC )(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) |
typedef GLXContext(* | PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC )(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) |
typedef XVisualInfo *(* | PFNGLXGETVISUALFROMFBCONFIGSGIXPROC )(Display *dpy, GLXFBConfigSGIX config) |
typedef GLXFBConfigSGIX(* | PFNGLXGETFBCONFIGFROMVISUALSGIXPROC )(Display *dpy, XVisualInfo *vis) |
typedef GLXPbufferSGIX(* | PFNGLXCREATEGLXPBUFFERSGIXPROC )(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list) |
typedef void(* | PFNGLXDESTROYGLXPBUFFERSGIXPROC )(Display *dpy, GLXPbufferSGIX pbuf) |
typedef int(* | PFNGLXQUERYGLXPBUFFERSGIXPROC )(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value) |
typedef void(* | PFNGLXSELECTEVENTSGIXPROC )(Display *dpy, GLXDrawable drawable, unsigned long mask) |
typedef void(* | PFNGLXGETSELECTEDEVENTSGIXPROC )(Display *dpy, GLXDrawable drawable, unsigned long *mask) |
typedef void(* | PFNGLXCUSHIONSGIPROC )(Display *dpy, Window window, float cushion) |
typedef int(* | PFNGLXBINDCHANNELTOWINDOWSGIXPROC )(Display *display, int screen, int channel, Window window) |
typedef int(* | PFNGLXCHANNELRECTSGIXPROC )(Display *display, int screen, int channel, int x, int y, int w, int h) |
typedef int(* | PFNGLXQUERYCHANNELRECTSGIXPROC )(Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh) |
typedef int(* | PFNGLXQUERYCHANNELDELTASSGIXPROC )(Display *display, int screen, int channel, int *x, int *y, int *w, int *h) |
typedef int(* | PFNGLXCHANNELRECTSYNCSGIXPROC )(Display *display, int screen, int channel, GLenum synctype) |
typedef void(* | PFNGLXJOINSWAPGROUPSGIXPROC )(Display *dpy, GLXDrawable drawable, GLXDrawable member) |
typedef void(* | PFNGLXBINDSWAPBARRIERSGIXPROC )(Display *dpy, GLXDrawable drawable, int barrier) |
typedef Bool(* | PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC )(Display *dpy, int screen, int *max) |
typedef Status(* | PFNGLXGETTRANSPARENTINDEXSUNPROC )(Display *dpy, Window overlay, Window underlay, long *pTransparentIndex) |
typedef void(* | PFNGLXCOPYSUBBUFFERMESAPROC )(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height) |
typedef GLXPixmap(* | PFNGLXCREATEGLXPIXMAPMESAPROC )(Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap) |
typedef Bool(* | PFNGLXRELEASEBUFFERSMESAPROC )(Display *dpy, GLXDrawable drawable) |
typedef Bool(* | PFNGLXSET3DFXMODEMESAPROC )(int mode) |
typedef Bool(* | PFNGLXGETSYNCVALUESOMLPROC )(Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc) |
typedef Bool(* | PFNGLXGETMSCRATEOMLPROC )(Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator) |
typedef int64_t(* | PFNGLXSWAPBUFFERSMSCOMLPROC )(Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder) |
typedef Bool(* | PFNGLXWAITFORMSCOMLPROC )(Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc) |
typedef Bool(* | PFNGLXWAITFORSBCOMLPROC )(Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc) |
typedef GLXHyperpipeNetworkSGIX *(* | PFNGLXQUERYHYPERPIPENETWORKSGIXPROC )(Display *dpy, int *npipes) |
typedef int(* | PFNGLXHYPERPIPECONFIGSGIXPROC )(Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId) |
typedef GLXHyperpipeConfigSGIX *(* | PFNGLXQUERYHYPERPIPECONFIGSGIXPROC )(Display *dpy, int hpId, int *npipes) |
typedef int(* | PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC )(Display *dpy, int hpId) |
typedef int(* | PFNGLXBINDHYPERPIPESGIXPROC )(Display *dpy, int hpId) |
typedef int(* | PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC )(Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList) |
typedef int(* | PFNGLXHYPERPIPEATTRIBSGIXPROC )(Display *dpy, int timeSlice, int attrib, int size, void *attribList) |
typedef int(* | PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC )(Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList) |
typedef unsigned int(* | PFNGLXGETAGPOFFSETMESAPROC )(const void *pointer) |
typedef void(* | PFNGLXBINDTEXIMAGEEXTPROC )(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list) |
typedef void(* | PFNGLXRELEASETEXIMAGEEXTPROC )(Display *dpy, GLXDrawable drawable, int buffer) |
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 | -
#define GLX_3DFX_WINDOW_MODE_MESA 0x1 | -
#define GLX_ACCUM_BUFFER_BIT 0x00000080 | -
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 | -
#define GLX_ARB_get_proc_address 1 | -
#define GLX_AUX_BUFFERS_BIT 0x00000010 | -
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 | -
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT | -
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 | -
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 | -
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 | -
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 | -
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 | -
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 | -
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 | -
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 | -
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 | -
#define GLX_BLENDED_RGBA_SGIS 0x8025 | -
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 | -
#define GLX_COLOR_INDEX_BIT 0x00000002 | -
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 | -
#define GLX_COLOR_INDEX_TYPE 0x8015 | -
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 | -
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 | -
#define GLX_CONTEXT_FLAGS_ARB 0x2094 | -
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 | -
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 | -
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 | -
#define GLX_DEPTH_BUFFER_BIT 0x00000020 | -
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 | -
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 | -
#define GLX_DIRECT_COLOR_EXT 0x8003 | -
#define GLX_DRAWABLE_TYPE_SGIX 0x8010 | -
#define GLX_EVENT_MASK_SGIX 0x801F | -
#define GLX_EXT_fbconfig_packed_float 1 | -
#define GLX_EXT_framebuffer_sRGB 1 | -
#define GLX_EXT_texture_from_pixmap 1 | -
#define GLX_FBCONFIG_ID_SGIX 0x8013 | -
#define GLX_FLOAT_COMPONENTS_NV 0x20B0 | -
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 | -
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT | -
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 | -
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 | -
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 | -
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 | -
#define GLX_FRONT_RIGHT_EXT 0x20DF | -
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 | -
#define GLX_HYPERPIPE_ID_SGIX 0x8030 | -
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 | -
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 | -
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 | -
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 | -
#define GLX_LARGEST_PBUFFER 0x801C | -
#define GLX_LARGEST_PBUFFER_SGIX 0x801C | -
#define GLX_MAX_PBUFFER_HEIGHT 0x8017 | -
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 | -
#define GLX_MAX_PBUFFER_PIXELS 0x8018 | -
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 | -
#define GLX_MAX_PBUFFER_WIDTH 0x8016 | -
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 | -
#define GLX_MESA_copy_sub_buffer 1 | -
#define GLX_MESA_pixmap_colormap 1 | -
#define GLX_MESA_release_buffers 1 | -
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 | -
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 | -
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 | -
#define GLX_NON_CONFORMANT_CONFIG 0x800D | -
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D | -
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 | -
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A | -
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 | -
#define GLX_PBUFFER_BIT_SGIX 0x00000004 | -
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 | -
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 | -
#define GLX_PIPE_RECT_SGIX 0x00000001 | -
#define GLX_PIXMAP_BIT_SGIX 0x00000002 | -
#define GLX_PRESERVED_CONTENTS 0x801B | -
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B | -
#define GLX_PSEUDO_COLOR_EXT 0x8004 | -
#define GLX_RENDER_TYPE_SGIX 0x8011 | -
#define GLX_RGBA_BIT_SGIX 0x00000001 | -
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 | -
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 | -
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 | -
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 | -
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 | -
#define GLX_SAMPLE_BUFFERS_ARB 100000 | -
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 | -
#define GLX_SAMPLE_BUFFERS_SGIS 100000 | -
#define GLX_SGI_make_current_read 1 | -
#define GLX_SGIX_visual_select_group 1 | -
#define GLX_SHARE_CONTEXT_EXT 0x800A | -
#define GLX_SLOW_VISUAL_EXT 0x8001 | -
#define GLX_STATIC_COLOR_EXT 0x8005 | -
#define GLX_STATIC_GRAY_EXT 0x8007 | -
#define GLX_STENCIL_BUFFER_BIT 0x00000040 | -
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 | -
#define GLX_SUN_get_transparent_index 1 | -
#define GLX_SWAP_EXCHANGE_OML 0x8061 | -
#define GLX_SWAP_METHOD_OML 0x8060 | -
#define GLX_SWAP_UNDEFINED_OML 0x8063 | -
#define GLX_SYNC_FRAME_SGIX 0x00000000 | -
#define GLX_SYNC_SWAP_SGIX 0x00000001 | -
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 | -
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 | -
#define GLX_TEXTURE_FORMAT_EXT 0x20D5 | -
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 | -
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 | -
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA | -
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 | -
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD | -
#define GLX_TEXTURE_TARGET_EXT 0x20D6 | -
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 | -
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 | -
#define GLX_TRANSPARENT_BLUE_VALUE 0x27 | -
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 | -
#define GLX_TRANSPARENT_GREEN_VALUE 0x26 | -
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 | -
#define GLX_TRANSPARENT_INDEX 0x8009 | -
#define GLX_TRANSPARENT_INDEX_EXT 0x8009 | -
#define GLX_TRANSPARENT_INDEX_VALUE 0x24 | -
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 | -
#define GLX_TRANSPARENT_RED_VALUE 0x25 | -
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 | -
#define GLX_TRANSPARENT_RGB_EXT 0x8008 | -
#define GLX_TRANSPARENT_TYPE_EXT 0x23 | -
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 | -
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 | -
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 | -
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 | -
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 | -
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 | -
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA | -
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 | -
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB | -
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC | -
#define GLX_VISUAL_CAVEAT_EXT 0x20 | -
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 | -
#define GLX_WINDOW_BIT_SGIX 0x00000001 | -
#define GLX_X_RENDERABLE_SGIX 0x8012 | -
#define GLX_X_VISUAL_TYPE_EXT 0x22 | -
typedef void(* __GLXextFuncPtr)(void) | -
typedef XID GLXFBConfigIDSGIX | -
typedef struct __GLXFBConfigRec* GLXFBConfigSGIX | -
typedef XID GLXPbufferSGIX | -
typedef XID GLXVideoSourceSGIX | -
typedef int( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC)(Display *display, int screen, int channel, Window window) | -
typedef int( * PFNGLXBINDHYPERPIPESGIXPROC)(Display *dpy, int hpId) | -
typedef void( * PFNGLXBINDSWAPBARRIERSGIXPROC)(Display *dpy, GLXDrawable drawable, int barrier) | -
typedef void( * PFNGLXBINDTEXIMAGEEXTPROC)(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list) | -
typedef int( * PFNGLXCHANNELRECTSGIXPROC)(Display *display, int screen, int channel, int x, int y, int w, int h) | -
typedef int( * PFNGLXCHANNELRECTSYNCSGIXPROC)(Display *display, int screen, int channel, GLenum synctype) | -
typedef GLXFBConfig*( * PFNGLXCHOOSEFBCONFIGPROC)(Display *dpy, int screen, const int *attrib_list, int *nelements) | -
typedef GLXFBConfigSGIX*( * PFNGLXCHOOSEFBCONFIGSGIXPROC)(Display *dpy, int screen, int *attrib_list, int *nelements) | -
typedef void( * PFNGLXCOPYSUBBUFFERMESAPROC)(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height) | -
typedef GLXContext( * PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list) | -
typedef GLXContext( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC)(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) | -
typedef GLXPbufferSGIX( * PFNGLXCREATEGLXPBUFFERSGIXPROC)(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list) | -
typedef GLXPixmap( * PFNGLXCREATEGLXPIXMAPMESAPROC)(Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap) | -
typedef GLXPixmap( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC)(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) | -
typedef GLXContext( * PFNGLXCREATENEWCONTEXTPROC)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct) | -
typedef GLXPbuffer( * PFNGLXCREATEPBUFFERPROC)(Display *dpy, GLXFBConfig config, const int *attrib_list) | -
typedef GLXPixmap( * PFNGLXCREATEPIXMAPPROC)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list) | -
typedef GLXWindow( * PFNGLXCREATEWINDOWPROC)(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list) | -
typedef void( * PFNGLXCUSHIONSGIPROC)(Display *dpy, Window window, float cushion) | -
typedef void( * PFNGLXDESTROYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf) | -
typedef int( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC)(Display *dpy, int hpId) | -
typedef void( * PFNGLXDESTROYPBUFFERPROC)(Display *dpy, GLXPbuffer pbuf) | -
typedef void( * PFNGLXDESTROYPIXMAPPROC)(Display *dpy, GLXPixmap pixmap) | -
typedef void( * PFNGLXDESTROYWINDOWPROC)(Display *dpy, GLXWindow win) | -
typedef void( * PFNGLXFREECONTEXTEXTPROC)(Display *dpy, GLXContext context) | -
typedef unsigned int( * PFNGLXGETAGPOFFSETMESAPROC)(const void *pointer) | -
typedef GLXContextID( * PFNGLXGETCONTEXTIDEXTPROC)(const GLXContext context) | -
typedef Display*( * PFNGLXGETCURRENTDISPLAYEXTPROC)(void) | -
typedef Display*( * PFNGLXGETCURRENTDISPLAYPROC)(void) | -
typedef GLXDrawable( * PFNGLXGETCURRENTREADDRAWABLEPROC)(void) | -
typedef GLXDrawable( * PFNGLXGETCURRENTREADDRAWABLESGIPROC)(void) | -
typedef int( * PFNGLXGETFBCONFIGATTRIBPROC)(Display *dpy, GLXFBConfig config, int attribute, int *value) | -
typedef int( * PFNGLXGETFBCONFIGATTRIBSGIXPROC)(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) | -
typedef GLXFBConfigSGIX( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC)(Display *dpy, XVisualInfo *vis) | -
typedef GLXFBConfig*( * PFNGLXGETFBCONFIGSPROC)(Display *dpy, int screen, int *nelements) | -
typedef Bool( * PFNGLXGETMSCRATEOMLPROC)(Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator) | -
typedef __GLXextFuncPtr( * PFNGLXGETPROCADDRESSARBPROC)(const GLubyte *procName) | -
typedef __GLXextFuncPtr( * PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName) | -
typedef void( * PFNGLXGETSELECTEDEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long *event_mask) | -
typedef void( * PFNGLXGETSELECTEDEVENTSGIXPROC)(Display *dpy, GLXDrawable drawable, unsigned long *mask) | -
typedef Bool( * PFNGLXGETSYNCVALUESOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc) | -
typedef Status( * PFNGLXGETTRANSPARENTINDEXSUNPROC)(Display *dpy, Window overlay, Window underlay, long *pTransparentIndex) | -
typedef int( * PFNGLXGETVIDEOSYNCSGIPROC)(unsigned int *count) | -
typedef XVisualInfo*( * PFNGLXGETVISUALFROMFBCONFIGPROC)(Display *dpy, GLXFBConfig config) | -
typedef XVisualInfo*( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC)(Display *dpy, GLXFBConfigSGIX config) | -
typedef int( * PFNGLXHYPERPIPEATTRIBSGIXPROC)(Display *dpy, int timeSlice, int attrib, int size, void *attribList) | -
typedef int( * PFNGLXHYPERPIPECONFIGSGIXPROC)(Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId) | -
typedef GLXContext( * PFNGLXIMPORTCONTEXTEXTPROC)(Display *dpy, GLXContextID contextID) | -
typedef void( * PFNGLXJOINSWAPGROUPSGIXPROC)(Display *dpy, GLXDrawable drawable, GLXDrawable member) | -
typedef Bool( * PFNGLXMAKECONTEXTCURRENTPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) | -
typedef Bool( * PFNGLXMAKECURRENTREADSGIPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) | -
typedef int( * PFNGLXQUERYCHANNELDELTASSGIXPROC)(Display *display, int screen, int channel, int *x, int *y, int *w, int *h) | -
typedef int( * PFNGLXQUERYCHANNELRECTSGIXPROC)(Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh) | -
typedef int( * PFNGLXQUERYCONTEXTINFOEXTPROC)(Display *dpy, GLXContext context, int attribute, int *value) | -
typedef int( * PFNGLXQUERYCONTEXTPROC)(Display *dpy, GLXContext ctx, int attribute, int *value) | -
typedef void( * PFNGLXQUERYDRAWABLEPROC)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) | -
typedef int( * PFNGLXQUERYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value) | -
typedef int( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC)(Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList) | -
typedef int( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC)(Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList) | -
typedef GLXHyperpipeConfigSGIX*( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC)(Display *dpy, int hpId, int *npipes) | -
typedef GLXHyperpipeNetworkSGIX*( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC)(Display *dpy, int *npipes) | -
typedef Bool( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC)(Display *dpy, int screen, int *max) | -
typedef Bool( * PFNGLXRELEASEBUFFERSMESAPROC)(Display *dpy, GLXDrawable drawable) | -
typedef void( * PFNGLXRELEASETEXIMAGEEXTPROC)(Display *dpy, GLXDrawable drawable, int buffer) | -
typedef void( * PFNGLXSELECTEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long event_mask) | -
typedef void( * PFNGLXSELECTEVENTSGIXPROC)(Display *dpy, GLXDrawable drawable, unsigned long mask) | -
typedef Bool( * PFNGLXSET3DFXMODEMESAPROC)(int mode) | -
typedef int64_t( * PFNGLXSWAPBUFFERSMSCOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder) | -
typedef int( * PFNGLXSWAPINTERVALSGIPROC)(int interval) | -
typedef Bool( * PFNGLXWAITFORMSCOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc) | -
typedef Bool( * PFNGLXWAITFORSBCOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc) | -
![]() |
-
- Unuk 1.0
- |
-
00001 #ifndef __glxext_h_ -00002 #define __glxext_h_ -00003 -00004 #ifdef __cplusplus -00005 extern "C" { -00006 #endif -00007 -00008 /* -00009 ** Copyright (c) 2007 The Khronos Group Inc. -00010 ** -00011 ** Permission is hereby granted, free of charge, to any person obtaining a -00012 ** copy of this software and/or associated documentation files (the -00013 ** "Materials"), to deal in the Materials without restriction, including -00014 ** without limitation the rights to use, copy, modify, merge, publish, -00015 ** distribute, sublicense, and/or sell copies of the Materials, and to -00016 ** permit persons to whom the Materials are furnished to do so, subject to -00017 ** the following conditions: -00018 ** -00019 ** The above copyright notice and this permission notice shall be included -00020 ** in all copies or substantial portions of the Materials. -00021 ** -00022 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -00023 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -00024 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -00025 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -00026 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -00027 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -00028 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -00029 */ -00030 -00031 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -00032 #define WIN32_LEAN_AND_MEAN 1 -00033 #include <windows.h> -00034 #endif -00035 -00036 #ifndef APIENTRY -00037 #define APIENTRY -00038 #endif -00039 #ifndef APIENTRYP -00040 #define APIENTRYP APIENTRY * -00041 #endif -00042 #ifndef GLAPI -00043 #define GLAPI extern -00044 #endif -00045 -00046 /*************************************************************/ -00047 -00048 /* Header file version number, required by OpenGL ABI for Linux */ -00049 /* glxext.h last updated 2008/10/22 */ -00050 /* Current version at http://www.opengl.org/registry/ */ -00051 #define GLX_GLXEXT_VERSION 21 -00052 -00053 #ifndef GLX_VERSION_1_3 -00054 #define GLX_WINDOW_BIT 0x00000001 -00055 #define GLX_PIXMAP_BIT 0x00000002 -00056 #define GLX_PBUFFER_BIT 0x00000004 -00057 #define GLX_RGBA_BIT 0x00000001 -00058 #define GLX_COLOR_INDEX_BIT 0x00000002 -00059 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000 -00060 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -00061 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -00062 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -00063 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -00064 #define GLX_AUX_BUFFERS_BIT 0x00000010 -00065 #define GLX_DEPTH_BUFFER_BIT 0x00000020 -00066 #define GLX_STENCIL_BUFFER_BIT 0x00000040 -00067 #define GLX_ACCUM_BUFFER_BIT 0x00000080 -00068 #define GLX_CONFIG_CAVEAT 0x20 -00069 #define GLX_X_VISUAL_TYPE 0x22 -00070 #define GLX_TRANSPARENT_TYPE 0x23 -00071 #define GLX_TRANSPARENT_INDEX_VALUE 0x24 -00072 #define GLX_TRANSPARENT_RED_VALUE 0x25 -00073 #define GLX_TRANSPARENT_GREEN_VALUE 0x26 -00074 #define GLX_TRANSPARENT_BLUE_VALUE 0x27 -00075 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -00076 #define GLX_DONT_CARE 0xFFFFFFFF -00077 #define GLX_NONE 0x8000 -00078 #define GLX_SLOW_CONFIG 0x8001 -00079 #define GLX_TRUE_COLOR 0x8002 -00080 #define GLX_DIRECT_COLOR 0x8003 -00081 #define GLX_PSEUDO_COLOR 0x8004 -00082 #define GLX_STATIC_COLOR 0x8005 -00083 #define GLX_GRAY_SCALE 0x8006 -00084 #define GLX_STATIC_GRAY 0x8007 -00085 #define GLX_TRANSPARENT_RGB 0x8008 -00086 #define GLX_TRANSPARENT_INDEX 0x8009 -00087 #define GLX_VISUAL_ID 0x800B -00088 #define GLX_SCREEN 0x800C -00089 #define GLX_NON_CONFORMANT_CONFIG 0x800D -00090 #define GLX_DRAWABLE_TYPE 0x8010 -00091 #define GLX_RENDER_TYPE 0x8011 -00092 #define GLX_X_RENDERABLE 0x8012 -00093 #define GLX_FBCONFIG_ID 0x8013 -00094 #define GLX_RGBA_TYPE 0x8014 -00095 #define GLX_COLOR_INDEX_TYPE 0x8015 -00096 #define GLX_MAX_PBUFFER_WIDTH 0x8016 -00097 #define GLX_MAX_PBUFFER_HEIGHT 0x8017 -00098 #define GLX_MAX_PBUFFER_PIXELS 0x8018 -00099 #define GLX_PRESERVED_CONTENTS 0x801B -00100 #define GLX_LARGEST_PBUFFER 0x801C -00101 #define GLX_WIDTH 0x801D -00102 #define GLX_HEIGHT 0x801E -00103 #define GLX_EVENT_MASK 0x801F -00104 #define GLX_DAMAGED 0x8020 -00105 #define GLX_SAVED 0x8021 -00106 #define GLX_WINDOW 0x8022 -00107 #define GLX_PBUFFER 0x8023 -00108 #define GLX_PBUFFER_HEIGHT 0x8040 -00109 #define GLX_PBUFFER_WIDTH 0x8041 -00110 #endif -00111 -00112 #ifndef GLX_VERSION_1_4 -00113 #define GLX_SAMPLE_BUFFERS 100000 -00114 #define GLX_SAMPLES 100001 -00115 #endif -00116 -00117 #ifndef GLX_ARB_get_proc_address -00118 #endif -00119 -00120 #ifndef GLX_ARB_multisample -00121 #define GLX_SAMPLE_BUFFERS_ARB 100000 -00122 #define GLX_SAMPLES_ARB 100001 -00123 #endif -00124 -00125 #ifndef GLX_ARB_fbconfig_float -00126 #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 -00127 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 -00128 #endif -00129 -00130 #ifndef GLX_ARB_create_context -00131 #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 -00132 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -00133 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 -00134 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 -00135 #define GLX_CONTEXT_FLAGS_ARB 0x2094 -00136 #endif -00137 -00138 #ifndef GLX_SGIS_multisample -00139 #define GLX_SAMPLE_BUFFERS_SGIS 100000 -00140 #define GLX_SAMPLES_SGIS 100001 -00141 #endif -00142 -00143 #ifndef GLX_EXT_visual_info -00144 #define GLX_X_VISUAL_TYPE_EXT 0x22 -00145 #define GLX_TRANSPARENT_TYPE_EXT 0x23 -00146 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -00147 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -00148 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -00149 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -00150 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 -00151 #define GLX_NONE_EXT 0x8000 -00152 #define GLX_TRUE_COLOR_EXT 0x8002 -00153 #define GLX_DIRECT_COLOR_EXT 0x8003 -00154 #define GLX_PSEUDO_COLOR_EXT 0x8004 -00155 #define GLX_STATIC_COLOR_EXT 0x8005 -00156 #define GLX_GRAY_SCALE_EXT 0x8006 -00157 #define GLX_STATIC_GRAY_EXT 0x8007 -00158 #define GLX_TRANSPARENT_RGB_EXT 0x8008 -00159 #define GLX_TRANSPARENT_INDEX_EXT 0x8009 -00160 #endif -00161 -00162 #ifndef GLX_SGI_swap_control -00163 #endif -00164 -00165 #ifndef GLX_SGI_video_sync -00166 #endif -00167 -00168 #ifndef GLX_SGI_make_current_read -00169 #endif -00170 -00171 #ifndef GLX_SGIX_video_source -00172 #endif -00173 -00174 #ifndef GLX_EXT_visual_rating -00175 #define GLX_VISUAL_CAVEAT_EXT 0x20 -00176 #define GLX_SLOW_VISUAL_EXT 0x8001 -00177 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D -00178 /* reuse GLX_NONE_EXT */ -00179 #endif -00180 -00181 #ifndef GLX_EXT_import_context -00182 #define GLX_SHARE_CONTEXT_EXT 0x800A -00183 #define GLX_VISUAL_ID_EXT 0x800B -00184 #define GLX_SCREEN_EXT 0x800C -00185 #endif -00186 -00187 #ifndef GLX_SGIX_fbconfig -00188 #define GLX_WINDOW_BIT_SGIX 0x00000001 -00189 #define GLX_PIXMAP_BIT_SGIX 0x00000002 -00190 #define GLX_RGBA_BIT_SGIX 0x00000001 -00191 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 -00192 #define GLX_DRAWABLE_TYPE_SGIX 0x8010 -00193 #define GLX_RENDER_TYPE_SGIX 0x8011 -00194 #define GLX_X_RENDERABLE_SGIX 0x8012 -00195 #define GLX_FBCONFIG_ID_SGIX 0x8013 -00196 #define GLX_RGBA_TYPE_SGIX 0x8014 -00197 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 -00198 /* reuse GLX_SCREEN_EXT */ -00199 #endif -00200 -00201 #ifndef GLX_SGIX_pbuffer -00202 #define GLX_PBUFFER_BIT_SGIX 0x00000004 -00203 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 -00204 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 -00205 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 -00206 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 -00207 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 -00208 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 -00209 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 -00210 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 -00211 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 -00212 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 -00213 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 -00214 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 -00215 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 -00216 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 -00217 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A -00218 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B -00219 #define GLX_LARGEST_PBUFFER_SGIX 0x801C -00220 #define GLX_WIDTH_SGIX 0x801D -00221 #define GLX_HEIGHT_SGIX 0x801E -00222 #define GLX_EVENT_MASK_SGIX 0x801F -00223 #define GLX_DAMAGED_SGIX 0x8020 -00224 #define GLX_SAVED_SGIX 0x8021 -00225 #define GLX_WINDOW_SGIX 0x8022 -00226 #define GLX_PBUFFER_SGIX 0x8023 -00227 #endif -00228 -00229 #ifndef GLX_SGI_cushion -00230 #endif -00231 -00232 #ifndef GLX_SGIX_video_resize -00233 #define GLX_SYNC_FRAME_SGIX 0x00000000 -00234 #define GLX_SYNC_SWAP_SGIX 0x00000001 -00235 #endif -00236 -00237 #ifndef GLX_SGIX_dmbuffer -00238 #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 -00239 #endif -00240 -00241 #ifndef GLX_SGIX_swap_group -00242 #endif -00243 -00244 #ifndef GLX_SGIX_swap_barrier -00245 #endif -00246 -00247 #ifndef GLX_SGIS_blended_overlay -00248 #define GLX_BLENDED_RGBA_SGIS 0x8025 -00249 #endif -00250 -00251 #ifndef GLX_SGIS_shared_multisample -00252 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 -00253 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 -00254 #endif -00255 -00256 #ifndef GLX_SUN_get_transparent_index -00257 #endif -00258 -00259 #ifndef GLX_3DFX_multisample -00260 #define GLX_SAMPLE_BUFFERS_3DFX 0x8050 -00261 #define GLX_SAMPLES_3DFX 0x8051 -00262 #endif -00263 -00264 #ifndef GLX_MESA_copy_sub_buffer -00265 #endif -00266 -00267 #ifndef GLX_MESA_pixmap_colormap -00268 #endif -00269 -00270 #ifndef GLX_MESA_release_buffers -00271 #endif -00272 -00273 #ifndef GLX_MESA_set_3dfx_mode -00274 #define GLX_3DFX_WINDOW_MODE_MESA 0x1 -00275 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 -00276 #endif -00277 -00278 #ifndef GLX_SGIX_visual_select_group -00279 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 -00280 #endif -00281 -00282 #ifndef GLX_OML_swap_method -00283 #define GLX_SWAP_METHOD_OML 0x8060 -00284 #define GLX_SWAP_EXCHANGE_OML 0x8061 -00285 #define GLX_SWAP_COPY_OML 0x8062 -00286 #define GLX_SWAP_UNDEFINED_OML 0x8063 -00287 #endif -00288 -00289 #ifndef GLX_OML_sync_control -00290 #endif -00291 -00292 #ifndef GLX_NV_float_buffer -00293 #define GLX_FLOAT_COMPONENTS_NV 0x20B0 -00294 #endif -00295 -00296 #ifndef GLX_SGIX_hyperpipe -00297 #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 -00298 #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 -00299 #define GLX_BAD_HYPERPIPE_SGIX 92 -00300 #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 -00301 #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 -00302 #define GLX_PIPE_RECT_SGIX 0x00000001 -00303 #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 -00304 #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 -00305 #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 -00306 #define GLX_HYPERPIPE_ID_SGIX 0x8030 -00307 #endif -00308 -00309 #ifndef GLX_MESA_agp_offset -00310 #endif -00311 -00312 #ifndef GLX_EXT_fbconfig_packed_float -00313 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 -00314 #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 -00315 #endif -00316 -00317 #ifndef GLX_EXT_framebuffer_sRGB -00318 #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 -00319 #endif -00320 -00321 #ifndef GLX_EXT_texture_from_pixmap -00322 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001 -00323 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002 -00324 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 -00325 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 -00326 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 -00327 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 -00328 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 -00329 #define GLX_Y_INVERTED_EXT 0x20D4 -00330 #define GLX_TEXTURE_FORMAT_EXT 0x20D5 -00331 #define GLX_TEXTURE_TARGET_EXT 0x20D6 -00332 #define GLX_MIPMAP_TEXTURE_EXT 0x20D7 -00333 #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 -00334 #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 -00335 #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA -00336 #define GLX_TEXTURE_1D_EXT 0x20DB -00337 #define GLX_TEXTURE_2D_EXT 0x20DC -00338 #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD -00339 #define GLX_FRONT_LEFT_EXT 0x20DE -00340 #define GLX_FRONT_RIGHT_EXT 0x20DF -00341 #define GLX_BACK_LEFT_EXT 0x20E0 -00342 #define GLX_BACK_RIGHT_EXT 0x20E1 -00343 #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT -00344 #define GLX_BACK_EXT GLX_BACK_LEFT_EXT -00345 #define GLX_AUX0_EXT 0x20E2 -00346 #define GLX_AUX1_EXT 0x20E3 -00347 #define GLX_AUX2_EXT 0x20E4 -00348 #define GLX_AUX3_EXT 0x20E5 -00349 #define GLX_AUX4_EXT 0x20E6 -00350 #define GLX_AUX5_EXT 0x20E7 -00351 #define GLX_AUX6_EXT 0x20E8 -00352 #define GLX_AUX7_EXT 0x20E9 -00353 #define GLX_AUX8_EXT 0x20EA -00354 #define GLX_AUX9_EXT 0x20EB -00355 #endif -00356 -00357 #ifndef GLX_NV_present_video -00358 #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 -00359 #endif -00360 -00361 #ifndef GLX_NV_video_out -00362 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3 -00363 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 -00364 #define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 -00365 #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -00366 #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -00367 #define GLX_VIDEO_OUT_FRAME_NV 0x20C8 -00368 #define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 -00369 #define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA -00370 #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB -00371 #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC -00372 #endif -00373 -00374 #ifndef GLX_NV_swap_group -00375 #endif -00376 -00377 -00378 /*************************************************************/ -00379 -00380 #ifndef GLX_ARB_get_proc_address -00381 typedef void (*__GLXextFuncPtr)(void); -00382 #endif -00383 -00384 #ifndef GLX_SGIX_video_source -00385 typedef XID GLXVideoSourceSGIX; -00386 #endif -00387 -00388 #ifndef GLX_SGIX_fbconfig -00389 typedef XID GLXFBConfigIDSGIX; -00390 typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; -00391 #endif -00392 -00393 #ifndef GLX_SGIX_pbuffer -00394 typedef XID GLXPbufferSGIX; -00395 typedef struct { -00396 int type; -00397 unsigned long serial; /* # of last request processed by server */ -00398 Bool send_event; /* true if this came for SendEvent request */ -00399 Display *display; /* display the event was read from */ -00400 GLXDrawable drawable; /* i.d. of Drawable */ -00401 int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ -00402 int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ -00403 unsigned int mask; /* mask indicating which buffers are affected*/ -00404 int x, y; -00405 int width, height; -00406 int count; /* if nonzero, at least this many more */ -00407 } GLXBufferClobberEventSGIX; -00408 #endif -00409 -00410 #ifndef GLEXT_64_TYPES_DEFINED -00411 /* This code block is duplicated in glext.h, so must be protected */ -00412 #define GLEXT_64_TYPES_DEFINED -00413 /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -00414 /* (as used in the GLX_OML_sync_control extension). */ -00415 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -00416 #include <inttypes.h> -00417 #elif defined(__sun__) || defined(__digital__) -00418 #include <inttypes.h> -00419 #if defined(__STDC__) -00420 #if defined(__arch64__) || defined(_LP64) -00421 typedef long int int64_t; -00422 typedef unsigned long int uint64_t; -00423 #else -00424 typedef long long int int64_t; -00425 typedef unsigned long long int uint64_t; -00426 #endif /* __arch64__ */ -00427 #endif /* __STDC__ */ -00428 #elif defined( __VMS ) || defined(__sgi) -00429 #include <inttypes.h> -00430 #elif defined(__SCO__) || defined(__USLC__) -00431 #include <stdint.h> -00432 #elif defined(__UNIXOS2__) || defined(__SOL64__) -00433 typedef long int int32_t; -00434 typedef long long int int64_t; -00435 typedef unsigned long long int uint64_t; -00436 #elif defined(_WIN32) && defined(__GNUC__) -00437 #include <stdint.h> -00438 #elif defined(_WIN32) -00439 typedef __int32 int32_t; -00440 typedef __int64 int64_t; -00441 typedef unsigned __int64 uint64_t; -00442 #else -00443 #include <inttypes.h> /* Fallback option */ -00444 #endif -00445 #endif -00446 -00447 #ifndef GLX_VERSION_1_3 -00448 #define GLX_VERSION_1_3 1 -00449 #ifdef GLX_GLXEXT_PROTOTYPES -00450 extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *); -00451 extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *); -00452 extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *); -00453 extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig); -00454 extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *); -00455 extern void glXDestroyWindow (Display *, GLXWindow); -00456 extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *); -00457 extern void glXDestroyPixmap (Display *, GLXPixmap); -00458 extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *); -00459 extern void glXDestroyPbuffer (Display *, GLXPbuffer); -00460 extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *); -00461 extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool); -00462 extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext); -00463 extern GLXDrawable glXGetCurrentReadDrawable (void); -00464 extern Display * glXGetCurrentDisplay (void); -00465 extern int glXQueryContext (Display *, GLXContext, int, int *); -00466 extern void glXSelectEvent (Display *, GLXDrawable, unsigned long); -00467 extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *); -00468 #endif /* GLX_GLXEXT_PROTOTYPES */ -00469 typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); -00470 typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); -00471 typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); -00472 typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); -00473 typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -00474 typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); -00475 typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -00476 typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); -00477 typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); -00478 typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); -00479 typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -00480 typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -00481 typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -00482 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); -00483 typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); -00484 typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); -00485 typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); -00486 typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -00487 #endif -00488 -00489 #ifndef GLX_VERSION_1_4 -00490 #define GLX_VERSION_1_4 1 -00491 #ifdef GLX_GLXEXT_PROTOTYPES -00492 extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); -00493 #endif /* GLX_GLXEXT_PROTOTYPES */ -00494 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); -00495 #endif -00496 -00497 #ifndef GLX_ARB_get_proc_address -00498 #define GLX_ARB_get_proc_address 1 -00499 #ifdef GLX_GLXEXT_PROTOTYPES -00500 extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); -00501 #endif /* GLX_GLXEXT_PROTOTYPES */ -00502 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); -00503 #endif -00504 -00505 #ifndef GLX_ARB_multisample -00506 #define GLX_ARB_multisample 1 -00507 #endif -00508 -00509 #ifndef GLX_ARB_fbconfig_float -00510 #define GLX_ARB_fbconfig_float 1 -00511 #endif -00512 -00513 #ifndef GLX_ARB_create_context -00514 #define GLX_ARB_create_context 1 -00515 #ifdef GLX_GLXEXT_PROTOTYPES -00516 extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *); -00517 #endif /* GLX_GLXEXT_PROTOTYPES */ -00518 typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); -00519 #endif -00520 -00521 #ifndef GLX_SGIS_multisample -00522 #define GLX_SGIS_multisample 1 -00523 #endif -00524 -00525 #ifndef GLX_EXT_visual_info -00526 #define GLX_EXT_visual_info 1 -00527 #endif -00528 -00529 #ifndef GLX_SGI_swap_control -00530 #define GLX_SGI_swap_control 1 -00531 #ifdef GLX_GLXEXT_PROTOTYPES -00532 extern int glXSwapIntervalSGI (int); -00533 #endif /* GLX_GLXEXT_PROTOTYPES */ -00534 typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); -00535 #endif -00536 -00537 #ifndef GLX_SGI_video_sync -00538 #define GLX_SGI_video_sync 1 -00539 #ifdef GLX_GLXEXT_PROTOTYPES -00540 extern int glXGetVideoSyncSGI (unsigned int *); -00541 extern int glXWaitVideoSyncSGI (int, int, unsigned int *); -00542 #endif /* GLX_GLXEXT_PROTOTYPES */ -00543 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); -00544 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); -00545 #endif -00546 -00547 #ifndef GLX_SGI_make_current_read -00548 #define GLX_SGI_make_current_read 1 -00549 #ifdef GLX_GLXEXT_PROTOTYPES -00550 extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext); -00551 extern GLXDrawable glXGetCurrentReadDrawableSGI (void); -00552 #endif /* GLX_GLXEXT_PROTOTYPES */ -00553 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -00554 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); -00555 #endif -00556 -00557 #ifndef GLX_SGIX_video_source -00558 #define GLX_SGIX_video_source 1 -00559 #ifdef _VL_H -00560 #ifdef GLX_GLXEXT_PROTOTYPES -00561 extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode); -00562 extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX); -00563 #endif /* GLX_GLXEXT_PROTOTYPES */ -00564 typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -00565 typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); -00566 #endif /* _VL_H */ -00567 #endif -00568 -00569 #ifndef GLX_EXT_visual_rating -00570 #define GLX_EXT_visual_rating 1 -00571 #endif -00572 -00573 #ifndef GLX_EXT_import_context -00574 #define GLX_EXT_import_context 1 -00575 #ifdef GLX_GLXEXT_PROTOTYPES -00576 extern Display * glXGetCurrentDisplayEXT (void); -00577 extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *); -00578 extern GLXContextID glXGetContextIDEXT (const GLXContext); -00579 extern GLXContext glXImportContextEXT (Display *, GLXContextID); -00580 extern void glXFreeContextEXT (Display *, GLXContext); -00581 #endif /* GLX_GLXEXT_PROTOTYPES */ -00582 typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); -00583 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); -00584 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); -00585 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); -00586 typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); -00587 #endif -00588 -00589 #ifndef GLX_SGIX_fbconfig -00590 #define GLX_SGIX_fbconfig 1 -00591 #ifdef GLX_GLXEXT_PROTOTYPES -00592 extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *); -00593 extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *); -00594 extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap); -00595 extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool); -00596 extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX); -00597 extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *); -00598 #endif /* GLX_GLXEXT_PROTOTYPES */ -00599 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -00600 typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); -00601 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -00602 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -00603 typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); -00604 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); -00605 #endif -00606 -00607 #ifndef GLX_SGIX_pbuffer -00608 #define GLX_SGIX_pbuffer 1 -00609 #ifdef GLX_GLXEXT_PROTOTYPES -00610 extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *); -00611 extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX); -00612 extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *); -00613 extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long); -00614 extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *); -00615 #endif /* GLX_GLXEXT_PROTOTYPES */ -00616 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -00617 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); -00618 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -00619 typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); -00620 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); -00621 #endif -00622 -00623 #ifndef GLX_SGI_cushion -00624 #define GLX_SGI_cushion 1 -00625 #ifdef GLX_GLXEXT_PROTOTYPES -00626 extern void glXCushionSGI (Display *, Window, float); -00627 #endif /* GLX_GLXEXT_PROTOTYPES */ -00628 typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); -00629 #endif -00630 -00631 #ifndef GLX_SGIX_video_resize -00632 #define GLX_SGIX_video_resize 1 -00633 #ifdef GLX_GLXEXT_PROTOTYPES -00634 extern int glXBindChannelToWindowSGIX (Display *, int, int, Window); -00635 extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int); -00636 extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *); -00637 extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *); -00638 extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum); -00639 #endif /* GLX_GLXEXT_PROTOTYPES */ -00640 typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); -00641 typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); -00642 typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -00643 typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -00644 typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); -00645 #endif -00646 -00647 #ifndef GLX_SGIX_dmbuffer -00648 #define GLX_SGIX_dmbuffer 1 -00649 #ifdef _DM_BUFFER_H_ -00650 #ifdef GLX_GLXEXT_PROTOTYPES -00651 extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer); -00652 #endif /* GLX_GLXEXT_PROTOTYPES */ -00653 typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -00654 #endif /* _DM_BUFFER_H_ */ -00655 #endif -00656 -00657 #ifndef GLX_SGIX_swap_group -00658 #define GLX_SGIX_swap_group 1 -00659 #ifdef GLX_GLXEXT_PROTOTYPES -00660 extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable); -00661 #endif /* GLX_GLXEXT_PROTOTYPES */ -00662 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); -00663 #endif -00664 -00665 #ifndef GLX_SGIX_swap_barrier -00666 #define GLX_SGIX_swap_barrier 1 -00667 #ifdef GLX_GLXEXT_PROTOTYPES -00668 extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int); -00669 extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *); -00670 #endif /* GLX_GLXEXT_PROTOTYPES */ -00671 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); -00672 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); -00673 #endif -00674 -00675 #ifndef GLX_SUN_get_transparent_index -00676 #define GLX_SUN_get_transparent_index 1 -00677 #ifdef GLX_GLXEXT_PROTOTYPES -00678 extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *); -00679 #endif /* GLX_GLXEXT_PROTOTYPES */ -00680 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); -00681 #endif -00682 -00683 #ifndef GLX_MESA_copy_sub_buffer -00684 #define GLX_MESA_copy_sub_buffer 1 -00685 #ifdef GLX_GLXEXT_PROTOTYPES -00686 extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int); -00687 #endif /* GLX_GLXEXT_PROTOTYPES */ -00688 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); -00689 #endif -00690 -00691 #ifndef GLX_MESA_pixmap_colormap -00692 #define GLX_MESA_pixmap_colormap 1 -00693 #ifdef GLX_GLXEXT_PROTOTYPES -00694 extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap); -00695 #endif /* GLX_GLXEXT_PROTOTYPES */ -00696 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); -00697 #endif -00698 -00699 #ifndef GLX_MESA_release_buffers -00700 #define GLX_MESA_release_buffers 1 -00701 #ifdef GLX_GLXEXT_PROTOTYPES -00702 extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable); -00703 #endif /* GLX_GLXEXT_PROTOTYPES */ -00704 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); -00705 #endif -00706 -00707 #ifndef GLX_MESA_set_3dfx_mode -00708 #define GLX_MESA_set_3dfx_mode 1 -00709 #ifdef GLX_GLXEXT_PROTOTYPES -00710 extern Bool glXSet3DfxModeMESA (int); -00711 #endif /* GLX_GLXEXT_PROTOTYPES */ -00712 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); -00713 #endif -00714 -00715 #ifndef GLX_SGIX_visual_select_group -00716 #define GLX_SGIX_visual_select_group 1 -00717 #endif -00718 -00719 #ifndef GLX_OML_swap_method -00720 #define GLX_OML_swap_method 1 -00721 #endif -00722 -00723 #ifndef GLX_OML_sync_control -00724 #define GLX_OML_sync_control 1 -00725 #ifdef GLX_GLXEXT_PROTOTYPES -00726 extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *); -00727 extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *); -00728 extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t); -00729 extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *); -00730 extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *); -00731 #endif /* GLX_GLXEXT_PROTOTYPES */ -00732 typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -00733 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -00734 typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -00735 typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -00736 typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); -00737 #endif -00738 -00739 #ifndef GLX_NV_float_buffer -00740 #define GLX_NV_float_buffer 1 -00741 #endif -00742 -00743 #ifndef GLX_SGIX_hyperpipe -00744 #define GLX_SGIX_hyperpipe 1 -00745 -00746 typedef struct { -00747 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; -00748 int networkId; -00749 } GLXHyperpipeNetworkSGIX; -00750 -00751 typedef struct { -00752 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; -00753 int channel; -00754 unsigned int -00755 participationType; -00756 int timeSlice; -00757 } GLXHyperpipeConfigSGIX; -00758 -00759 typedef struct { -00760 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; -00761 int srcXOrigin, srcYOrigin, srcWidth, srcHeight; -00762 int destXOrigin, destYOrigin, destWidth, destHeight; -00763 } GLXPipeRect; -00764 -00765 typedef struct { -00766 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; -00767 int XOrigin, YOrigin, maxHeight, maxWidth; -00768 } GLXPipeRectLimits; -00769 -00770 #ifdef GLX_GLXEXT_PROTOTYPES -00771 extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *); -00772 extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *); -00773 extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *); -00774 extern int glXDestroyHyperpipeConfigSGIX (Display *, int); -00775 extern int glXBindHyperpipeSGIX (Display *, int); -00776 extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *); -00777 extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *); -00778 extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *); -00779 #endif /* GLX_GLXEXT_PROTOTYPES */ -00780 typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); -00781 typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -00782 typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); -00783 typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); -00784 typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); -00785 typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -00786 typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -00787 typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); -00788 #endif -00789 -00790 #ifndef GLX_MESA_agp_offset -00791 #define GLX_MESA_agp_offset 1 -00792 #ifdef GLX_GLXEXT_PROTOTYPES -00793 extern unsigned int glXGetAGPOffsetMESA (const void *); -00794 #endif /* GLX_GLXEXT_PROTOTYPES */ -00795 typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); -00796 #endif -00797 -00798 #ifndef GLX_EXT_fbconfig_packed_float -00799 #define GLX_EXT_fbconfig_packed_float 1 -00800 #endif -00801 -00802 #ifndef GLX_EXT_framebuffer_sRGB -00803 #define GLX_EXT_framebuffer_sRGB 1 -00804 #endif -00805 -00806 #ifndef GLX_EXT_texture_from_pixmap -00807 #define GLX_EXT_texture_from_pixmap 1 -00808 #ifdef GLX_GLXEXT_PROTOTYPES -00809 extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *); -00810 extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int); -00811 #endif /* GLX_GLXEXT_PROTOTYPES */ -00812 typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -00813 typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); -00814 #endif -00815 -00816 #ifndef GLX_NV_present_video -00817 #define GLX_NV_present_video 1 -00818 #endif -00819 -00820 #ifndef GLX_NV_video_out -00821 #define GLX_NV_video_out 1 -00822 #endif -00823 -00824 #ifndef GLX_NV_swap_group -00825 #define GLX_NV_swap_group 1 -00826 #endif -00827 -00828 -00829 #ifdef __cplusplus -00830 } -00831 #endif -00832 -00833 #endif -
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
![]() |
-
- Unuk 1.0
- |
-
#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "SDL/SDL.h"
#include "Game.h"
#include "../libUnuk/Input.h"
#include "../libUnuk/Debug.h"
Go to the source code of this file.
--Functions | |
void | Quit (int returnCode) |
int | ResizeWindow (int width, int height) |
void | ProcessEvents (SDL_keysym *keysym) |
int | InitGL (void) |
unsigned int | GetTickCount () |
float | GetElapsedSeconds (void) |
int | main () |
-Variables | |
const int | SCREEN_WIDTH = 640 |
const int | SCREEN_HEIGHT = 480 |
const int | SCREEN_BPP = 16 |
SDL_Surface * | surface |
float GetElapsedSeconds | -( | -void | -) | -- |
unsigned int GetTickCount | -( | -) | -- |
void ProcessEvents | -( | -SDL_keysym * | -keysym | ) | -- |
void Quit | -( | -int | -returnCode | ) | -- |
int ResizeWindow | -( | -int | -width, | -
- | - | int | -height | -
- | ) | -- |
const int SCREEN_BPP = 16 | -
const int SCREEN_HEIGHT = 480 | -
const int SCREEN_WIDTH = 640 | -