Skip to content
Snippets Groups Projects
Commit 1c2bc202 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix linux build

parent c119064c
No related branches found
No related tags found
1 merge request!85Draft: Remove Epoxy and change to platform native GL init methods
......@@ -18,6 +18,7 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(CheckCXXCompilerFlag)
include(Variables)
include(SDL2)
# Portable compilation flags.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}")
......@@ -359,5 +360,9 @@ else()
add_definitions(-DAL_ENABLE_ALL_TIMERS=0)
endif()
if(SDL_FOUND)
add_definitions(-DLL_SDL=1)
endif()
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
......@@ -24,9 +24,7 @@ if (LINUX)
if(USE_X11)
list(APPEND PKGCONFIG_PACKAGES
pangoxft
x11
xinerama
)
endif()
......@@ -42,13 +40,11 @@ if (LINUX)
gdk-3.0
gtk+-3.0
x11
xinerama
)
if(USE_X11)
list(APPEND PKGCONFIG_PACKAGES
x11
xinerama
)
endif()
......
......@@ -110,10 +110,6 @@ add_library (llrender ${llrender_SOURCE_FILES})
set_target_properties(llrender PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if (SDL_FOUND)
target_compile_definitions(llrender PUBLIC LL_SDL=1)
endif (SDL_FOUND)
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
target_link_libraries(llrender
......
......@@ -1732,7 +1732,7 @@ void LLGLState::resetTextureStates()
for (S32 j = maxTextureUnits-1; j >=0; j--)
{
gGL.getTexUnit(j)->activate();
glClientActiveTextureARB(GL_TEXTURE0_ARB+j);
glClientActiveTexture(GL_TEXTURE0_ARB+j);
j == 0 ? gGL.getTexUnit(j)->enable(LLTexUnit::TT_TEXTURE) : gGL.getTexUnit(j)->disable();
}
}
......@@ -1880,7 +1880,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
if (i < gGLManager.mNumTextureUnits)
{
glClientActiveTextureARB(GL_TEXTURE0_ARB+i);
glClientActiveTexture(GL_TEXTURE0_ARB+i);
stop_glerror();
glGetIntegerv(GL_TEXTURE_STACK_DEPTH, &stackDepth);
stop_glerror();
......@@ -1965,7 +1965,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
stop_glerror();
gGL.getTexUnit(0)->activate();
glClientActiveTextureARB(GL_TEXTURE0_ARB);
glClientActiveTexture(GL_TEXTURE0_ARB);
stop_glerror();
if (error)
......
......@@ -747,7 +747,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
if (is_compressed)
{
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
glCompressedTexImage2DARB(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
glCompressedTexImage2D(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
stop_glerror();
}
else
......@@ -942,7 +942,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
if (is_compressed)
{
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
glCompressedTexImage2DARB(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
glCompressedTexImage2D(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
stop_glerror();
}
else
......@@ -1876,7 +1876,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
return FALSE ;
}
glGetCompressedTexImageARB(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));
glGetCompressedTexImage(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));
//stop_glerror();
}
else
......
......@@ -127,7 +127,7 @@ void LLTexUnit::refreshState(void)
gGL.flush();
glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
glActiveTexture(GL_TEXTURE0_ARB + mIndex);
if (mCurrTexType != TT_NONE)
{
......@@ -148,7 +148,7 @@ void LLTexUnit::activate(void)
if ((S32)gGL.mCurrTextureUnitIndex != mIndex || gGL.mDirty)
{
gGL.flush();
glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
glActiveTexture(GL_TEXTURE0_ARB + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
}
}
......@@ -192,7 +192,7 @@ void LLTexUnit::bindFast(LLTexture* texture)
{
LLImageGL* gl_tex = texture->getGLTexture();
glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
glActiveTexture(GL_TEXTURE0_ARB + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
mCurrTexture = gl_tex->getTexName();
if (!mCurrTexture)
......
......@@ -188,12 +188,6 @@ add_library (llwindow
${viewer_SOURCE_FILES}
)
if (SDL_FOUND)
set_property(TARGET llwindow
PROPERTY COMPILE_DEFINITIONS LL_SDL=1
)
endif (SDL_FOUND)
target_link_libraries (llwindow llcommon ${llwindow_LINK_LIBRARIES} readerwriterqueue)
if (DARWIN)
......
......@@ -1860,10 +1860,6 @@ add_executable(${VIEWER_BINARY_NAME}
${viewer_SOURCE_FILES}
)
if (SDL_FOUND)
target_compile_definitions(${VIEWER_BINARY_NAME} PRIVATE LL_SDL=1)
endif (SDL_FOUND)
if (USE_SENTRY)
target_compile_definitions(${VIEWER_BINARY_NAME} PRIVATE ${SENTRY_DEFINE})
......
......@@ -38,13 +38,13 @@
#include "llsettingssky.h"
#include "lllegacyatmospherics.h"
const F32 SKY_BOX_MULT = 16.0f;
const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 20.f;
const F32 HEAVENLY_BODY_FACTOR = 0.1f;
const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR;
constexpr F32 SKY_BOX_MULT = 16.0f;
constexpr F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 20.f;
constexpr F32 HEAVENLY_BODY_FACTOR = 0.1f;
constexpr F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR;
const F32 SKYTEX_COMPONENTS = 4;
const F32 SKYTEX_RESOLUTION = 64;
constexpr S32 SKYTEX_COMPONENTS = 4;
constexpr S32 SKYTEX_RESOLUTION = 64;
class LLEnvironment;
class LLFace;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment