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 VERSION = 0.6.0dev
RACK_DIR = .


FLAGS += \ FLAGS += \
-Iinclude \ -Iinclude \


+ 3
- 0
compile.mk View File

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


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




include $(RACK_DIR)/arch.mk

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


+ 1
- 1
src/window.cpp View File

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


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


// Step scene // Step scene
gScene->step(); gScene->step();


Loading…
Cancel
Save