Skip to content

Fix #460 - texture2D is renamed texture #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

9 changes: 4 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ build-mac: macOS/Build/Products/Debug/presets
@echo "Products built in macOS/Build/Products/Debug"
open macOS/Build/Products/Debug

ProjectM.pkg:
xcrun xcodebuild -scheme "ProjectM Installer" -configuration Release archive -archivePath build/ProjectM.xcarchive

# do a macOS build
dist-mac:
./autogen.sh
make clean
./configure --disable-sdlframework
dist-mac: dist ProjectM.pkg
rm -rf dist
xcrun xcodebuild -scheme "ProjectM Installer" -configuration Release archive -archivePath build/ProjectM.xcarchive
mkdir -p dist
mv ProjectM.pkg dist/projectM-macOS.pkg
mv projectM-*.tar.gz dist/
Expand Down
1 change: 0 additions & 1 deletion src/libprojectM/FileScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FileScanner::FileScanner(std::vector<std::string> &rootDirs, std::vector<std::st
void FileScanner::scan(ScanCallback cb) {
#ifdef HAVE_FTS_H
scanPosix(cb);
printf("HAVE_FTS\n");
#else
for (auto dir : _rootDirs)
scanGeneric(cb, dir.c_str());
Expand Down
4 changes: 0 additions & 4 deletions src/libprojectM/Intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@
#define _HAS_SSE2_ 1
#endif

#ifdef __arm64__
#undef _HAS_SSE2_
#endif

#endif /* PRJMIntrinsics_h */
2 changes: 1 addition & 1 deletion src/libprojectM/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ libprojectM_la_SOURCES = ConfigFile.cpp Preset.cpp PresetLoader.cpp timer.cpp \
HungarianMethod.hpp Preset.hpp RandomNumberGenerators.hpp\
IdleTextures.hpp PresetChooser.hpp TimeKeeper.hpp\
KeyHandler.hpp PresetFactory.hpp projectM.hpp\
BackgroundWorker.h \
BackgroundWorker.h Intrinsics.h \
PCM.hpp PresetFactoryManager.hpp\
projectM.hpp projectM-opengl.h \
ConfigFile.h \
Expand Down
26 changes: 13 additions & 13 deletions src/libprojectM/Renderer/StaticGlShaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ uniform sampler2D texture_sampler;
out vec4 color;

void main(){
color = fragment_color * texture2D(texture_sampler, fragment_texture.st);
color = fragment_color * texture(texture_sampler, fragment_texture.st);
}
)";

Expand Down Expand Up @@ -676,17 +676,17 @@ void main(){
vec2 uv2 = fragment_texture.xy + srctexsize.zw*vec2(1.0,1.0);

vec3 blur =
(texture2D(texture_sampler, uv2 + vec2(d1 * srctexsize.z, 0)).xyz +
texture2D(texture_sampler, uv2 + vec2(-d1 * srctexsize.z, 0)).xyz) *
(texture(texture_sampler, uv2 + vec2(d1 * srctexsize.z, 0)).xyz +
texture(texture_sampler, uv2 + vec2(-d1 * srctexsize.z, 0)).xyz) *
w1 +
(texture2D(texture_sampler, uv2 + vec2(d2 * srctexsize.z, 0)).xyz +
texture2D(texture_sampler, uv2 + vec2(-d2 * srctexsize.z, 0)).xyz) *
(texture(texture_sampler, uv2 + vec2(d2 * srctexsize.z, 0)).xyz +
texture(texture_sampler, uv2 + vec2(-d2 * srctexsize.z, 0)).xyz) *
w2 +
(texture2D(texture_sampler, uv2 + vec2(d3 * srctexsize.z, 0)).xyz +
texture2D(texture_sampler, uv2 + vec2(-d3 * srctexsize.z, 0)).xyz) *
(texture(texture_sampler, uv2 + vec2(d3 * srctexsize.z, 0)).xyz +
texture(texture_sampler, uv2 + vec2(-d3 * srctexsize.z, 0)).xyz) *
w3 +
(texture2D(texture_sampler, uv2 + vec2(d4 * srctexsize.z, 0)).xyz +
texture2D(texture_sampler, uv2 + vec2(-d4 * srctexsize.z, 0)).xyz) *
(texture(texture_sampler, uv2 + vec2(d4 * srctexsize.z, 0)).xyz +
texture(texture_sampler, uv2 + vec2(-d4 * srctexsize.z, 0)).xyz) *
w4;

blur.xyz *= w_div;
Expand Down Expand Up @@ -730,11 +730,11 @@ void main(){
vec2 uv2 = fragment_texture.xy + srctexsize.zw*vec2(0,0);

vec3 blur =
(texture2D(texture_sampler, uv2 + vec2(0, d1 * srctexsize.w)).xyz +
texture2D(texture_sampler, uv2 + vec2(0, -d1 * srctexsize.w)).xyz) *
(texture(texture_sampler, uv2 + vec2(0, d1 * srctexsize.w)).xyz +
texture(texture_sampler, uv2 + vec2(0, -d1 * srctexsize.w)).xyz) *
w1 +
(texture2D(texture_sampler, uv2 + vec2(0, d2 * srctexsize.w)).xyz +
texture2D(texture_sampler, uv2 + vec2(0, -d2 * srctexsize.w)).xyz) *
(texture(texture_sampler, uv2 + vec2(0, d2 * srctexsize.w)).xyz +
texture(texture_sampler, uv2 + vec2(0, -d2 * srctexsize.w)).xyz) *
w2;
blur.xyz *= w_div;

Expand Down
2 changes: 0 additions & 2 deletions src/libprojectM/libprojectM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
166854752105E4FD0042793A /* TextureManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 166854242105E4BD0042793A /* TextureManager.cpp */; };
166854762105E4FD0042793A /* VideoEcho.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1668541D2105E4BC0042793A /* VideoEcho.cpp */; };
166854772105E4FD0042793A /* Waveform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 166854262105E4BD0042793A /* Waveform.cpp */; };
168404F925D82EF30001F02C /* StaticGlShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 168404F425D82ED70001F02C /* StaticGlShaders.cpp */; };
1687173820C33DF400947E7E /* TextureManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172320C33DF300947E7E /* TextureManager.hpp */; };
1687173920C33DF400947E7E /* Renderable.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172420C33DF300947E7E /* Renderable.hpp */; };
1687173B20C33DF400947E7E /* PipelineContext.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172620C33DF300947E7E /* PipelineContext.hpp */; };
Expand Down Expand Up @@ -777,7 +776,6 @@
169BC64724CC4D16007B7829 /* FileScanner.cpp in Sources */,
1668544D2105E4FC0042793A /* Pipeline.hpp in Sources */,
1668544E2105E4FC0042793A /* PipelineContext.hpp in Sources */,
168404F925D82EF30001F02C /* StaticGlShaders.cpp in Sources */,
1668544F2105E4FC0042793A /* Renderable.hpp in Sources */,
166854502105E4FC0042793A /* RenderContext.hpp in Sources */,
166854512105E4FC0042793A /* Renderer.hpp in Sources */,
Expand Down
5 changes: 4 additions & 1 deletion src/libprojectM/sdltoprojectM.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
#include "event.h"

//#include "projectM/projectM.hpp"
#ifdef WIN32
#include <SDL.h>

#else
#include <SDL2/SDL.h>
#endif

inline projectMEvent sdl2pmEvent( SDL_Event *event ) { \

Expand Down
Loading