Browse Source

Define RACK_DIR in Makefile, use windowWidth and windowHeight for Scene dimensions

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
7ebf0d709f
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      Makefile
  2. +3
    -0
      compile.mk
  3. +1
    -1
      src/window.cpp

+ 1
- 0
Makefile View File

@@ -1,4 +1,5 @@
VERSION = 0.6.0dev
RACK_DIR = .

FLAGS += \
-Iinclude \


+ 3
- 0
compile.mk View File

@@ -1,6 +1,7 @@
ifdef VERSION
FLAGS += -DVERSION=$(VERSION)
endif
RACK_DIR ?= .

# Generate dependency files alongside the object files
FLAGS += -MMD
@@ -14,6 +15,8 @@ endif
CXXFLAGS += -std=c++11


include $(RACK_DIR)/arch.mk

ifeq ($(ARCH), lin)
FLAGS += -DARCH_LIN
endif


+ 1
- 1
src/window.cpp View File

@@ -461,7 +461,7 @@ void windowRun() {
glfwGetWindowSize(gWindow, &windowWidth, &windowHeight);
gWindowRatio = (float)width / windowWidth;

gScene->box.size = Vec(width, height).div(gPixelRatio / gWindowRatio);
gScene->box.size = Vec(windowWidth, windowHeight);

// Step scene
gScene->step();


Loading…
Cancel
Save