mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-09-22 11:26:55 -04:00
managed to get the projects compiling, jpg has been disabled for now and I wasn't able to test the runtime until I can get my hands on the files required by libgldemo
This commit is contained in:
parent
a380de3a44
commit
b99359078e
601 changed files with 334759 additions and 69 deletions
|
@ -23,29 +23,41 @@ else()
|
|||
add_definitions(-Dstricmp=strcasecmp)
|
||||
endif()
|
||||
|
||||
include_directories(${LIBGLDEMO_INCLUDE} ${FILEHANDLER_INCLUDE})
|
||||
include_directories(${FILEHANDLER_INCLUDE})
|
||||
|
||||
#### Static library (uncomment to build)
|
||||
#add_library(libvitaboy_static STATIC ${LIBVITABOY_SOURCES})
|
||||
#set_target_properties(libvitaboy_static PROPERTIES
|
||||
# OUTPUT_NAME "vitaboy"
|
||||
# CLEAN_DIRECT_OUTPUT 1)
|
||||
set(VITABOY_LIB)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_library(libvitaboy_shared SHARED ${LIBVITABOY_SOURCES})
|
||||
if(WIN32)
|
||||
set_target_properties(libvitaboy_shared PROPERTIES OUTPUT_NAME "vitaboy${LIBVITABOY_SERIES}")
|
||||
else()
|
||||
set_target_properties(libvitaboy_shared PROPERTIES OUTPUT_NAME "vitaboy")
|
||||
endif()
|
||||
|
||||
add_library(libvitaboy_shared SHARED ${LIBVITABOY_SOURCES})
|
||||
if(WIN32)
|
||||
set_target_properties(libvitaboy_shared PROPERTIES OUTPUT_NAME "vitaboy${LIBVITABOY_SERIES}")
|
||||
set_target_properties(libvitaboy_shared PROPERTIES
|
||||
COMPILE_FLAGS "-fvisibility=default"
|
||||
VERSION ${LIBVITABOY_SERIES}.${LIBVITABOY_MAJOR}.${LIBVITABOY_MINOR}
|
||||
PREFIX "lib"
|
||||
IMPORT_PREFIX "lib")
|
||||
|
||||
set(VITABOY_LIB libvitaboy_shared)
|
||||
else()
|
||||
set_target_properties(libvitaboy_shared PROPERTIES OUTPUT_NAME "vitaboy")
|
||||
endif()
|
||||
set_target_properties(libvitaboy_shared PROPERTIES
|
||||
COMPILE_FLAGS "-fvisibility=default"
|
||||
VERSION ${LIBVITABOY_SERIES}.${LIBVITABOY_MAJOR}.${LIBVITABOY_MINOR}
|
||||
PREFIX "lib"
|
||||
IMPORT_PREFIX "lib"
|
||||
#### Static library (uncomment to build)
|
||||
add_library(libvitaboy_static STATIC ${LIBVITABOY_SOURCES})
|
||||
set_target_properties(libvitaboy_static PROPERTIES
|
||||
OUTPUT_NAME "vitaboy"
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
set(VITABOY_LIB libvitaboy_static)
|
||||
endif() # BUILD_SHARED_LIBS
|
||||
|
||||
add_executable(vbparse vbparse.cpp)
|
||||
target_link_libraries(vbparse libvitaboy_shared FileHandler_shared)
|
||||
target_link_libraries(vbparse ${VITABOY_LIB} FileHandler_static)
|
||||
|
||||
add_executable(Renderer ${GLDEMO_EXE} Renderer.cpp)
|
||||
target_link_libraries(Renderer libvitaboy_shared ${GLDEMO_LINK} FileHandler_shared m)
|
||||
if(WIN32)
|
||||
target_link_libraries(Renderer ${VITABOY_LIB} FileHandler_static libgldemo_static opengl32 glu32)
|
||||
else()
|
||||
#untested
|
||||
target_link_libraries(Renderer ${VITABOY_LIB} FileHandler_static libgldemo_static Xxf86vm rt Xext X11 GL GLU)
|
||||
endif()
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <FileHandler.hpp>
|
||||
#include <libgldemo.h>
|
||||
#include <FileHandler.h>
|
||||
#include "../libgldemo/libgldemo.h"
|
||||
#include "libvitaboy.hpp"
|
||||
|
||||
static float zoom = -10;
|
||||
|
@ -122,7 +122,7 @@ static int LoadTextures()
|
|||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texture[i]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, Image->Width, Image->Height, 0, GL_BGR, GL_UNSIGNED_BYTE, Image->Data);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, Image->Width, Image->Height, 0, GL_BGR_EXT, GL_UNSIGNED_BYTE, Image->Data);
|
||||
free(Image->Data);
|
||||
free(Image);
|
||||
|
||||
|
@ -144,7 +144,7 @@ static int InitGL()
|
|||
glClearDepth(1.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_CULL_FACE);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glEnable(GL_NORMALIZE);
|
||||
glDisable(GL_BLEND);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <FileHandler.hpp>
|
||||
#include <string.h>
|
||||
#include <FileHandler.h>
|
||||
#include "libvitaboy.hpp"
|
||||
|
||||
enum VBFileType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue